Bug 30407

Summary: Add ability to syspref UpdateNotForLoanStatusOnCheckin to show only the notforloan values description
Product: Koha Reporter: Emmi Takkinen <emmi.takkinen>
Component: CirculationAssignee: Emmi Takkinen <emmi.takkinen>
Status: CLOSED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: enhancement    
Priority: P5 - low CC: caroline.cyr-la-rose, fridolin.somers, gmcharlt, kyle.m.hall, lucas, sally.healey
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25560
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Caroline Cyr La Rose Documentation submission: https://gitlab.com/koha-community/koha-manual/-/merge_requests/669
Text to go in the release notes:
Version(s) released in:
22.11.00
Circulation function:
Bug Depends on:    
Bug Blocks: 35293, 35692    
Attachments: Bug 30407: Add ability to syspref UpdateNotForLoanStatusOnCheckin to show only the notforloan values description
Bug 30407: Add ability to syspref UpdateNotForLoanStatusOnCheckin to show only the notforloan values description
Bug 30407: Add ability to syspref UpdateNotForLoanStatusOnCheckin to show only the notforloan values description
Bug 30407: Add ability to syspref UpdateNotForLoanStatusOnCheckin to show only the notforloan values description
Bug 30407: (QA follow-up) Fix missing TT filter
Bug 30407: (QA follow-up) Replace message with description
Bug 30407: Fix sysprefs.sql syntax

Description Emmi Takkinen 2022-03-30 10:30:00 UTC
This can be used to instruct staff how the item should handled when it's checked in. For example items notforloan status has been changed as "Invoiced item" while item has been on loan. When it's checked in staff sees that they should put item aside for further processing.
Comment 1 Emmi Takkinen 2022-03-30 10:32:43 UTC
Created attachment 132554 [details] [review]
Bug 30407: Add ability to syspref UpdateNotForLoanStatusOnCheckin to show only the notforloan values description

This can be used to instruct staff how the item should handled when
it's checked in. For example items notforloan status has been
changed as "Invoiced item" while item has been on loan. When it's
checked in staff sees that they should put item aside for further
processing.

To test:
1. Apply patch and update database if needed
2. Set items notforloan status as -1 (or create new one)
3. Add line "-1: ONLYMESSAGE" to UpdateNotForLoanStatusOnCheckin
4. Check item out for patron.
5. Check item in.
=> Description of notforloan status should be displayed.
=> Confirm notforloan status hasn't changed.

Also prove t/db_dependent/Circulation/issue.t

Sponsored-by: Koha-Suomi Oy
Comment 2 Sally 2022-07-27 08:05:25 UTC
I like this idea - but the patch doesn't currently apply.

CONFLICT (content): Merge conflict in C4/Circulation.pm
error: Failed to merge in the changes.
Comment 3 Emmi Takkinen 2022-07-27 08:23:54 UTC
Created attachment 138168 [details] [review]
Bug 30407: Add ability to syspref UpdateNotForLoanStatusOnCheckin to show only the notforloan values description

This can be used to instruct staff how the item should handled when
it's checked in. For example items notforloan status has been
changed as "Invoiced item" while item has been on loan. When it's
checked in staff sees that they should put item aside for further
processing.

To test:
1. Apply patch and update database if needed
2. Set items notforloan status as -1 (or create new one)
3. Add line "-1: ONLYMESSAGE" to UpdateNotForLoanStatusOnCheckin
4. Check item out for patron.
5. Check item in.
=> Description of notforloan status should be displayed.
=> Confirm notforloan status hasn't changed.

Also prove t/db_dependent/Circulation/issue.t

Sponsored-by: Koha-Suomi Oy
Comment 4 Emmi Takkinen 2022-07-27 08:24:10 UTC
(In reply to Sally from comment #2)
> I like this idea - but the patch doesn't currently apply.
> 
> CONFLICT (content): Merge conflict in C4/Circulation.pm
> error: Failed to merge in the changes.

Patch rebased.
Comment 5 ByWater Sandboxes 2022-07-27 09:42:02 UTC
Created attachment 138171 [details] [review]
Bug 30407: Add ability to syspref UpdateNotForLoanStatusOnCheckin to show only the notforloan values description

This can be used to instruct staff how the item should handled when
it's checked in. For example items notforloan status has been
changed as "Invoiced item" while item has been on loan. When it's
checked in staff sees that they should put item aside for further
processing.

To test:
1. Apply patch and update database if needed
2. Set items notforloan status as -1 (or create new one)
3. Add line "-1: ONLYMESSAGE" to UpdateNotForLoanStatusOnCheckin
4. Check item out for patron.
5. Check item in.
=> Description of notforloan status should be displayed.
=> Confirm notforloan status hasn't changed.

Also prove t/db_dependent/Circulation/issue.t

Sponsored-by: Koha-Suomi Oy

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Comment 6 Sally 2022-07-27 09:48:02 UTC
Works as described, signing off.  Thanks for the patch!

The display of the not for loan status for the staff on check in will be particularly useful when we get a publisher recall.
Comment 7 Fridolin Somers 2022-08-13 08:37:52 UTC
Careful Bug 25560 is also modifying this preference
Comment 8 Katrin Fischer 2022-10-02 20:35:59 UTC
Created attachment 141211 [details] [review]
Bug 30407: Add ability to syspref UpdateNotForLoanStatusOnCheckin to show only the notforloan values description

This can be used to instruct staff how the item should handled when
it's checked in. For example items notforloan status has been
changed as "Invoiced item" while item has been on loan. When it's
checked in staff sees that they should put item aside for further
processing.

To test:
1. Apply patch and update database if needed
2. Set items notforloan status as -1 (or create new one)
3. Add line "-1: ONLYMESSAGE" to UpdateNotForLoanStatusOnCheckin
4. Check item out for patron.
5. Check item in.
=> Description of notforloan status should be displayed.
=> Confirm notforloan status hasn't changed.

Also prove t/db_dependent/Circulation/issue.t

Sponsored-by: Koha-Suomi Oy

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 9 Katrin Fischer 2022-10-02 20:36:04 UTC
Created attachment 141212 [details] [review]
Bug 30407: (QA follow-up) Fix missing TT filter

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Katrin Fischer 2022-10-02 20:36:09 UTC
Created attachment 141213 [details] [review]
Bug 30407: (QA follow-up) Replace message with description

Switches "not for loan message" to "not for loan description" to
stay closer to the usual terminology for AV values also used
when managing them.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 11 Katrin Fischer 2022-10-24 09:29:37 UTC
*ping*
Comment 12 Tomás Cohen Arazi (tcohen) 2022-10-27 16:52:33 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 13 Tomás Cohen Arazi (tcohen) 2022-10-27 17:40:43 UTC
Created attachment 142724 [details] [review]
Bug 30407: Fix sysprefs.sql syntax

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 14 Lucas Gass (lukeg) 2022-12-05 23:40:00 UTC
Enhancement will not be backported to 22.05.x