Summary: | Add an alert in Koha homepage if some ILL requests need action | ||
---|---|---|---|
Product: | Koha | Reporter: | Mathieu Saby <mathsabypro> |
Component: | ILL | Assignee: | Bugs List <koha-bugs> |
Status: | NEW --- | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | alexander.wagner, ephetteplace, kch-tr.lhl-consortium, lisette, pedro.amorim, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: |
Description
Mathieu Saby
2025-02-25 12:00:41 UTC
Hi Mathieu, when you filed bug 39129 I considered that to be a duplicate of bug 35143 but this is being submitted again. It's possibly not exactly the same thing even if there's some overlap. For the other one I was thinking of email notification. Maybe I was not clear I re-read the bugs, and clearly for me they describe 2 different things : - send a notice by email : https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35143 - display the information on the homepage (In reply to Mathieu Saby from comment #3) > I re-read the bugs, and clearly for me they describe 2 different things : > - send a notice by email : > https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35143 > - display the information on the homepage Agreed. My mistake. I would agree with Mathieu. If some user asks us for help it should display quite prominently and the STAFF home page seems a good place for this. One might probably economize on space a bit and could use the news column. E.g. - Suggestions pending 5 - ILL pending 7 waiting 2 or the like. But as newbies we actually just stumbled upon the missing display for ILL requests and I started actually searching for the parameter to set as I noticed that this area is not configured via `pages`. If others are interested in it, below is an excerpt from our OpacUserJS where we add a note about new ILL requests in the "pending area". It could be adapted to also show pending ILL requests. I imagine the patch for this bug would be similar, if the intent is to use the REST API. ------------ if (location.pathname.match('/cgi-bin/koha/mainpage.pl') || location.pathname == "/") { $(() => { // if there are ILL requests with status = NEW if ($('.biglinks-list .icon_ill').length) { fetch("/api/v1/ill/requests?_order_by=-requested_date") .then(response => response.json()) .then(requests => { const numNewRequests = requests.filter(r => r.status === "NEW").length if (numNewRequests) { // add a link beside suggestions/article requests pending const areaPending = $('#area-pending') const newILLHTML = `<div class="pending-info" id="illrequests_pending">New ILL requests: <a href="/cgi-bin/koha/ill/ill-requests.pl"> <span class="pending-number-link">${numNewRequests}</span></a></div>` if (areaPending.length) { areaPending.append(newILLHTML) } else { $('.row .col-sm-12').eq(0).append(`<div id="area-pending" class="page-section">${newILLHTML}</div>`) } } }) .catch(e => { console.error("Error fetching ILL requests from Koha REST API", e) }) } }) } Hi Eric, this looks like a good approach. I think it'd be great for one of the following to happen: 1) Have a patch adding this functionality to core. 2) Add this code to a plugin instead of IntranetUserJS. 3) In an ideal world, with bug 39320 pushed, have an ILL 'dashboard' with a 'requests that need actions' widget where each Staff member can customize what their own 'needs action' criteria is. Each staff member could then add this widget to their Koha main page. |