Bug 27137 - Move item doesn't show the title of the target record
Summary: Move item doesn't show the title of the target record
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: 20.05
Hardware: All All
: P5 - low minor (vote)
Assignee: Aleisha Amohia
QA Contact: Nick Clemens
URL:
Keywords:
Depends on: 11529
Blocks:
  Show dependency treegraph
 
Reported: 2020-12-03 01:23 UTC by Aleisha Amohia
Modified: 2022-06-06 20:25 UTC (History)
5 users (show)

See Also:
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


Attachments
Bug 27137: Correctly show biblio title after successfully moving item (1.89 KB, patch)
2020-12-03 02:53 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27137: Correctly show biblio title after successfully moving item (1.94 KB, patch)
2020-12-03 12:24 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 27137: Correctly show biblio title after successfully moving item (2.00 KB, patch)
2020-12-03 14:05 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 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 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