In the "neworderempty.pl" file, as we are filling the template->param(*) info beginning on line 346, we have a value appearing twice: - in line 359, authorisedbyname => $basket->{'authorisedbyname'}, - in line 365, authorisedbyname => $borrower->{'firstname'} . " " . $borrower->{'surname'}, Moreover, this line 365 generates log lines like the following: [Tue Jan 31 14:39:41 2012] neworderempty.pl: Use of uninitialized value in concatenation (.) or string at /home/asaurat/workspace/versions/community/acqui/neworderempty.pl line 346. [Tue Jan 31 14:39:41 2012] neworderempty.pl: Use of uninitialized value in concatenation (.) or string at /home/asaurat/workspace/versions/community/acqui/neworderempty.pl line 346. These log entries are easy to correct if we keep the $borrower version, but that's my question: which line should we keep? Or maybe both values can be ok but one has priority over the other one? This authorisedbyname variable is linked to a "Managed by:" label in the template.
As seen with kf, getBasket builds authorisedbyname using concat( b.firstname,' ',b.surname) AS authorisedbyname, from borrowers So in both cases we have the same information. But maybe can problems arise if the borrower has been deleted -> to be handled.
Still valid, something for a small clean-up patch: authorisedbyname => $basket->{'authorisedbyname'}, closedate => $basket->{'closedate'}, # order details suggestionid => $suggestion->{suggestionid}, surnamesuggestedby => $suggestion->{surnamesuggestedby}, firstnamesuggestedby => $suggestion->{firstnamesuggestedby}, biblionumber => $biblionumber, uncertainprice => $data->{'uncertainprice'}, authorisedbyname => $borrower->{'firstname'} . " " . $borrower->{'surname'},
Created attachment 37332 [details] [review] Bug 7480: Don't display current logged in user as basket manager The "Managed by" field displayed on creating/editing an order is always the name of the logged in user. To reproduce: 1/ Log in with patron A 2/ Create a basket 3/ Create an order 4/ Log in with patron B 5/ Edit the order 6/ The "Managed by" line is "patron B" Test plan: Apply the patch and confirm that the "patron A" is always the basket manager.
Created attachment 37338 [details] [review] [Signed-off] Bug 7480: Don't display current logged in user as basket manager The "Managed by" field displayed on creating/editing an order is always the name of the logged in user. To reproduce: 1/ Log in with patron A 2/ Create a basket 3/ Create an order 4/ Log in with patron B 5/ Edit the order 6/ The "Managed by" line is "patron B" Test plan: Apply the patch and confirm that the "patron A" is always the basket manager. Followed test plan. Works as expected. Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 37511 [details] [review] [PASSED QA] Bug 7480: Don't display current logged in user as basket manager The "Managed by" field displayed on creating/editing an order is always the name of the logged in user. To reproduce: 1/ Log in with patron A 2/ Create a basket 3/ Create an order 4/ Log in with patron B 5/ Edit the order 6/ The "Managed by" line is "patron B" Test plan: Apply the patch and confirm that the "patron A" is always the basket manager. Followed test plan. Works as expected. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Funny noone ever noticed the visible effect of this bug.
Patch pushed to master. Thanks Jonathan!
Pushed to 3.18.x will be in 3.18.6