Commit cfea3290 authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic Committed by Gerrit Code Review

Merge "Bug 1850712: When copying a group task without an assigned portfolio"

parents c160aa4c d0c90a6d
......@@ -57,7 +57,10 @@ try {
$taskview = $rootGroupTask->get('taskview');
if ($userTask) {
$portfolioElement = PlansTools::getPortfolioElementByTypeAndId($rootGroupTask->get('outcometype'), $rootGroupTask->get('outcome'));
$outcomeurl = PlansTools::createOutcomeUrlForPortfolioElement($portfolioElement);
$outcomeurl = false;
if ($portfolioElement) {
$outcomeurl = PlansTools::createOutcomeUrlForPortfolioElement($portfolioElement);
}
$buttons = '';
if ($taskview) {
$buttons .= '<a href="' . get_config('wwwroot') . 'view/view.php?id=' . $taskview . '" class="btn btn-secondary btn-sm btn-view" title="' . get_string('showassignedview', 'artefact.plans') . '">
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment