Bug 27090 - In the location column of an OPAC cart the 'In transit from' and 'to' fields are empty
Summary: In the location column of an OPAC cart the 'In transit from' and 'to' fields ...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Christophe Croullebois
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-25 10:18 UTC by Christophe Croullebois
Modified: 2022-06-06 20:25 UTC (History)
5 users (show)

See Also:
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.02,20.05.08,19.11.14


Attachments
in an Opac basket enables the 'In transit from' and 'to' fields to be displayed (802 bytes, patch)
2020-11-25 10:40 UTC, Christophe Croullebois
Details | Diff | Splinter Review
Bug 26051: Elasticsearch field local-classification sort=1 in mapping.yaml (2.08 KB, patch)
2020-12-27 17:36 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review
Bug 27090: Opac basket: fix the 'In transit from' and 'to' (1.58 KB, patch)
2020-12-27 17:36 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review
Bug 27090: Opac basket: fix the 'In transit from' and 'to' (1.64 KB, patch)
2021-01-08 15:04 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Christophe Croullebois 2020-11-25 10:18:35 UTC
When you have an item in transfer and if it is in an Opac basket, in the location column the 'In transit from' and 'to' fields are empty.
It is due to the lack in koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc of [% USE Branches %].
I will propose a patch.
thx
Comment 1 Christophe Croullebois 2020-11-25 10:40:52 UTC
Created attachment 113971 [details] [review]
in an Opac basket enables the 'In  transit from' and 'to' fields to be displayed

To see the 'In  transit from' and 'to' fields in an Opac basket we have :

<span class="item-status intransit">In transit from [% Branches.GetName( item.transfertfrom ) | html %]
    to [% Branches.GetName( item.transfertto ) | html %] since [% item.transfertwhen | $KohaDates %]</span>

But in koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc we have no :

[% USE Branches %]

This patch just corrects this lack

Thx
Comment 2 Christophe Croullebois 2020-11-25 10:46:50 UTC
To test :

1° find an item in a transit status or create one with this status
2° put it in an Opac basket
3° note that in the location column of the Opac basket the 'In transit from' and 'to' fields are empty.
4° apply the patch
5° check again and validate that the 2 fields are now filled

Thx
Comment 3 Victor Grousset/tuxayo 2020-12-27 17:36:45 UTC Comment hidden (obsolete)
Comment 4 Victor Grousset/tuxayo 2020-12-27 17:36:48 UTC
Created attachment 114709 [details] [review]
Bug 27090: Opac basket: fix the 'In transit from' and 'to'

To see the 'In  transit from' and 'to' fields in an Opac basket we have :

<span class="item-status intransit">In transit from [% Branches.GetName( item.transfertfrom ) | html %]
    to [% Branches.GetName( item.transfertto ) | html %] since [% item.transfertwhen | $KohaDates %]</span>

But in koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc we have no :

[% USE Branches %]

This patch just corrects this lack

Test plan:
1° find an item in a transit status or create one with this status
2° put it in an Opac basket
3° note that in the location column of the Opac basket the 'In transit from' and 'to' fields are empty.
4° apply the patch
5° check again and validate that the 2 fields are now filled

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 5 Victor Grousset/tuxayo 2020-12-27 17:42:06 UTC
Oops, attached an additional patch that was from another ticket.

Thanks, it works as expected :)
Fixed the commit message to include the description of the fix and test plan.
(I just copied comment 1 and comment 2)
And made the first line of the commit message shorter to be in git recommendations (70 chars max)
Comment 6 Nick Clemens 2021-01-08 15:04:33 UTC
Created attachment 114967 [details] [review]
Bug 27090: Opac basket: fix the 'In transit from' and 'to'

To see the 'In  transit from' and 'to' fields in an Opac basket we have :

<span class="item-status intransit">In transit from [% Branches.GetName( item.transfertfrom ) | html %]
    to [% Branches.GetName( item.transfertto ) | html %] since [% item.transfertwhen | $KohaDates %]</span>

But in koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc we have no :

[% USE Branches %]

This patch just corrects this lack

Test plan:
1° find an item in a transit status or create one with this status
2° put it in an Opac basket
3° note that in the location column of the Opac basket the 'In transit from' and 'to' fields are empty.
4° apply the patch
5° check again and validate that the 2 fields are now filled

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 7 Jonathan Druart 2021-01-11 09:30:09 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 8 Fridolin Somers 2021-01-11 12:53:03 UTC
Pushed to 20.11.x for 20.11.02
Comment 9 Andrew Fuerste-Henry 2021-01-19 21:51:16 UTC
Pushed to 20.05.x for 20.05.08
Comment 10 Victor Grousset/tuxayo 2021-01-22 01:40:52 UTC
Backported: Pushed to 19.11.x branch for 19.11.14