Bug 12982 - Patron category dropdown empty in header search form on patron entry page
Summary: Patron category dropdown empty in header search form on patron entry page
Status: RESOLVED DUPLICATE of bug 7380
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-23 18:53 UTC by Owen Leonard
Modified: 2015-07-08 21:46 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 12982 - Patron category dropdown empty in header search form on patron entry page (5.42 KB, patch)
2014-09-24 13:40 UTC, Owen Leonard
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 12982 - Patron category dropdown empty in header search form on patron entry page (5.45 KB, patch)
2014-10-06 12:34 UTC, Nicole C. Engard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2014-09-23 18:53:34 UTC
When on the patron entry page, the patron search form in the header has an empty dropdown for patron categories.
Comment 1 Owen Leonard 2014-09-24 13:40:55 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2014-09-24 13:42:00 UTC
This is my first try at modifying a template plugin, so I hope I've done it correctly. Should the addition have a test?
Comment 3 Nicole C. Engard 2014-10-06 12:34:48 UTC
Created attachment 32006 [details] [review]
[SIGNED-OFF] Bug 12982 - Patron category dropdown empty in header search form on patron entry page

The include file which contains the patron search form assumes that the
page in which it is included will have access to a set of patron
categories passed from the script. This is often not the case.

This patch adds a new template plugin for getting patron categories and
adds usage of it to patron-search.inc. The follow templates include
patron-search.inc:

members\boraccount.tt
members\deletemem.tt
members\files.tt
members\mancredit.tt
members\maninvoice.tt
members\member-flags.tt
members\member-password.tt
members\member.tt
members\memberentrygen.tt
members\members-update.tt
members\moremember.tt
members\notices.tt
members\pay.tt
members\paycollect.tt
members\purchase-suggestions.tt
members\readingrec.tt
members\routing-lists.tt
members\statistics.tt
tools\import_borrowers.tt
tools\picture-upload.tt

To test, view those pages and confirm that the patron category dropdown
is present in the patron header search at the top of the page (shown by
clicking the [+] link).

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Comment 4 Chris Cormack 2014-10-14 14:35:34 UTC
A test would be great Owen. 

t/Koha_Template_Plugin_Cache.t is a good starting point
Comment 5 Marcel de Rooy 2014-10-17 07:09:57 UTC
QA Comment:
Looks good. But I still have a question: Would this be the place to also provide the branches if they are not passed in?
For instance, moremember now shows the Categories, but it still does not give me Libraries?
I would not mind to pass QA on this patch, but if you want to include that now, please go ahead.

Changing status to reflect need for clarification :)
Comment 6 Owen Leonard 2014-10-21 13:13:24 UTC
(In reply to M. de Rooy from comment #5)
> QA Comment:
> Looks good. But I still have a question: Would this be the place to also
> provide the branches if they are not passed in?

Of course that would be a good idea, but since this bug specifically references patron categories I think it's out of its scope. However, I'll leave this as Failed QA since it still lacks a test.
Comment 7 Tomás Cohen Arazi 2015-07-08 21:46:09 UTC
This patch fixes an issue, but also implements a way to get the patron categories through TT plugins.
I think it has already been addressed by bug 7380. Feel free to report a new bug if the mentioned bug is already present for you (I didn't manage to reproduce it, on top of master/7380).

*** This bug has been marked as a duplicate of bug 7380 ***