Bug 27137

Summary: Move item doesn't show the title of the target record
Product: Koha Reporter: Aleisha Amohia <aleisha>
Component: CatalogingAssignee: Aleisha Amohia <aleisha>
Status: CLOSED FIXED QA Contact: Nick Clemens (kidclamp) <nick>
Severity: minor    
Priority: P5 - low CC: andrew, jonathan.druart, m.de.rooy, nick, victor
Version: 20.05   
Hardware: All   
OS: All   
Change sponsored?: Sponsored Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
This patch fixes a small bug to ensure that the title of the target bibliographic record shows as expected upon successfully attaching an item.
Version(s) released in:
20.05.08,19.11.14
Circulation function:
Bug Depends on: 11529    
Bug Blocks:    
Attachments: Bug 27137: Correctly show biblio title after successfully moving item
Bug 27137: Correctly show biblio title after successfully moving item
Bug 27137: Correctly show biblio title after successfully moving item

Description Aleisha Amohia 2020-12-03 01:23:35 UTC
Bug 11529 added this change to cataloguing/moveitem.pl

 my $biblio = Koha::Biblios->find( $biblionumber );
-$template->param(bibliotitle => $biblio->title);
+$template->param(biblio => $biblio);

But the template was not updated so it still tries to access the bibliotitle variable

 <div class="dialog message">The item has successfully been attached to [% INCLUDE 'biblio-default-view.inc' %]<i>[% bibliotitle | html %]</i></a>.

Which no longer exists. So when the item is successfully moved, no biblio title is shown.

This bug exists in 19.11 and 20.05 but not 20.11.
Comment 1 Aleisha Amohia 2020-12-03 02:53:50 UTC
Created attachment 114128 [details] [review]
Bug 27137: Correctly show biblio title after successfully moving item

In Bug 11529 we changed the variable that was passed to the template but
missed updating the template.

This patch ensures we correctly access the variable to show the title of
the biblio.

To test:
1) Create two biblios (Biblio A and Biblio B)
2) Add an item to Biblio A (Item A)
3) Go to Biblio B
4) In the cataloguing toolbar, click Edit, then Attach item
5) Enter the barcode for Item A and submit
6) Notice the item has successfully moved by Biblio B's title does not
show
7) Apply patch
8) Go to Biblio A
9) In the cataloguing toolbar, click Edit, then Attach item
10) Enter the barcode for Item A and submit
11) Confirm Biblio A's title shows correctly

Sponsored-by: Toi Ohomai Institute of Technology
Comment 2 Owen Leonard 2020-12-03 12:24:55 UTC Comment hidden (obsolete)
Comment 3 Nick Clemens (kidclamp) 2020-12-03 14:05:22 UTC
Created attachment 114148 [details] [review]
Bug 27137: Correctly show biblio title after successfully moving item

In Bug 11529 we changed the variable that was passed to the template but
missed updating the template.

This patch ensures we correctly access the variable to show the title of
the biblio.

To test:
1) Create two biblios (Biblio A and Biblio B)
2) Add an item to Biblio A (Item A)
3) Go to Biblio B
4) In the cataloguing toolbar, click Edit, then Attach item
5) Enter the barcode for Item A and submit
6) Notice the item has successfully moved by Biblio B's title does not
show
7) Apply patch
8) Go to Biblio A
9) In the cataloguing toolbar, click Edit, then Attach item
10) Enter the barcode for Item A and submit
11) Confirm Biblio A's title shows correctly

Sponsored-by: Toi Ohomai Institute of Technology

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 4 Jonathan Druart 2020-12-04 14:28:31 UTC
Sending to 20.05 RM queue.
Comment 5 Andrew Fuerste-Henry 2021-01-13 22:16:35 UTC
Pushed to 20.05.x for 20.05.08
Comment 6 Victor Grousset/tuxayo 2021-01-21 23:13:48 UTC
Backported: Pushed to 19.11.x branch for 19.11.14