https://snipboard.io/JvQant.jpg It's hardcoded in the controller: reserve/request.pl 571 $item->{pickup_locations} = 'Any library'; reserve/request.tt 684 [% itemloo.pickup_locations | html %]
Created attachment 118228 [details] [review] Bug 26999: Make 'Any library' translatable when placing a hold This patch makes the 'Any library' string translatable, by converting it into a flag and using it accordingly on the request.tt template. To test: 1. Have the 'Hold pickup library match' set to 'any library' on the circultation rules. 2. Open the page to place a hold on a biblio with some items => SUCCESS: The item says 'Any library' on the 'Allowed pickup locations' column. 3. Apply this patch 4. Repeat 2 => SUCCESS: No behavior change => SUCCESS: The string is on the template 5. Sign off :-D
Created attachment 118230 [details] [review] Bug 26999: (follow-up) Simplify code Doing $ git grep pickup_locations_code shows there's some calculated data that is not actually used anywhere. We can get rid of it. This patch also reuses $item_object (which is in the same loop scope) to avoid an extra DB call. To test: 1. Run: $ git grep pickup_locations_code => FAIL: It is only used/set as a comma separated string, inside request.pl 2. Apply this patch 3. Repeat 1 => SUCCESS: The unused stuff is not there anymore 4. Open the page for placing some holds => SUCCESS: It doesn't explode 5. Sign off :-D
Created attachment 118233 [details] [review] Bug 26999: Make 'Any library' translatable when placing a hold This patch makes the 'Any library' string translatable, by converting it into a flag and using it accordingly on the request.tt template. To test: 1. Have the 'Hold pickup library match' set to 'any library' on the circultation rules. 2. Open the page to place a hold on a biblio with some items => SUCCESS: The item says 'Any library' on the 'Allowed pickup locations' column. 3. Apply this patch 4. Repeat 2 => SUCCESS: No behavior change => SUCCESS: The string is on the template 5. Sign off :-D Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 118234 [details] [review] Bug 26999: (follow-up) Simplify code Doing $ git grep pickup_locations_code shows there's some calculated data that is not actually used anywhere. We can get rid of it. This patch also reuses $item_object (which is in the same loop scope) to avoid an extra DB call. To test: 1. Run: $ git grep pickup_locations_code => FAIL: It is only used/set as a comma separated string, inside request.pl 2. Apply this patch 3. Repeat 1 => SUCCESS: The unused stuff is not there anymore 4. Open the page for placing some holds => SUCCESS: It doesn't explode 5. Sign off :-D Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 118814 [details] [review] Bug 26999: Make 'Any library' translatable when placing a hold This patch makes the 'Any library' string translatable, by converting it into a flag and using it accordingly on the request.tt template. To test: 1. Have the 'Hold pickup library match' set to 'any library' on the circultation rules. 2. Open the page to place a hold on a biblio with some items => SUCCESS: The item says 'Any library' on the 'Allowed pickup locations' column. 3. Apply this patch 4. Repeat 2 => SUCCESS: No behavior change => SUCCESS: The string is on the template 5. Sign off :-D Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 118815 [details] [review] Bug 26999: (follow-up) Simplify code Doing $ git grep pickup_locations_code shows there's some calculated data that is not actually used anywhere. We can get rid of it. This patch also reuses $item_object (which is in the same loop scope) to avoid an extra DB call. To test: 1. Run: $ git grep pickup_locations_code => FAIL: It is only used/set as a comma separated string, inside request.pl 2. Apply this patch 3. Repeat 1 => SUCCESS: The unused stuff is not there anymore 4. Open the page for placing some holds => SUCCESS: It doesn't explode 5. Sign off :-D Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Works as expected, nice bit of cleanup, no regressions. Passing QA
Pushed to master for 21.05, thanks to everybody involved!
Pushed to 20.11.x for 20.11.05
Pushed to 20.05.x for 20.05.11
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.