Description
Lucas Gass (lukeg)
2024-02-09 23:55:46 UTC
Created attachment 161998 [details] [review] Bug 36064: Add holds with cancellation request info to staff interface main page To Test: 1. APPLY PATCH, restart_all 2. Make some holds 3. Make sure there is a Default waiting hold cancellation policy. 4. Make the holds watiing by checking them in. 5. Go to the OPAC and request to cancel. 6. Go to the staff interface home page, you should see 'Holds with cancellation requests: X'. 7. Cancel the hold. 8. Back on the main page it should not be counted again the number for 'Holds with cancellation requests: X' 9. Log in as a staff member with Staff access but without circulate_remaining_permissions. 10. You should not see the 'Holds with cancellation requests: X' line. Created attachment 161999 [details] [review] Bug 36064: Add holds with cancellation request info to staff interface main page To Test: 1. APPLY PATCH, restart_all 2. Make some holds 3. Make sure there is a Default waiting hold cancellation policy. 4. Make the holds watiing by checking them in. 5. Go to the OPAC and request to cancel. 6. Go to the staff interface home page, you should see 'Holds with cancellation requests: X'. 7. Cancel the hold. 8. Back on the main page it should not be counted again the number for 'Holds with cancellation requests: X' 9. Log in as a staff member with Staff access but without circulate_remaining_permissions. 10. You should not see the 'Holds with cancellation requests: X' line. Signed-off-by: David Nind <david@davidnind.com> Created attachment 162002 [details] [review] Bug 36064: Add holds with cancellation request info to staff interface main page To Test: 1. APPLY PATCH, restart_all 2. Make some holds 3. Make sure there is a Default waiting hold cancellation policy. 4. Make the holds watiing by checking them in. 5. Go to the OPAC and request to cancel. 6. Go to the staff interface home page, you should see 'Holds with cancellation requests: X'. 7. Cancel the hold. 8. Back on the main page it should not be counted again the number for 'Holds with cancellation requests: X' 9. Log in as a staff member with Staff access but without circulate_remaining_permissions. 10. You should not see the 'Holds with cancellation requests: X' line. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Works as described. However, the link to the cancelled holds page/tab isn't 100%. It takes you to the page, but doesn't always bring up the tab. I think it is an issue with the page/tab, not this patch. Created attachment 162105 [details] [review] Bug 36064: (follow-up) Activate correct tab This patch makes a change to the JavaScript on waitingreserves.pl so that the correct tab is activated if you follow the "Holds with cancellation requests" link on the home page. The page has code to activate the last viewed tab, but I've modified it so that if there is a location hash ('waitingreserves.pl#tab') the tab specified in the hash is selected instead of the last used tab. If there is no location hash the last active tab will be activated. I've also corrected the location hash in the link on the home page. To test, apply the patch and follow the "Holds with cancellation requests" link. The "Holds with cancellation requests" tab should be active. Click a different tab, e.g. "Holds waiting." Go the the circulation home page, then click the link for "Holds awaiting pickup." The tab you selected should be active. Just a note - this bug is dependent on bug 36063, which currently doesn't apply (and is also currently Failed QA). Created attachment 165796 [details] [review] Bug 36064: Add holds with cancellation request info to staff interface main page To Test: 1. APPLY PATCH, restart_all 2. Make some holds 3. Make sure there is a Default waiting hold cancellation policy. 4. Make the holds watiing by checking them in. 5. Go to the OPAC and request to cancel. 6. Go to the staff interface home page, you should see 'Holds with cancellation requests: X'. 7. Cancel the hold. 8. Back on the main page it should not be counted again the number for 'Holds with cancellation requests: X' 9. Log in as a staff member with Staff access but without circulate_remaining_permissions. 10. You should not see the 'Holds with cancellation requests: X' line. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Current depends: 22456 Created attachment 165797 [details] [review] Bug 36064: (follow-up) Activate correct tab This patch makes a change to the JavaScript on waitingreserves.pl so that the correct tab is activated if you follow the "Holds with cancellation requests" link on the home page. The page has code to activate the last viewed tab, but I've modified it so that if there is a location hash ('waitingreserves.pl#tab') the tab specified in the hash is selected instead of the last used tab. If there is no location hash the last active tab will be activated. I've also corrected the location hash in the link on the home page. To test, apply the patch and follow the "Holds with cancellation requests" link. The "Holds with cancellation requests" tab should be active. Click a different tab, e.g. "Holds waiting." Go the the circulation home page, then click the link for "Holds awaiting pickup." The tab you selected should be active. Created attachment 165798 [details] [review] Bug 36064: Add holds with cancellation request info to staff interface main page To Test: 1. APPLY PATCH, restart_all 2. Make some holds 3. Make sure there is a Default waiting hold cancellation policy. 4. Make the holds watiing by checking them in. 5. Go to the OPAC and request to cancel. 6. Go to the staff interface home page, you should see 'Holds with cancellation requests: X'. 7. Cancel the hold. 8. Back on the main page it should not be counted again the number for 'Holds with cancellation requests: X' 9. Log in as a staff member with Staff access but without circulate_remaining_permissions. 10. You should not see the 'Holds with cancellation requests: X' line. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Created attachment 165799 [details] [review] Bug 36064: (follow-up) Activate correct tab This patch makes a change to the JavaScript on waitingreserves.pl so that the correct tab is activated if you follow the "Holds with cancellation requests" link on the home page. The page has code to activate the last viewed tab, but I've modified it so that if there is a location hash ('waitingreserves.pl#tab') the tab specified in the hash is selected instead of the last used tab. If there is no location hash the last active tab will be activated. I've also corrected the location hash in the link on the home page. To test, apply the patch and follow the "Holds with cancellation requests" link. The "Holds with cancellation requests" tab should be active. Click a different tab, e.g. "Holds waiting." Go the the circulation home page, then click the link for "Holds awaiting pickup." The tab you selected should be active. (In reply to David Nind from comment #6) > Just a note - this bug is dependent on bug 36063, which currently doesn't > apply (and is also currently Failed QA). I hope no one minds, I rebased this one on main so that it could move forward without waiting for Bug 36063. The features don't really depend on each other.
> I hope no one minds, I rebased this one on main so that it could move
> forward without waiting for Bug 36063. The features don't really depend on
> each other.
I appreciate it, Owen!
sha1/fake ancestor error when trying to apply the patches: git bz apply 36064 Bug 36064 - Add Holds with cancellation requests info to intranet-main page 165798 - Bug 36064: Add holds with cancellation request info to staff interface main page 165799 - Bug 36064: (follow-up) Activate correct tab Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 36064: Add holds with cancellation request info to staff interface main page error: sha1 information is lacking or useless (mainpage.pl). error: could not build fake ancestor Patch failed at 0001 Bug 36064: Add holds with cancellation request info to staff interface main page Created attachment 165809 [details] [review] Bug 36064: Add holds with cancellation request info to staff interface main page To Test: 1. APPLY PATCH, restart_all 2. Make some holds 3. Make sure there is a Default waiting hold cancellation policy. 4. Make the holds watiing by checking them in. 5. Go to the OPAC and request to cancel. 6. Go to the staff interface home page, you should see 'Holds with cancellation requests: X'. 7. Cancel the hold. 8. Back on the main page it should not be counted again the number for 'Holds with cancellation requests: X' 9. Log in as a staff member with Staff access but without circulate_remaining_permissions. 10. You should not see the 'Holds with cancellation requests: X' line. Created attachment 165810 [details] [review] Bug 36064: (follow-up) Activate correct tab This patch makes a change to the JavaScript on waitingreserves.pl so that the correct tab is activated if you follow the "Holds with cancellation requests" link on the home page. The page has code to activate the last viewed tab, but I've modified it so that if there is a location hash ('waitingreserves.pl#tab') the tab specified in the hash is selected instead of the last used tab. If there is no location hash the last active tab will be activated. I've also corrected the location hash in the link on the home page. To test, apply the patch and follow the "Holds with cancellation requests" link. The "Holds with cancellation requests" tab should be active. Click a different tab, e.g. "Holds waiting." Go the the circulation home page, then click the link for "Holds awaiting pickup." The tab you selected should be active. Rebased my patch and attached it back with Owen's as well. Created attachment 165823 [details] [review] Bug 36064: Add holds with cancellation request info to staff interface main page To Test: 1. APPLY PATCH, restart_all 2. Make some holds 3. Make sure there is a Default waiting hold cancellation policy. 4. Make the holds watiing by checking them in. 5. Go to the OPAC and request to cancel. 6. Go to the staff interface home page, you should see 'Holds with cancellation requests: X'. 7. Cancel the hold. 8. Back on the main page it should not be counted again the number for 'Holds with cancellation requests: X' 9. Log in as a staff member with Staff access but without circulate_remaining_permissions. 10. You should not see the 'Holds with cancellation requests: X' line. Signed-off-by: David Nind <david@davidnind.com> Created attachment 165824 [details] [review] Bug 36064: (follow-up) Activate correct tab This patch makes a change to the JavaScript on waitingreserves.pl so that the correct tab is activated if you follow the "Holds with cancellation requests" link on the home page. The page has code to activate the last viewed tab, but I've modified it so that if there is a location hash ('waitingreserves.pl#tab') the tab specified in the hash is selected instead of the last used tab. If there is no location hash the last active tab will be activated. I've also corrected the location hash in the link on the home page. To test, apply the patch and follow the "Holds with cancellation requests" link. The "Holds with cancellation requests" tab should be active. Click a different tab, e.g. "Holds waiting." Go the the circulation home page, then click the link for "Holds awaiting pickup." The tab you selected should be active. Signed-off-by: David Nind <david@davidnind.com> Testing notes (using KTD): 1. Enable patrons to cancel hold requests: 1.1 Go to Administration > Circulation and fine rules > Default waiting hold cancellation policy 1.2 For All and All set cancellation allowed to Yes and click +Add 2. Have some patron hold cancellation requests: 2.1 Log in as the patron you created the holds for (change their username and password) 2.2 In the OPAC under Summary > Holds, click 'Request to cancel' for one of the waiting holds I believe this could make a great and save addition to 24.05 still. Could you update mainpage.pl to only execute the query if the results will be visible? Created attachment 170654 [details] [review] Bug 36064: Add holds with cancellation request info to staff interface main page To Test: 1. APPLY PATCH, restart_all 2. Make some holds 3. Make sure there is a Default waiting hold cancellation policy. 4. Make the holds watiing by checking them in. 5. Go to the OPAC and request to cancel. 6. Go to the staff interface home page, you should see 'Holds with cancellation requests: X'. 7. Cancel the hold. 8. Back on the main page it should not be counted again the number for 'Holds with cancellation requests: X' 9. Log in as a staff member with Staff access but without circulate_remaining_permissions. 10. You should not see the 'Holds with cancellation requests: X' line. Signed-off-by: David Nind <david@davidnind.com> Created attachment 170655 [details] [review] Bug 36064: (follow-up) Activate correct tab This patch makes a change to the JavaScript on waitingreserves.pl so that the correct tab is activated if you follow the "Holds with cancellation requests" link on the home page. The page has code to activate the last viewed tab, but I've modified it so that if there is a location hash ('waitingreserves.pl#tab') the tab specified in the hash is selected instead of the last used tab. If there is no location hash the last active tab will be activated. I've also corrected the location hash in the link on the home page. To test, apply the patch and follow the "Holds with cancellation requests" link. The "Holds with cancellation requests" tab should be active. Click a different tab, e.g. "Holds waiting." Go the the circulation home page, then click the link for "Holds awaiting pickup." The tab you selected should be active. Signed-off-by: David Nind <david@davidnind.com> Created attachment 173159 [details] [review] Bug 36064: Add holds with cancellation request info to staff interface main page To Test: 1. APPLY PATCH, restart_all 2. Make some holds 3. Make sure there is a Default waiting hold cancellation policy. 4. Make the holds watiing by checking them in. 5. Go to the OPAC and request to cancel. 6. Go to the staff interface home page, you should see 'Holds with cancellation requests: X'. 7. Cancel the hold. 8. Back on the main page it should not be counted again the number for 'Holds with cancellation requests: X' 9. Log in as a staff member with Staff access but without circulate_remaining_permissions. 10. You should not see the 'Holds with cancellation requests: X' line. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 173160 [details] [review] Bug 36064: (follow-up) Activate correct tab This patch makes a change to the JavaScript on waitingreserves.pl so that the correct tab is activated if you follow the "Holds with cancellation requests" link on the home page. The page has code to activate the last viewed tab, but I've modified it so that if there is a location hash ('waitingreserves.pl#tab') the tab specified in the hash is selected instead of the last used tab. If there is no location hash the last active tab will be activated. I've also corrected the location hash in the link on the home page. To test, apply the patch and follow the "Holds with cancellation requests" link. The "Holds with cancellation requests" tab should be active. Click a different tab, e.g. "Holds waiting." Go the the circulation home page, then click the link for "Holds awaiting pickup." The tab you selected should be active. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 173161 [details] [review] Bug 36064: (QA follow-up) Simplify and tidy Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Nice improvement. Kyle's request was addressed and the QA scripts are happy with my follow-up. Please note that Koha::Holds->waiting returns a(n instantiated) resultset and thus there's no need for the extra ->search() call. Pushed for 24.11! Well done everyone, thank you! Enhancement, no 24.05.x backport |