Bug 41980: (Follow-up) Improve SIP2 field code descriptions

- Use sentence case for all dropdown descriptions
- Add 'Unused' descriptions for AR, AW, AX, BA, BB, BC, BJ, CE
- Move SIP field codes outside translatable strings to avoid
  untranslatable codes being sent to translators
- Update AE/AV/DA tooltip text: use 'Template Toolkit' (not
  'Template::Toolkit'), imperative form, and clearer object
  field descriptions

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-14 16:06:47 +00:00
parent 780ae2d3e3
commit ed3f0dcab2
No known key found for this signature in database
GPG Key ID: 2D86E0EAEC83711B
1 changed files with 100 additions and 88 deletions

View File

@ -29,82 +29,88 @@ export default {
};
const getSIPFields = () => [
{ 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 - 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 - Sequence Number") },
{ value: "AZ", description: __("AZ - Checksum") },
{ value: "BA", description: "BA" },
{ value: "BB", description: "BB" },
{ value: "BC", description: "BC" },
{ 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 - 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 - 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") },
{ 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 - " + __("Unused") },
{ 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 - " + __("Unused") },
{ value: "AX", description: "AX - " + __("Unused") },
{ value: "AY", description: "AY - " + __("Sequence number") },
{ value: "AZ", description: "AZ - " + __("Checksum") },
{ value: "BA", description: "BA - " + __("Unused") },
{ value: "BB", description: "BB - " + __("Unused") },
{ value: "BC", description: "BC - " + __("Unused") },
{ 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 - " + __("Unused") },
{ 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 - " + __("Unused") },
{ 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 = [
@ -902,38 +908,44 @@ export default {
{
name: "ae_field_template",
type: "textarea",
label: __("AE field template"),
label: "AE " + __("field template"),
placeholder:
"[% 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."
),
toolTip:
"AE " +
__(
"(Personal name) is the patron's name as sent to the SIP2 client. Use Template Toolkit syntax - the patron fields (Koha::Patron) are available."
),
},
{
name: "av_field_template",
type: "textarea",
label: __("AV field template"),
label: "AV " + __("field template"),
placeholder:
"[% 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."
),
toolTip:
"AV " +
__(
"(Fine items) passes fee and fine details to the SIP2 client. Use Template Toolkit syntax - the accountline fields (Koha::Account::Line) and patron fields are available."
),
},
{
name: "da_field_template",
type: "textarea",
label: __("DA field template"),
label: "DA " + __("field template"),
placeholder:
"[% 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."
),
toolTip:
"DA " +
__(
"(Hold patron name) is the name of the patron who has placed a hold on the item being checked in. Use Template Toolkit syntax - the patron fields (Koha::Patron) for the hold patron and item fields are available."
),
},
];