-
-
Notifications
You must be signed in to change notification settings - Fork 818
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
add Afform Reports listing #31458
base: master
Are you sure you want to change the base?
add Afform Reports listing #31458
Conversation
🤖 Thank you for contributing to CiviCRM! ❤️ We will need to test and review this PR. 👷 Introduction for new contributors...
Quick links for reviewers...
|
4930efe
to
5a9e08b
Compare
Thanks @ufundo It looks like a good start. I am away this week but can test and detail out my results when I get back |
Added filtering on the base_module (Extension) and afform description . If there are other filters that should be possible to add, it's just a case of specifying the right |
I wanted to add an extension column to the listing. I can do it using the base_module key, but not the label for some reason. @colemanw any idea why this doesn't work ufundo@25e97d0 ? |
No, it certainly looks like it should. The
The only other thing I can think of is that maybe the missing "suffixes" metadata is a problem? I didn't think it would be, but worth a shot to see if adding it helps: --- a/ext/afform/core/Civi/Api4/Afform.php
+++ b/ext/afform/core/Civi/Api4/Afform.php
@@ -329,6 +329,7 @@ class Afform extends Generic\AbstractEntity {
'description' => 'Name of extension which provides this form',
'readonly' => TRUE,
'pseudoconstant' => ['callback' => ['CRM_Core_BAO_Managed', 'getBaseModules']],
+ 'suffixes' => ['name', 'label'],
];
$fields[] = [
'name' => 'search_displays', |
Nitpick: The title "Afform Reports" in the menu seems a bit programmer-ey (we don't use the word "Afform" in user-facing text). What about "Report Forms"? |
Thanks for the work on this. In testing user created Search Forms have no base module and filtering on the primary Entity (contacts/participants/memberships etc) would be useful. As this list gets large we need a way for peoiple to find what they are looking for. |
Overview
Adds a placement tag to designate certain (search) afforms as "Afform Reports". Add a listing for end users to open these reports.
Before
The only easy listing of Afforms is in the Form Builder GUI - aimed at form editors rather than users.
After
Afforms can be tagged as "Reports" using the Expose To option in Form Builder:
They are then shown in a simple listing for end users:
The listing is included in the Reports menu:
Technical Details
I've made this in a separate core extension called
afform_reports
.I didn't include in the
afform
directory because it seems quite separate functionality - more akin to Admin UI or Search UI.I toyed with including in
civi_report
- however I thought this may be useful for folks instead of standard CiviReport. I did add under the reports top menu for now.cc @kcristiano is this what you had in mind?