Bug 18219 - "Not checked out." problem message displays twice on local use.
Summary: "Not checked out." problem message displays twice on local use.
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Christopher Brannon
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on: 16530
Blocks:
  Show dependency treegraph
 
Reported: 2017-03-06 23:49 UTC by Christopher Brannon
Modified: 2017-04-04 18:57 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 18219: Remove duplicated code in returns.tt (3.61 KB, patch)
2017-03-07 20:25 UTC, Christopher Brannon
Details | Diff | Splinter Review
Bug 18219: Remove duplicated code in returns.tt (3.78 KB, patch)
2017-03-07 20:44 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 18219: Remove extra whitespace from returns.tt (7.18 KB, patch)
2017-03-07 22:20 UTC, Christopher Brannon
Details | Diff | Splinter Review
Bug 18219: Remove duplicated code in returns.tt (3.86 KB, patch)
2017-03-13 13:59 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18219: Remove extra whitespace from returns.tt (7.25 KB, patch)
2017-03-13 13:59 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 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! :)