Bug 18219

Summary: "Not checked out." problem message displays twice on local use.
Product: Koha Reporter: Christopher Brannon <cbrannon>
Component: CirculationAssignee: Christopher Brannon <cbrannon>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: gmcharlt, jonathan.druart, kyle.m.hall, kyle, veron
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16530
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 16530    
Bug Blocks:    
Attachments: Bug 18219: Remove duplicated code in returns.tt
Bug 18219: Remove duplicated code in returns.tt
Bug 18219: Remove extra whitespace from returns.tt
Bug 18219: Remove duplicated code in returns.tt
Bug 18219: Remove extra whitespace from returns.tt

Description Christopher Brannon 2017-03-06 23:49:33 UTC
When checking in an item that is not checked out, the problem message "Not checked out appears twice.

This seems to have occured with the last update to the master.  I did not see this before my master was updated.
Comment 1 Marc Véron 2017-03-07 09:47:12 UTC
Confirmed.
The duplication occurs in returns.tt lines 610 and 645.
Comment 2 Marc Véron 2017-03-07 10:04:16 UTC
Introduced by following Bug?

Bug 16530 - Add a circ sidebar navigation menu

There seem to be more duplications, e.g. 
[% IF ( errmsgloo.prevdebarred ) %]
Comment 3 Christopher Brannon 2017-03-07 16:02:23 UTC
(In reply to Marc Véron from comment #2)
> Introduced by following Bug?
> 
> Bug 16530 - Add a circ sidebar navigation menu
> 
> There seem to be more duplications, e.g. 
> [% IF ( errmsgloo.prevdebarred ) %]

Marc,
Thanks for finding this.  Do you mind if I try my hand at writing a patch for this?  This will be my first attempt.
Comment 4 Marc Véron 2017-03-07 16:29:10 UTC
(In reply to Christopher Brannon from comment #3)
> (In reply to Marc Véron from comment #2)
> > Introduced by following Bug?
> > 
> > Bug 16530 - Add a circ sidebar navigation menu
> > 
> > There seem to be more duplications, e.g. 
> > [% IF ( errmsgloo.prevdebarred ) %]
> 
> Marc,
> Thanks for finding this.  Do you mind if I try my hand at writing a patch
> for this?  This will be my first attempt.

Hi Christopher,

That is perfect, go ahead :-)
Comment 5 Christopher Brannon 2017-03-07 20:25:55 UTC
Created attachment 60907 [details] [review]
Bug 18219: Remove duplicated code in returns.tt

Removed lines of code that were duplicated in bug 16530.
Fixes alignment of a few lines of code surrounding duplication.

Modifies returns.tt

To test:
1) Check in items that are not checked out.
2) Note duplicated problem message (i.e. "Not checked out.")
3) Apply patch.
4) Repeat step 1.
5) Note the problem message is no longer duplicated.
Comment 6 Marc Véron 2017-03-07 20:44:08 UTC
Created attachment 60908 [details] [review]
Bug 18219: Remove duplicated code in returns.tt

Removed lines of code that were duplicated in bug 16530.
Fixes alignment of a few lines of code surrounding duplication.

Modifies returns.tt

To test:
1) Check in items that are not checked out.
2) Note duplicated problem message (i.e. "Not checked out.")
3) Apply patch.
4) Repeat step 1.
5) Note the problem message is no longer duplicated.

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Comment 7 Christopher Brannon 2017-03-07 22:20:56 UTC
Created attachment 60910 [details] [review]
Bug 18219: Remove extra whitespace from returns.tt
Comment 8 Jonathan Druart 2017-03-13 13:59:29 UTC
Created attachment 61037 [details] [review]
Bug 18219: Remove duplicated code in returns.tt

Removed lines of code that were duplicated in bug 16530.
Fixes alignment of a few lines of code surrounding duplication.

Modifies returns.tt

To test:
1) Check in items that are not checked out.
2) Note duplicated problem message (i.e. "Not checked out.")
3) Apply patch.
4) Repeat step 1.
5) Note the problem message is no longer duplicated.

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 9 Jonathan Druart 2017-03-13 13:59:34 UTC
Created attachment 61038 [details] [review]
Bug 18219: Remove extra whitespace from returns.tt

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 10 Kyle M Hall (khall) 2017-03-31 14:08:30 UTC
Pushed to master for 17.05, thanks again Chris!
Comment 11 Katrin Fischer 2017-04-02 17:29:46 UTC
Dependency is not in 16.11.x, so this should not be needed there.
Comment 12 Christopher Brannon 2017-04-03 14:31:17 UTC
(In reply to Katrin Fischer from comment #11)
> Dependency is not in 16.11.x, so this should not be needed there.

I don't know what this means.
Comment 13 Katrin Fischer 2017-04-04 06:28:43 UTC
This bug is supposed to be caused by bug 16530 (depends on: 16530 above). As this 16530 is not in 16.11.x, we should not need the bugfix for it. If this is wrong, please let me know.
Comment 14 Christopher Brannon 2017-04-04 15:08:34 UTC
No, but (In reply to Katrin Fischer from comment #13)
> This bug is supposed to be caused by bug 16530 (depends on: 16530 above). As
> this 16530 is not in 16.11.x, we should not need the bugfix for it. If this
> is wrong, please let me know.

No, but 16530 is pushed to 17.05.  So, why wouldn't this be pushed to 17.05 as well?
Comment 15 Jonathan Druart 2017-04-04 17:42:14 UTC
It is pushed to 17.05 (i.e. master), see comment 10.
Katrin was talking about not backporting it to the latest stable version (16.11.x).
Comment 16 Christopher Brannon 2017-04-04 17:47:51 UTC
Okay, I am confused then by the status of resolved fixed.  She said the bug isn't in 16.11.x and we shouldn't need a bug fix.  There was nothing mentioned about it being needed for 17.05.  Shouldn't it be pushed to master?
Comment 17 Christopher Brannon 2017-04-04 17:50:15 UTC
Ignore me.  I am confused today.  I guess I am just confused by the status.  I get that it is pushed to master.  :/  Sorry.
Comment 18 Katrin Fischer 2017-04-04 18:46:22 UTC
Release Manager sets the status to 'pushed to master' after pushing - I check all those if they apply to my branch 16.11.x - if not, I change to Resolved Fixed, because there is nothing more to to. If I push them, I change to Pushed to stable, which then is checked by the other Rmaints for backṕorting to their versions.
Comment 19 Christopher Brannon 2017-04-04 18:57:45 UTC
(In reply to Katrin Fischer from comment #18)
> Release Manager sets the status to 'pushed to master' after pushing - I
> check all those if they apply to my branch 16.11.x - if not, I change to
> Resolved Fixed, because there is nothing more to to. If I push them, I
> change to Pushed to stable, which then is checked by the other Rmaints for
> backṕorting to their versions.

Thank you for the clarification! :)