Bug 27749 - Phase out jquery.cookie.js: Search to hold
Summary: Phase out jquery.cookie.js: Search to hold
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 23944 28043
Blocks: 27750
  Show dependency treegraph
 
Reported: 2021-02-22 15:11 UTC by Owen Leonard
Modified: 2021-12-13 21:12 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This patch modifies the "search to hold" process for patrons and clubs so that the newer jquery-cookie plugin is used instead of jquery.cookie.
Version(s) released in:
21.05.00
Circulation function:


Attachments
Bug 27749: Phase out jquery.cookie.js: Search to hold (3.33 KB, patch)
2021-02-22 17:28 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 27749: Phase out jquery.cookie.js: Search to hold (3.37 KB, patch)
2021-02-24 20:11 UTC, David Nind
Details | Diff | Splinter Review
Bug 27749: Phase out jquery.cookie.js: Search to hold (3.49 KB, patch)
2021-04-03 21:53 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2021-02-22 15:11:26 UTC
The "Search to hold" process uses a cookie to remember which patron the hold will be placed for.

This process should use the newer cookie library, js-cookie. This patch will correct two similar instances:

- In members-menu.js (search to hold for a patron)
- In clubs.tt (search to hold for a club)
Comment 1 Owen Leonard 2021-02-22 17:28:48 UTC
Created attachment 117172 [details] [review]
Bug 27749: Phase out jquery.cookie.js: Search to hold

This patch modifies the "search to hold" process for patrons and clubs
so that the newer jquery-cookie plugin is used instead of jquery.cookie.

To test, apply the patch and locate a patron in the staff interface.

 - From the patron checkout or details page, click "Search to hold" in
   the toolbar."
 - Perform a catalog search which will return results.
 - On the search results page you should see a "Place hold for..." link
   with the correct patron information under each result.
 - In the toolbar above the search results you should see a "Place hold"
   button with a dropdown menu which also references the patron you
   selected.
 - Test that each option works to place a hold for your patron.
 - Test that the "Forget..." menu option works to remove "place hold
   for" options.
 - Test that your "Place hold for" option is also remembered on the
   bibliographic detail page.

To test the changes to Patron Clubs:

 - If necessary, create a patron club:
   https://koha-community.org/manual/20.11/en/html/tools.html?highlight=club#patron-clubs
 - Add one or more patrons to the club:
   https://koha-community.org/manual/20.11/en/html/tools.html?highlight=club#enrolling-a-patron-in-a-club-from-the-staff-client
 - From the patron clubs page, choose "Search to hold" from the club's
   "Actions" menu.
 - Perform the same tests above.
Comment 2 David Nind 2021-02-24 20:11:31 UTC
Created attachment 117281 [details] [review]
Bug 27749: Phase out jquery.cookie.js: Search to hold

This patch modifies the "search to hold" process for patrons and clubs
so that the newer jquery-cookie plugin is used instead of jquery.cookie.

To test, apply the patch and locate a patron in the staff interface.

 - From the patron checkout or details page, click "Search to hold" in
   the toolbar."
 - Perform a catalog search which will return results.
 - On the search results page you should see a "Place hold for..." link
   with the correct patron information under each result.
 - In the toolbar above the search results you should see a "Place hold"
   button with a dropdown menu which also references the patron you
   selected.
 - Test that each option works to place a hold for your patron.
 - Test that the "Forget..." menu option works to remove "place hold
   for" options.
 - Test that your "Place hold for" option is also remembered on the
   bibliographic detail page.

To test the changes to Patron Clubs:

 - If necessary, create a patron club:
   https://koha-community.org/manual/20.11/en/html/tools.html?highlight=club#patron-clubs
 - Add one or more patrons to the club:
   https://koha-community.org/manual/20.11/en/html/tools.html?highlight=club#enrolling-a-patron-in-a-club-from-the-staff-client
 - From the patron clubs page, choose "Search to hold" from the club's
   "Actions" menu.
 - Perform the same tests above.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2021-02-24 20:21:34 UTC
Note that for the patron clubs, their is no 'Place to hold' options on the record detail screen - this was also the case in 20.11.x. Everything else works as per the test plan.
Comment 4 Katrin Fischer 2021-03-04 14:26:16 UTC
I think this might not work if you do a patron first and then a club, without "forgetting" in between. I am still stuck with the patron... But I can't verify, as I am also missing the "Forget" link in the pull down on the staff detail page.
Comment 5 Jonathan Druart 2021-03-17 07:38:09 UTC
(In reply to Katrin Fischer from comment #4)
> I think this might not work if you do a patron first and then a club,
> without "forgetting" in between. I am still stuck with the patron... But I
> can't verify, as I am also missing the "Forget" link in the pull down on the
> staff detail page.

Can you detail what's wrong here, I am not sure I am following you. I do see the forget link and the test plan works as expected.

Setting back to NQA.
Comment 6 Katrin Fischer 2021-03-17 07:50:22 UTC
(In reply to Jonathan Druart from comment #5)
> (In reply to Katrin Fischer from comment #4)
> > I think this might not work if you do a patron first and then a club,
> > without "forgetting" in between. I am still stuck with the patron... But I
> > can't verify, as I am also missing the "Forget" link in the pull down on the
> > staff detail page.
> 
> Can you detail what's wrong here, I am not sure I am following you. I do see
> the forget link and the test plan works as expected.
> 
> Setting back to NQA.

I didn't have any forget link visible. Where do you see it?
Comment 7 Jonathan Druart 2021-03-17 09:21:34 UTC
https://snipboard.io/3Iey1d.jpg
Comment 8 Katrin Fischer 2021-04-03 21:46:24 UTC
(In reply to Jonathan Druart from comment #7)
> https://snipboard.io/3Iey1d.jpg

It looks like we have the Forget on the result page, but not on the detail page. I filed bug 28085 for this.
Comment 9 Katrin Fischer 2021-04-03 21:53:21 UTC
Created attachment 119164 [details] [review]
Bug 27749: Phase out jquery.cookie.js: Search to hold

This patch modifies the "search to hold" process for patrons and clubs
so that the newer jquery-cookie plugin is used instead of jquery.cookie.

To test, apply the patch and locate a patron in the staff interface.

 - From the patron checkout or details page, click "Search to hold" in
   the toolbar."
 - Perform a catalog search which will return results.
 - On the search results page you should see a "Place hold for..." link
   with the correct patron information under each result.
 - In the toolbar above the search results you should see a "Place hold"
   button with a dropdown menu which also references the patron you
   selected.
 - Test that each option works to place a hold for your patron.
 - Test that the "Forget..." menu option works to remove "place hold
   for" options.
 - Test that your "Place hold for" option is also remembered on the
   bibliographic detail page.

To test the changes to Patron Clubs:

 - If necessary, create a patron club:
   https://koha-community.org/manual/20.11/en/html/tools.html?highlight=club#patron-clubs
 - Add one or more patrons to the club:
   https://koha-community.org/manual/20.11/en/html/tools.html?highlight=club#enrolling-a-patron-in-a-club-from-the-staff-client
 - From the patron clubs page, choose "Search to hold" from the club's
   "Actions" menu.
 - Perform the same tests above.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Jonathan Druart 2021-04-06 13:57:53 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 11 Fridolin Somers 2021-04-15 11:07:48 UTC
Enhancement not pushed to 20.11.x