Skip to content

Commit

Permalink
Merge pull request #31780 from colemanw/skFixAction
Browse files Browse the repository at this point in the history
SearchKit - Fix task links after an inline-edit
  • Loading branch information
mattwire authored Jan 14, 2025
2 parents baf8cbd + 67ac315 commit 73acbeb
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -899,8 +899,8 @@ private function preprocessLink(array &$link): void {
if (!empty($link['join'])) {
$link['prefix'] = $link['join'] . '.';
}
// Get path from action
if (!empty($link['action'])) {
// Get path from action for non-task links
if (!empty($link['action']) && empty($link['task'])) {
$getLinks = civicrm_api4($entity, 'getLinks', [
'checkPermissions' => FALSE,
'where' => [
Expand All @@ -917,6 +917,7 @@ private function preprocessLink(array &$link): void {
$link['path'] = str_replace('[', '[' . $link['prefix'], $link['path']);
}
}
// Process task links
elseif (!$link['path'] && !empty($link['task'])) {
$task = $this->getTask($link['task']);
$link['conditions'] = $task['conditions'] ?? [];
Expand Down

0 comments on commit 73acbeb

Please sign in to comment.