Bug 12542

Summary: Tabs inconsistency in different circ-menu.inc uses
Product: Koha Reporter: Tomás Cohen Arazi <tomascohen>
Component: CirculationAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: gmcharlt, kyle.m.hall, kyle, nengard
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Medium patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 13470    
Attachments: Bug 12542 - Tabs inconsistency in different circ-menu.inc uses
[SIGNED OFF] Bug 12542: Tabs inconsistency in different circ-menu.inc uses
[PASSED QA] Bug 12542: Tabs inconsistency in different circ-menu.inc uses

Description Tomás Cohen Arazi 2014-07-08 13:47:11 UTC
There is a high degree of inconsistency in the circulation tabs. Pick anyone and some new will appear or dissapear.

To reproduce:
- Go to a user's detail page
- Change tab (the vertical ones).
- Notice that each time you choose another tab, some dissapear, some show.
Comment 1 Owen Leonard 2014-07-15 14:54:19 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2014-07-15 14:57:32 UTC
*** Bug 11382 has been marked as a duplicate of this bug. ***
Comment 3 Tomás Cohen Arazi 2014-07-15 15:04:35 UTC Comment hidden (obsolete)
Comment 4 Kyle M Hall 2014-07-18 12:15:46 UTC
> This is a piecemeal fix for a problem which really deserves a
> centralized solution, but at least it gets us back to consistency for
> the moment.

I agree. I would be much better in the long run to merge circ-menu.inc and circ-menu.tt, and pass into it a borrower dbic object ( or even have it get that via a TT plugin from just the borrowernumber ). Why do we have two variations of circ-menu?
Comment 5 Kyle M Hall 2014-07-18 12:27:35 UTC
Created attachment 29826 [details] [review]
[PASSED QA] Bug 12542: Tabs inconsistency in different circ-menu.inc uses

Differences between circ-menu.tt and circ-menu.inc always crop up when a
new menu item is added--usually only to circ-menu.inc as happened with
Bug 9261.

Other sidebar differences are present due to differences in the patron
data passed by various patron-related script to their templates. This
patch also irons out some of these inconsistencies.

To test, apply the patch and check out to a patron whose record has more
than just basic data: othername, country, patron attributes, street
number, road types, etc. View the following pages and compare the patron
data and visible tabs to confirm that they match:

circ/circulation.pl?borrowernumber=X
members/boraccount.pl?borrowernumber=X
members/files.pl?borrowernumber=X
members/mancredit.pl?borrowernumber=X
members/maninvoice.pl?borrowernumber=X
members/member-flags.pl?member=X
members/member-password.pl?member=X
members/moremember.pl?borrowernumber=X
members/notices.pl?borrowernumber=X
members/pay.pl?borrowernumber=X
members/paycollect.pl?borrowernumber=X
members/purchase-suggestions.pl?borrowernumber=X
members/readingrec.pl?borrowernumber=X
members/routing-lists.pl?borrowernumber=X
members/statistics.pl?borrowernumber=X
tools/viewlog.pl?do_it=1&modules=MEMBERS&modules=circulation&src=circ&object=X

The only difference I've found which is not fixed by this patch is the
display of extended patron attributes in the sidebar of moremember.pl.
This is a piecemeal fix for a problem which really deserves a
centralized solution, but at least it gets us back to consistency for
the moment.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Going through all tabs shows consistency is back. A mid term solution should
implement this in a centralized way. Great job Owen!
No koha-qa errors btw.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 6 Owen Leonard 2014-07-18 12:49:57 UTC
(In reply to Kyle M Hall from comment #4)
> Why do we have two variations of circ-menu?

Bug 3498 included the addition with this comment: "Adds a version of the include circ-menu.inc as circ-menu.tt this has the same functionality as the old include but does not require all the borrowers attributes to be passed as global
scoped variables"
Comment 7 Tomás Cohen Arazi 2014-07-18 15:53:34 UTC
Patch pushed to master.

Thanks Owen!