1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 14:00:56 +01:00

When viewing a workboard, only link to parent workboards in crumbs if parents have workboards

Summary:
Depends on D20516. See PHI1247. In D20331, I made the crumbs on workboards point at ancestor workboards.

However, this isn't a great destination if an ancestor doesn't actually have a workboard. In this case, point at the normal profile URI instead.

Test Plan:
  - Viewed a milestone workboard with a parent that had no workboard. Saw a profile link instead of a workboard link (new behavior).
  - Viewed a milestone workboard with a parent that also had a workboard. Saw a workboard link (existing old behavior still works).

Reviewers: amckinley

Reviewed By: amckinley

Differential Revision: https://secure.phabricator.com/D20517
This commit is contained in:
epriestley 2019-05-13 07:18:58 -07:00
parent 104eefaa10
commit a1f08de283

View file

@ -109,7 +109,11 @@ abstract class PhabricatorProjectController extends PhabricatorController {
} else {
switch ($mode) {
case 'workboard':
$crumb_uri = $ancestor->getWorkboardURI();
if ($ancestor->getHasWorkboard()) {
$crumb_uri = $ancestor->getWorkboardURI();
} else {
$crumb_uri = $ancestor->getProfileURI();
}
break;
case 'profile':
default: