Bug 39997

Summary: List of closed serials: reopening requires the syspref "RoutingSerials"
Product: Koha Reporter: Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski>
Component: SerialsAssignee: Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 39997: List of closed serials: reopening shouldn't require the syspref RoutingSerials
Bug 39997: List of closed serials: reopening shouldn't require the syspref RoutingSerials

Description Baptiste Wojtkowski (bwoj) 2025-05-26 10:46:25 UTC
On the list of closed serials, the action "reopen" is not displayed unless you have the syspref "RoutingSerials" active.

From koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt

139                                             [% IF ( routing && CAN_user_serials_routing ) %]
140                                                 [% UNLESS ( subscription.cannotedit ) %]
141                                                     

142                                                         <a
143                                                             class="dropdown-item"
144                                                             href="/cgi-bin/koha/serials/serials-search.pl?subscriptionid=[% subscription.subscriptionid | uri %]&amp    ;op=reopen&routing=[% subscription.routing | uri %]&searched=1&title_filter=[% title_filter | uri %]&ISSN_filter=[% ISSN_filter | uri %]&EAN_fil    ter=[% EAN_filter | uri %]&published_filter=[% publisher_filter | uri %]&bookseller_filter=[% bookseller_filter | uri %]&branch_filter=[% branch_filter     | uri %]"
145                                                             id="reopensub"
146                                                         >
147                                                             <i class="fa-solid fa-arrow-rotate-right"> Reopen</a
148                                                         >
149                                                     

150                                                 [% END %]
151                                             [% END # IF ( routing && CAN_user_serials_routing ) %]

I have no clue why there is a restriction on routing and CAN_user_serials_routing. It breaks the ability to reopen serial from the list of closed serials if routing is not activated.

To reproduce:
1 - Create a closed serial
2 - Disable the syspref "RoutingSerials"
3 - Go to cgi-bin/koha/serials/serials-search.pl and search for the closed serial ; click on the "closed" panel of the result -> on the actions button, there is no option to reopen
4 - Apply patch
5 - Repeat 3, there is now an option to reopen.
Comment 1 Baptiste Wojtkowski (bwoj) 2025-05-26 11:07:59 UTC
Created attachment 182783 [details] [review]
Bug 39997: List of closed serials: reopening shouldn't require the syspref RoutingSerials

Test plan:
1 - Create a closed serial
2 - Disable the syspref "RoutingSerials"
3 - Go to cgi-bin/koha/serials/serials-search.pl and search for the closed serial ; click on the "closed" panel of the result -> on the actions button, there is no option to reopen
4 - Apply patch
5 - Repeat 3, there is now an option to reopen.
Comment 2 Owen Leonard 2025-05-27 14:44:46 UTC
Created attachment 182800 [details] [review]
Bug 39997: List of closed serials: reopening shouldn't require the syspref RoutingSerials

Test plan:
1 - Create a closed serial
2 - Disable the syspref "RoutingSerials"
3 - Go to cgi-bin/koha/serials/serials-search.pl and search for the
    closed serial ; click on the "closed" panel of the result -> on the
    actions button, there is no option to reopen
4 - Apply patch
5 - Repeat 3, there is now an option to reopen.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>