SearchKit - Make contribution tasks available as actions #20004
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Exposes contribution tasks to searchKit.
Technical Details
So far there is only one action (Send Receipt) available, and it only works for contributions with status=Completed.
SearchKit doesn't yet respect that limitation and shows the action for every record. I don't have an easy solution for that, as the
"status_id"
column isn't even guaranteed to be included in the search, making it difficult to auto-apply filters. It's also annoying that the filter is keyed by the obsolete "unique name"'contribution_status_id'
.Comments
Adding standalone actions from a 2nd entity into the mix highlights the fact that this is all just duct-taped together, as there are big inconsistencies between how contact actions and contribution actions are retrieved & constructed (argument
id=
vscids=
, generic url vs per-action urls, permission checks inconsistently in thetasks()
function vs in apermissionedTaskTitles()
function...).