Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SearchKit - Make contribution tasks available as actions #20004

Merged

Conversation

colemanw
Copy link
Member

@colemanw colemanw commented Apr 8, 2021

Overview

Exposes contribution tasks to searchKit.

image

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= vs cids=, generic url vs per-action urls, permission checks inconsistently in the tasks() function vs in a permissionedTaskTitles() function...).

@civibot
Copy link

civibot bot commented Apr 8, 2021

(Standard links)

@civibot civibot bot added the master label Apr 8, 2021
@colemanw
Copy link
Member Author

colemanw commented Apr 8, 2021

@eileenmcnaughton even though SearchKit doesn't limit the receipt action by contribution status, it's mitigated by checks in the popup form which will display an error message if contributions with the wrong status are selected. That's probably ok for now.

@eileenmcnaughton
Copy link
Contributor

@colemanw this is stale (from your fix in 5.37 I think)

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.
@colemanw colemanw force-pushed the searchKitContributionTasks branch from bf963a3 to dd87478 Compare April 8, 2021 20:47
@eileenmcnaughton
Copy link
Contributor

Yep that works - I think it would be good to make it a bit easier to add to the buttons on the display (ie in the add menu)

image

But that doesn't need to be in scope here.

FYI contribution_status_id IS the real field name

@eileenmcnaughton eileenmcnaughton merged commit 008958d into civicrm:master Apr 8, 2021
@eileenmcnaughton eileenmcnaughton deleted the searchKitContributionTasks branch April 8, 2021 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants