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>
Signed-off-by: John Vinke <jvinke@austinseminary.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
This commit is contained in:
Martin Renvoize 2026-03-03 16:40:37 +00:00
parent 560dd35740
commit 780ae2d3e3
No known key found for this signature in database
GPG Key ID: 2D86E0EAEC83711B
1 changed files with 83 additions and 72 deletions

View File

@ -29,82 +29,82 @@ export default {
};
const getSIPFields = () => [
{ value: "AA", description: "AA" },
{ value: "AB", description: "AB" },
{ value: "AC", description: "AC" },
{ value: "AD", description: "AD" },
{ value: "AE", description: "AE" },
{ value: "AF", description: "AF" },
{ value: "AG", description: "AG" },
{ value: "AH", description: "AH" },
{ value: "AJ", description: "AJ" },
{ value: "AL", description: "AL" },
{ value: "AM", description: "AM" },
{ value: "AN", description: "AN" },
{ value: "AO", description: "AO" },
{ value: "AP", description: "AP" },
{ value: "AQ", description: "AQ" },
{ value: "AA", description: __("AA - Patron Identifier") },
{ value: "AB", description: __("AB - Item Identifier") },
{ value: "AC", description: __("AC - Terminal Password") },
{ value: "AD", description: __("AD - Patron Password") },
{ value: "AE", description: __("AE - Personal Name") },
{ value: "AF", description: __("AF - Screen Message") },
{ value: "AG", description: __("AG - Print Line") },
{ value: "AH", description: __("AH - Due Date") },
{ value: "AJ", description: __("AJ - Title Identifier") },
{ value: "AL", description: __("AL - Blocked Card Message") },
{ value: "AM", description: __("AM - Library Name") },
{ value: "AN", description: __("AN - Terminal Location") },
{ value: "AO", description: __("AO - Institution ID") },
{ value: "AP", description: __("AP - Current Location") },
{ value: "AQ", description: __("AQ - Permanent Location") },
{ value: "AR", description: "AR" },
{ value: "AS", description: "AS" },
{ value: "AT", description: "AT" },
{ value: "AU", description: "AU" },
{ value: "AV", description: "AV" },
{ value: "AS", description: __("AS - Hold Items") },
{ value: "AT", description: __("AT - Overdue Items") },
{ value: "AU", description: __("AU - Charged Items") },
{ value: "AV", description: __("AV - Fine Items") },
{ value: "AW", description: "AW" },
{ value: "AX", description: "AX" },
{ value: "AY", description: "AY" },
{ value: "AZ", description: "AZ" },
{ value: "AY", description: __("AY - Sequence Number") },
{ value: "AZ", description: __("AZ - Checksum") },
{ value: "BA", description: "BA" },
{ value: "BB", description: "BB" },
{ value: "BC", description: "BC" },
{ value: "BD", description: "BD" },
{ value: "BE", description: "BE" },
{ value: "BF", description: "BF" },
{ value: "BG", description: "BG" },
{ value: "BH", description: "BH" },
{ value: "BI", description: "BI" },
{ value: "BD", description: __("BD - Home Address") },
{ value: "BE", description: __("BE - Email Address") },
{ value: "BF", description: __("BF - Home Phone") },
{ value: "BG", description: __("BG - Owner") },
{ value: "BH", description: __("BH - Currency Type") },
{ value: "BI", description: __("BI - Cancel") },
{ value: "BJ", description: "BJ" },
{ value: "BK", description: "BK" },
{ value: "BL", description: "BL" },
{ value: "BM", description: "BM" },
{ value: "BN", description: "BN" },
{ value: "BO", description: "BO" },
{ value: "BP", description: "BP" },
{ value: "BQ", description: "BQ" },
{ value: "BR", description: "BR" },
{ value: "BS", description: "BS" },
{ value: "BT", description: "BT" },
{ value: "BU", description: "BU" },
{ value: "BV", description: "BV" },
{ value: "BW", description: "BW" },
{ value: "BX", description: "BX" },
{ value: "BY", description: "BY" },
{ value: "BZ", description: "BZ" },
{ value: "CA", description: "CA" },
{ value: "CB", description: "CB" },
{ value: "CC", description: "CC" },
{ value: "CD", description: "CD" },
{ value: "BK", description: __("BK - Transaction ID") },
{ value: "BL", description: __("BL - Valid Patron") },
{ value: "BM", description: __("BM - Renewed Items") },
{ value: "BN", description: __("BN - Unrenewed Items") },
{ value: "BO", description: __("BO - Fee Acknowledged") },
{ value: "BP", description: __("BP - Start Item") },
{ value: "BQ", description: __("BQ - End Item") },
{ value: "BR", description: __("BR - Queue Position") },
{ value: "BS", description: __("BS - Pickup Location") },
{ value: "BT", description: __("BT - Fee Type") },
{ value: "BU", description: __("BU - Recall Items") },
{ value: "BV", description: __("BV - Fee Amount") },
{ value: "BW", description: __("BW - Expiration Date") },
{ value: "BX", description: __("BX - Supported Messages") },
{ value: "BY", description: __("BY - Hold Type") },
{ value: "BZ", description: __("BZ - Hold Items Limit") },
{ value: "CA", description: __("CA - Overdue Items Limit") },
{ value: "CB", description: __("CB - Charged Items Limit") },
{ value: "CC", description: __("CC - Fee Limit") },
{ value: "CD", description: __("CD - Unavailable Hold Items") },
{ value: "CE", description: "CE" },
{ value: "CF", description: "CF" },
{ value: "CG", description: "CG" },
{ value: "CH", description: "CH" },
{ value: "CI", description: "CI" },
{ value: "CJ", description: "CJ" },
{ value: "CK", description: "CK" },
{ value: "CL", description: "CL" },
{ value: "CM", description: "CM" },
{ value: "CN", description: "CN" },
{ value: "CO", description: "CO" },
{ value: "CP", description: "CP" },
{ value: "CQ", description: "CQ" },
{ value: "CR", description: "CR" },
{ value: "CS", description: "CS" },
{ value: "CT", description: "CT" },
{ value: "CV", description: "CV" },
{ value: "CY", description: "CY" },
{ value: "DA", description: "DA" },
{ value: "PB", description: "PB" },
{ value: "PC", description: "PC" },
{ value: "PI", description: "PI" },
{ value: "CF", description: __("CF - Hold Queue Length") },
{ value: "CG", description: __("CG - Fee ID") },
{ value: "CH", description: __("CH - Item Properties") },
{ value: "CI", description: __("CI - Security Inhibit") },
{ value: "CJ", description: __("CJ - Recall Date") },
{ value: "CK", description: __("CK - Media Type") },
{ value: "CL", description: __("CL - Sort Bin") },
{ value: "CM", description: __("CM - Hold Pickup Date") },
{ value: "CN", description: __("CN - Login User ID") },
{ value: "CO", description: __("CO - Login Password") },
{ value: "CP", description: __("CP - Location Code") },
{ value: "CQ", description: __("CQ - Valid Patron Password") },
{ value: "CR", description: __("CR - Collection Code") },
{ value: "CS", description: __("CS - Call Number") },
{ value: "CT", description: __("CT - Destination Location") },
{ value: "CV", description: __("CV - Alert Type") },
{ value: "CY", description: __("CY - Hold Patron ID") },
{ value: "DA", description: __("DA - Hold Patron Name") },
{ value: "PB", description: __("PB - Patron Birth Date") },
{ value: "PC", description: __("PC - Patron Class") },
{ value: "PI", description: __("PI - Patron Internet Profile") },
];
const resourceAttrs = [
@ -220,7 +220,7 @@ export default {
group: "Details",
defaultValue: "collection_code",
toolTip: __(
"Arbitrary item field to be used as the value for the CR field. Defaults to 'collection_code'"
"CR (Collection Code) is a 3M extension field that communicates an item's shelving category to SIP2 clients. Selects which Koha item field to use as the CR value. Defaults to 'collection_code'."
),
},
{
@ -229,7 +229,9 @@ export default {
label: __("CT always send"),
hideIn: ["List"],
group: "Details",
toolTip: __("Always send the CT field, even if it is empty"),
toolTip: __(
"CT (Destination Location) tells the SIP2 client where to route an item, for example to a holds shelf or to another branch for transfer. When enabled, this field is always sent in checkin responses even when the item has no routing destination."
),
},
{
name: "cv_send_00_on_success",
@ -238,7 +240,7 @@ export default {
hideIn: ["List"],
group: "Details",
toolTip: __(
'Checkin success message to return a CV field of value "00" rather than no CV field at all'
'CV (Alert Type) classifies the reason for a checkin alert, for example: 01 = hold at same branch, 02 = hold for another branch, 04 = item needs transfer. Some SIP2 clients require CV to be present in every checkin response; when enabled, sends CV with value "00" (no alert) on successful checkins instead of omitting the field entirely.'
),
},
{
@ -248,7 +250,7 @@ export default {
hideIn: ["List"],
group: "Details",
toolTip: __(
"Only set the alert flag if a value in the CV field is sent"
"When enabled, the SIP2 alert flag is only raised if a CV (Alert Type) value is present. When disabled (the default), the alert flag is raised if the checkin failed or if any CV value is sent."
),
},
{
@ -905,6 +907,9 @@ export default {
"[% patron.surname %][% IF patron.firstname %], [% patron.firstname %][% END %]",
hideIn: ["List"],
group: "Templates",
toolTip: __(
"AE (Personal Name) is the patron's name as sent to the SIP2 client. Uses Template::Toolkit syntax; the 'patron' object (Koha::Patron) is available."
),
},
{
name: "av_field_template",
@ -914,6 +919,9 @@ export default {
"[% accountline.description %] [% accountline.amountoutstanding | format('%.2f') %]",
hideIn: ["List"],
group: "Templates",
toolTip: __(
"AV (Fine Items) passes fee and fine details to the SIP2 client. Uses Template::Toolkit syntax; the 'accountline' object (Koha::Account::Line) and 'patron' object are available."
),
},
{
name: "da_field_template",
@ -923,6 +931,9 @@ export default {
"[% patron.surname %][% IF patron.firstname %], [% patron.firstname %][% END %]",
hideIn: ["List"],
group: "Templates",
toolTip: __(
"DA (Hold Patron Name) is the name of the patron who has placed a hold on the item being checked in. Uses Template::Toolkit syntax; the 'patron' object (Koha::Patron) for the hold patron and 'item' object are available."
),
},
];