Bug 27332

Summary: When renewing a serial subscription, show note and library only if RenewSerialAddsSuggestion is used
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: SerialsAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: andrewfh, colin.campbell, fridolin.somers, jonathan.druart, martin.renvoize, victor
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.05.00,20.11.04,20.05.10
Bug Depends on: 7047    
Bug Blocks:    
Attachments: Bug 27332: Use the branchcode from the subscription when renewing
Bug 27332: Hide branchcode and note is RenewSerialAddsSuggestion if off
Bug 27332: Hide branchcode and note is RenewSerialAddsSuggestion if off
Bug 27332: Use the branchcode from the subscription when renewing
Bug 27332: Hide branchcode and note is RenewSerialAddsSuggestion if off
Bug 27332: Use the branchcode from the subscription when renewing
Bug 27332: Hide branchcode and note is RenewSerialAddsSuggestion if off

Description Katrin Fischer 2021-01-04 13:54:36 UTC
When renewing a serial subscription using the renew button on the serial detail page, the library pull down in the dialog window is set to "-", although a library was set and saved for the subscription before.
Comment 1 Jonathan Druart 2021-01-05 07:11:09 UTC
Created attachment 114834 [details] [review]
Bug 27332: Use the branchcode from the subscription when renewing
Comment 2 Jonathan Druart 2021-01-05 07:12:47 UTC
What's the point (/expected behaviour) of this branchcode dropdown?
Reading the code it seems that it's only used when RenewSerialAddsSuggestion is set. The new suggestion will have this branchcode defined but it won't modify the subscription.
Comment 3 Katrin Fischer 2021-01-05 08:26:23 UTC
Hi Jonathan, I came to the same conclusion yesterday when I tried to document it for our users. 

I think it should preselect either the currently logged in library or the library of the subscription (maybe second with a fallback to first as a lot of single branch libraries don't set the library in the subscription consistently).

But it should only show when RenewSerialAddsSuggestion is turned on, which was not the case here. Same for the note field "to the librarian" below. I think this is lost when the feature is turned off as well.
Comment 4 Jonathan Druart 2021-01-05 08:55:56 UTC
Created attachment 114854 [details] [review]
Bug 27332: Hide branchcode and note is RenewSerialAddsSuggestion if off
Comment 5 Katrin Fischer 2021-02-07 19:33:27 UTC
Created attachment 116479 [details] [review]
Bug 27332: Hide branchcode and note is RenewSerialAddsSuggestion if off

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Katrin Fischer 2021-02-07 19:34:12 UTC
Created attachment 116480 [details] [review]
Bug 27332: Use the branchcode from the subscription when renewing

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Katrin Fischer 2021-02-07 19:34:15 UTC
Created attachment 116481 [details] [review]
Bug 27332: Hide branchcode and note is RenewSerialAddsSuggestion if off

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Katrin Fischer 2021-02-07 19:34:31 UTC
Thank you for the patches, Jonathan!
Comment 9 Martin Renvoize 2021-02-22 16:18:27 UTC
Created attachment 117167 [details] [review]
Bug 27332: Use the branchcode from the subscription when renewing

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 10 Martin Renvoize 2021-02-22 16:18:31 UTC
Created attachment 117168 [details] [review]
Bug 27332: Hide branchcode and note is RenewSerialAddsSuggestion if off

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 11 Martin Renvoize 2021-02-22 16:19:35 UTC
Works as expected, no regressions found, QA script passes.

Passing QA
Comment 12 Jonathan Druart 2021-02-23 12:21:42 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 13 Fridolin Somers 2021-02-25 09:47:47 UTC
Pushed to 20.11.x for 20.11.04
Comment 14 Andrew Fuerste-Henry 2021-03-05 16:59:03 UTC
Pushed to 20.05.x for 20.05.10
Comment 15 Victor Grousset/tuxayo 2021-03-19 00:07:09 UTC
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.