Bug 41980

Summary: SIP codes in the new SIP Config UI could have better descriptions
Product: Koha Reporter: Martin Renvoize (ashimema) <martin.renvoize>
Component: System AdministrationAssignee: Martin Renvoize (ashimema) <martin.renvoize>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: andrew, david, gmcharlt, jesse, kyle
Version: Main   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: Unsponsored Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
This enhancement improves the descriptions and tooltips for several SIP2 account form fields: - Allow and hide fields: instead of just codes (such as CQ), most codes now include a description (such as CQ - Valid Patron Password) - Improved tooltips for these fields: . CR item field . CT always send . CV always send 00 on success . CV triggers alert - Adds tooltips in the template section for the AE, AV, and DA field templates
Version(s) released in:
Circulation function:
Bug Depends on: 37893    
Bug Blocks:    
Attachments: Bug 41980: Add more descriptive labels to SIP2 field codes
Bug 41980: Add more descriptive labels to SIP2 field codes

Description Martin Renvoize (ashimema) 2026-03-03 16:35:47 UTC
Now we have a nice systems librarian facing SIP configuration page, it would be nice to improve the field descriptions from many simple SIP codes to something a little more understandable for the person doing the configuration should they not be a SIP expert.
Comment 1 Martin Renvoize (ashimema) 2026-03-03 16:42:38 UTC
Created attachment 194398 [details] [review]
Bug 41980: Add more descriptive labels to SIP2 field codes

- Add field name labels to all entries in getSIPFields() used by the
  Allow/Hide fields dropdowns (e.g. "CV - Alert Type" instead of "CV")
  sourced from C4::SIP::Sip::Constants field identifier names
- Add tooltips to ae_field_template, av_field_template and
  da_field_template explaining what each SIP field represents and
  which Template::Toolkit objects are available
- Improve ct_always_send tooltip to explain CT is Destination Location
- Improve cv_send_00_on_success tooltip to explain CV alert type codes
- Improve cv_triggers_alert tooltip to clarify the two alert behaviours
- Improve cr_item_field tooltip to explain CR is Collection Code
Comment 2 Martin Renvoize (ashimema) 2026-03-03 16:45:16 UTC
Hmm, this is actually exposed in the hints/tooltips rather than labels.. my mistake in the commit message.

Either way, the test plan is basically to navigate to the 'Add account' page in the SIP config page and hover over the various fields hints.. read the new hints and confirm they're a little clearer as to the fields intended purpose.
Comment 3 David Nind 2026-03-03 22:17:24 UTC
Created attachment 194414 [details] [review]
Bug 41980: Add more descriptive labels to SIP2 field codes

- Add field name labels to all entries in getSIPFields() used by the
  Allow/Hide fields dropdowns (e.g. "CV - Alert Type" instead of "CV")
  sourced from C4::SIP::Sip::Constants field identifier names
- Add tooltips to ae_field_template, av_field_template and
  da_field_template explaining what each SIP field represents and
  which Template::Toolkit objects are available
- Improve ct_always_send tooltip to explain CT is Destination Location
- Improve cv_send_00_on_success tooltip to explain CV alert type codes
- Improve cv_triggers_alert tooltip to clarify the two alert behaviours
- Improve cr_item_field tooltip to explain CR is Collection Code

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 David Nind 2026-03-03 22:29:56 UTC
Nice! This definitely makes things clearer.

Testing notes (using KTD):
1. Go to Administration > Patrons and circulation > Self-service 
   circulation (SIP2) > Accounts > New account
2. In the details section:
   2.1 Note that the values listed for these dropdown lists are just
       codes, such as CQ, CD:
       - Allow fields
       - Hide fields
   2.2 Note there are relatively short tooltips for these fields:
       - CR item field
       - CT always send
       - CV always send 00 on success
       - CV triggers alert
   2.3 In the templates section, note that there are no tooltips for 
       these fields:
       - AE field template
       - AV field template
       - DA field template
3. Apply the patch.
4. Rebuild things: yarn build
5. Restart everything: restart_all
6. Refresh the page.
7. For step 2.1, note that most values have a short description for 
   each code.
8. For step 2.2, note that more detailed tooltips (see the patch diff
   for a comparison).
9. For step 2.3, note that there are now tooltips for the fields.

Observations, not showstoppers for me as they can be done in new bugs:
1. Should we use sentence case for the dropdown list descriptions?
2. There are no descriptions for these codes:
   - AR
   - AW
   - AX
   - BA
   - BB
   - BC
   - BJ
   - CE
3. For AE, AV, and DA, maybe we should change the text for the last
   sentence:
   - Current: "...Use the Template::Toolkit syntax; the 'XXX' object 
               (Koha::XXX) is available."
   - Proposed: "...Use Template Toolkit syntax - the XXX fields 
               for XXX are available."
4. Happy to add a follow-up patch for these, or do on a new bug.