Bug 36455 - Default the hold queue link to your logged in library
Summary: Default the hold queue link to your logged in library
Status: Patch doesn't apply
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Jason Robb
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 36456
  Show dependency treegraph
 
Reported: 2024-03-28 14:27 UTC by Lisette Scheer
Modified: 2025-06-13 05:03 UTC (History)
9 users (show)

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


Attachments
Bug 36455: Default the hold queue link to your logged in library (1.64 KB, patch)
2025-02-13 18:48 UTC, Jason Robb
Details | Diff | Splinter Review
Bug 36455: Default the hold queue link to your logged in library (1.64 KB, patch)
2025-02-13 18:56 UTC, Jason Robb
Details | Diff | Splinter Review
Bug 36455: Default the hold queue link to your logged in library (1.70 KB, patch)
2025-02-13 19:01 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 36455: (follow-up) Default the hold queue link to your logged in library (1.91 KB, patch)
2025-03-13 17:21 UTC, Jason Robb
Details | Diff | Splinter Review
Bug 36455: Default the hold queue link to your logged in library (1.76 KB, patch)
2025-03-13 17:22 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 36455: (follow-up) Default the hold queue link to your logged in library (1.98 KB, patch)
2025-03-13 17:22 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 36455: (follow-up) Changed html filters to uri (3.01 KB, patch)
2025-04-10 17:17 UTC, Jason Robb
Details | Diff | Splinter Review
Bug 36455: Default the hold queue link to your logged in library (1.76 KB, patch)
2025-04-10 18:12 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 36455: (follow-up) Default the hold queue link to your logged in library (1.98 KB, patch)
2025-04-10 18:12 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 36455: (follow-up) Changed html filters to uri (3.08 KB, patch)
2025-04-10 18:12 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lisette Scheer 2024-03-28 14:27:45 UTC
To reduce clicks for library staff, defaulting the hold queue link on circulation home to the logged in library would be helpful, either as an option or as the default behavior with the option to run it for a different branch from the queue.
Comment 1 Jason Robb 2024-11-21 17:04:09 UTC
Agree, this saves clicks.

I'm currently using jQuery for this:

//Point holds queue button directly to logged in library's queue

var libcode = $('#logged-in-info-full .logged-in-branch-code').text();

$('#circ_circulation-home .circ-button:contains("Holds queue")').attr('href', '/cgi-bin/koha/circ/view_holdsqueue.pl?branchlimit=' + libcode +'&itemtypeslimit=&ccodeslimit=&locationslimit=&run_report=1');
Comment 2 Jason Robb 2025-02-13 18:48:48 UTC
Created attachment 178043 [details] [review]
Bug 36455: Default the hold queue link to your logged in library

This patch reduces the number of click for the average librarian user.

To test:
1. Change your logged in branch to something other than Centerville
2. Navigate to the circulation home page
3. Click on the Holds queue link
4. Observe that you have to hit Submit to continue
5. Apply patch
6. Repeat steps 1 and 2
7. Observe that the holds queue comes up with your branch preselected
Comment 3 Jason Robb 2025-02-13 18:56:49 UTC
Created attachment 178044 [details] [review]
Bug 36455: Default the hold queue link to your logged in library

This patch reduces the number of click for the average librarian user.

To test:
1. Change your logged in branch to something other than Centerville
2. Navigate to the circulation home page
3. Click on the Holds queue link
4. Observe that you have to hit Submit to continue
5. Apply patch
6. Repeat steps 1 and 2
7. Observe that the holds queue comes up with your branch preselected

Mentored-by: "Lisette Scheer <lisette@bywatersolutions.com>"
Comment 4 Lucas Gass (lukeg) 2025-02-13 19:01:38 UTC
Created attachment 178045 [details] [review]
Bug 36455: Default the hold queue link to your logged in library

This patch reduces the number of click for the average librarian user.

To test:
1. Change your logged in branch to something other than Centerville
2. Navigate to the circulation home page
3. Click on the Holds queue link
4. Observe that you have to hit Submit to continue
5. Apply patch
6. Repeat steps 1 and 2
7. Observe that the holds queue comes up with your branch preselected

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 5 Lucas Gass (lukeg) 2025-02-13 19:04:10 UTC
Signing off here because I like avoiding clicks. Do we want to introduce this same behavior to the same link in circ-nav.inc?
Comment 6 Andrew Fuerste-Henry 2025-02-13 19:07:25 UTC
(In reply to Lucas Gass (lukeg) from comment #5)
> Signing off here because I like avoiding clicks. Do we want to introduce
> this same behavior to the same link in circ-nav.inc?

Our comments collided midair. Apparently I'm meaner than Lucas, was gonna Fail QA on this

Works as described, strictly, but this patch doesn't change the behavior of the Holds Queue link on the circ sidebar, resulting in confusing inconsistency.

To recreate, with patch applied:
1 - go to circ homepage
2 - click holds queue, see it loads the queue for your logged-in branch immediately
3 - click Holds Awaiting Pickup in the left sidebar
4 - click Holds Queue in the left sidebar
5 - you're back at the queue, but this time it has not loaded results immediately
Comment 7 Marcel de Rooy 2025-03-07 10:35:51 UTC
Please look at the previous comment. It needs attention. Left or right?
Comment 8 Jason Robb 2025-03-13 17:21:10 UTC
Created attachment 179276 [details] [review]
Bug 36455: (follow-up) Default the hold queue link to your logged in library

Also fixed the link on circ-nav and the breadcrumbs links.
Comment 9 Andrew Fuerste-Henry 2025-03-13 17:22:50 UTC
Created attachment 179277 [details] [review]
Bug 36455: Default the hold queue link to your logged in library

This patch reduces the number of click for the average librarian user.

To test:
1. Change your logged in branch to something other than Centerville
2. Navigate to the circulation home page
3. Click on the Holds queue link
4. Observe that you have to hit Submit to continue
5. Apply patch
6. Repeat steps 1 and 2
7. Observe that the holds queue comes up with your branch preselected

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Comment 10 Andrew Fuerste-Henry 2025-03-13 17:22:52 UTC
Created attachment 179278 [details] [review]
Bug 36455: (follow-up) Default the hold queue link to your logged in library

Also fixed the link on circ-nav and the breadcrumbs links.

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Comment 11 Phil Ringnalda 2025-03-15 23:09:34 UTC
I'll be the mean one, then, in case it gets missed in QA.

>+  ?branchlimit=[% Branches.GetLoggedInBranchcode | html %]

When you are filtering a URL parameter, you want the filter "uri" rather than "html." There's nothing (other than our possible sloppiness elsewhere) stopping someone from having a branchcode us+them which when passed through the uri filter is us%2Bthem and it works, but when passed through the html filter stays us+them which in a URL is us them and that branch with a space in its branchcode wouldn't have any holds in its queue.
Comment 12 Katrin Fischer 2025-03-16 13:02:13 UTC
Everyone can set "Failed QA" and should if they notice something, nto really mean, especially when accompanied by helpful information.
Comment 13 Jason Robb 2025-04-10 17:17:41 UTC
Created attachment 180794 [details] [review]
Bug 36455: (follow-up) Changed html filters to uri
Comment 14 Andrew Fuerste-Henry 2025-04-10 18:12:27 UTC
Created attachment 180796 [details] [review]
Bug 36455: Default the hold queue link to your logged in library

This patch reduces the number of click for the average librarian user.

To test:
1. Change your logged in branch to something other than Centerville
2. Navigate to the circulation home page
3. Click on the Holds queue link
4. Observe that you have to hit Submit to continue
5. Apply patch
6. Repeat steps 1 and 2
7. Observe that the holds queue comes up with your branch preselected

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Comment 15 Andrew Fuerste-Henry 2025-04-10 18:12:30 UTC
Created attachment 180797 [details] [review]
Bug 36455: (follow-up) Default the hold queue link to your logged in library

Also fixed the link on circ-nav and the breadcrumbs links.

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Comment 16 Andrew Fuerste-Henry 2025-04-10 18:12:32 UTC
Created attachment 180798 [details] [review]
Bug 36455: (follow-up) Changed html filters to uri

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Comment 17 Andrew Fuerste-Henry 2025-04-10 18:14:13 UTC
(In reply to Jason Robb from comment #13)
> Created attachment 180794 [details] [review] [review]
> Bug 36455: (follow-up) Changed html filters to uri

I created a library with the branchcode "BAD!CODE" and the holds queue url worked as desired.

I didn't click around Koha to see if that code broke unrelated things but it made me quite nervous :)
Comment 18 David Nind 2025-06-13 05:03:47 UTC
The patch no longer applies 8-(..

I was going to add my sign-off, so that one of the others could count as QA.

git bz apply 36455

Bug 36455 - Default the hold queue link to your logged in library

180796 - Bug 36455: Default the hold queue link to your logged in library
180797 - Bug 36455: (follow-up) Default the hold queue link to your logged in library
180798 - Bug 36455: (follow-up) Changed html filters to uri

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 36455: Default the hold queue link to your logged in library
Using index info to reconstruct a base tree...
M	koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt
Falling back to patching base and 3-way merge...
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt
error: Failed to merge in the changes.
Patch failed at 0001 Bug 36455: Default the hold queue link to your logged in library