Bug 12525

Summary: Patron Lists aren't added to list pulldown when created from Patron search
Product: Koha Reporter: Kyle M Hall <kyle>
Component: PatronsAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: chris, gmcharlt, jonathan.druart, joonas.kylmala, katrin.fischer, kyle.m.hall, liz, mtompset, tomascohen
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 12525: FIX patron lists dropdown is empty
Bug 12525: Prevent adding several patron lists with the same name
Bug 12525: FIX patron lists dropdown is empty
Bug 12525: Prevent adding several patron lists with the same name
Bug 12525: Prevent adding several patron lists with the same name
Bug 12525: FIX patron lists dropdown is empty
Bug 12525: Prevent adding several patron lists with the same name
[PASSED QA] Bug 12525: FIX patron lists dropdown is empty
[PASSED QA] Bug 12525: Prevent adding several patron lists with the same name

Description Kyle M Hall 2014-07-03 12:30:51 UTC
The new ajax patron search needs to add newly created patron lists to the pulldown dynamically since the page is no longer reloaded. In addition, the notice should fade out after a given amount of time so another addition of patrons to a list is more prominent.
Comment 1 Kyle M Hall 2014-07-03 13:19:02 UTC
It also appears that existing patron lists don't always show in the pulldown. Increasing severity.
Comment 2 Jonathan Druart 2015-07-15 10:57:56 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2015-07-15 10:58:05 UTC Comment hidden (obsolete)
Comment 4 Mark Tompsett 2015-07-18 20:22:21 UTC Comment hidden (obsolete)
Comment 5 Mark Tompsett 2015-07-18 20:22:26 UTC Comment hidden (obsolete)
Comment 6 Katrin Fischer 2015-09-01 21:36:56 UTC
There is something going wrong here:

1) Go to patron search home page
2) Launch a search (I used "d")
3) Check one patron, say [New list] from pull down
4) Name the list, hit the save button behind it
5) Check another patron, pull down list still shows newly created list - hit save again
6) Another list with the same name is added

It will always create a new list - even if you switch the pull down to another preexisting list.
Comment 7 Katrin Fischer 2015-09-01 21:38:45 UTC
Hm interesting: It doesn't really add a new list, but it adds another entry to the drop down every time you hit 'save'. Once you reload the page the double ups in the pull down are gone.
Comment 8 Jonathan Druart 2015-09-02 08:33:19 UTC Comment hidden (obsolete)
Comment 9 Jonathan Druart 2015-09-02 08:34:10 UTC
Katrin, thanks for the catch! Weird, I was sure I had tested this one correctly.
Comment 10 Joonas Kylmälä 2015-09-02 12:45:47 UTC
I cannot even test this because in the latest master it doesn't show any lists which I have created. But if I click the button "Patron lists" there it shows the lists I have created.
Comment 11 Jonathan Druart 2015-09-02 12:55:08 UTC
(In reply to Joonas Kylmälä from comment #10)
> I cannot even test this because in the latest master it doesn't show any
> lists which I have created. But if I click the button "Patron lists" there
> it shows the lists I have created.

This is fixed by the first patch.
Comment 12 Chris Cormack 2015-09-03 03:02:53 UTC Comment hidden (obsolete)
Comment 13 Chris Cormack 2015-09-03 03:03:04 UTC Comment hidden (obsolete)
Comment 14 Katrin Fischer 2015-09-03 22:49:00 UTC
Created attachment 42370 [details] [review]
[PASSED QA] Bug 12525: FIX patron lists dropdown is empty

On the patrons home page, the dropdown list is not populated.

Test plan:
1/ Go on the patrons home page (members/members-home.pl)
2/ Launch a search
3/ The dropdown list close to "Add selected patrons to" should contain
all your patron lists

NOTE: Initially tested with both which created lists.
      git reset --hard origin/master
      And then dropdown list was missing them.
      Applied just this one, and they were listed.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 15 Katrin Fischer 2015-09-03 22:49:41 UTC
Created attachment 42371 [details] [review]
[PASSED QA] Bug 12525: Prevent adding several patron lists with the same name

If you add patron to a patron list, from the patron search result, a
list is created when you click on "Save".
The list is considered as new each time.

To reproduce:
1/ Launch a patron search
2/ Select 1 patron, and create a new list 'aaa'
3/ Select another patron and click Save again
2 lists are created

Test plan:
1/ Launch a patron search
2/ Select 1 patron, and create a new list 'aaa'
The dropdown list should be populated with this new list, and should be
selected
3/ Select another patron and click Save again
Only 1 list should be created

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 16 Tomás Cohen Arazi 2015-09-07 15:00:24 UTC
Patches pushed to master.

Thanks Jonathan!
Comment 17 Chris Cormack 2015-09-22 16:44:28 UTC
Pushed to 3.20.x will be in 3.20.4
Comment 18 Liz Rea 2015-09-22 22:28:50 UTC
Pushed to 3.18 will be in 3.18.11