Bug 40105 - Patrons cannot add notes when creating an ILL
Summary: Patrons cannot add notes when creating an ILL
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: ILL (show other bugs)
Version: Main
Hardware: PC Mac OS
: P1 - high enhancement
Assignee: Eric Phetteplace
QA Contact: Lisette Scheer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-06-09 22:02 UTC by Eric Phetteplace
Modified: 2025-09-26 22:17 UTC (History)
6 users (show)

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


Attachments
Bug 40105: Patrons cannot add notes when creating an ILL (2.86 KB, patch)
2025-07-22 22:54 UTC, Eric Phetteplace
Details | Diff | Splinter Review
Bug 40105: Patrons cannot add notes when creating an ILL (3.74 KB, patch)
2025-08-12 19:40 UTC, Eric Phetteplace
Details | Diff | Splinter Review
Bug 40105: Patrons cannot add notes when creating an ILL (3.79 KB, patch)
2025-08-29 16:46 UTC, Brendan Lawlor
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Phetteplace 2025-06-09 22:02:32 UTC
While there is a notesopac field for ILL requests, it's not shown on the patron-facing form to create an ILL request (/cgi-bin/koha/opac-illrequests.pl?op=add_form&backend=Standard) for any type of resource. Patrons can edit request notes by going to their dashboard > ILL requests > View an existing request > Notes but that is difficult to discover and an extra step for every request. We'd like patrons to be able to add notes to any request during the creation process.

I tried to work around this with OpacUserJS by adding a <textarea> with name="notesopac" but that did not work; the request is created successfully, but Koha discards the note.
Comment 1 Eric Phetteplace 2025-07-22 22:54:07 UTC
Created attachment 184523 [details] [review]
Bug 40105: Patrons cannot add notes when creating an ILL

Testing plan:
- Enable the ILLModule system preference
- Sign into the OPAC and make an ILL request at /cgi-bin/koha/opac-illrequests.pl
- Note there's no option to specify notes
- Apply the patch and restart services
- Make another ILL request
- Use the new notes field
- View the request and note that the notes value was saved
Comment 2 Eric Phetteplace 2025-07-22 22:56:21 UTC
Made a patch for this so it can be tried out but maybe it should have tests? I also asked in mattermost about whether to do the notes as its own distinct fieldset like custom fields (the patch's approach) or as something more incorporated into the other metadata fields but got not responses.
Comment 3 Pedro Amorim 2025-07-23 10:59:56 UTC
Hi Eric, I think this makes sense, but would it be reasonable to have a system preference to enable/disable this? i.e. Koha systems that don't require it wouldn't have a new, possibly redundant (for them), input on the form. Or, alternatively, make it an expandable input that shows upon clicking a always visible 'Want to add some notes to your request?" link.
Adding others for additional thoughts.
Comment 4 Eric Phetteplace 2025-07-23 17:19:43 UTC
Hi Pedro, I don't think a system preference for this makes sense for several reasons. One can always hide the opacnotes input with IntranetUserCSS if it's unwanted. Also, one can use a different ILL backend which provides different fields. There are a wide variety of metadata fields and resource types available in the Standard backend, but there are no analogous system preferences to control them (e.g. to show the DOI field, the conference resource type, etc.). Notes can already be added under the single ILL view, just not at the time of creation, yet there's no existing system preference to control them. A system preference seems like overkill to me and inconsistent with the way the rest of the ILL module has been designed.
Comment 5 Eric Phetteplace 2025-08-12 19:40:04 UTC
Created attachment 185354 [details] [review]
Bug 40105: Patrons cannot add notes when creating an ILL

Testing plan:
- Enable the ILLModule system preference
- Sign into the OPAC and make an ILL request at /cgi-bin/koha/opac-illrequests.pl
- Note there's no option to specify notes
- Apply the patch and restart services
- Make another ILL request
- Use the new notes field
- View the request and note that the notes value was saved

Sponsored-By: California College of the Arts
Comment 6 Eric Phetteplace 2025-08-12 19:41:45 UTC
I have added a test to this, I'm not sure how necessary it is but why not. Changing to needs signoff.
Comment 7 Brendan Lawlor 2025-08-28 20:45:30 UTC
This works as described. I'm only failing QA because on the last step when you view the request the note renders as an input, which implies it's editable when it's not.

It should just need a small change on opac-illrequests.tt so that it's not an input when you are viewing a request that's already created.

Something like this on line 209:
   <label for="notesopac">Notes:</label>
-    [% IF !request.completed %]
+    [% IF !request.completed &&  !request.illrequest_id %]
       <textarea id="notesopac" name="notesopac" rows="5" cols="50">[% request.notesopac | html %]</textarea>
     [% ELSE %]
       [% request.notesopac | html %]
     [% END %]
Comment 8 Eric Phetteplace 2025-08-29 16:12:41 UTC
I had to compare with how the form currently works but I think my patch preserves the current behavior, where patrons can modify the note (but only the note) of requests that have not been completed yet. Try viewing a new, incomplete ILL as a patron. The notes field is a <textarea> and the "submit modifications" button updates the notes. If you add an extra condition like `!request.illrequest_id` so the notes isn't an input then there are no editable fields but the "submit modifications" button is still there; clicking it erases any note added when the ILL was created. So I *think* the current patch makes sense but I'm open to discussion.
Comment 9 Brendan Lawlor 2025-08-29 16:46:34 UTC
Created attachment 185942 [details] [review]
Bug 40105: Patrons cannot add notes when creating an ILL

Testing plan:
- Enable the ILLModule system preference
- Sign into the OPAC and make an ILL request at /cgi-bin/koha/opac-illrequests.pl
- Note there's no option to specify notes
- Apply the patch and restart services
- Make another ILL request
- Use the new notes field
- View the request and note that the notes value was saved

Sponsored-By: California College of the Arts
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Comment 10 Brendan Lawlor 2025-08-29 16:48:57 UTC
Ok, that makes sense. I wasn't familiar with using ill requests and didn't realize that the request notes should still be editable on that screen.
Comment 11 Lisette Scheer 2025-09-26 21:07:23 UTC
hmm I wonder if that's not how the OPAC note should work.

I would think that's more like the OPAC note in a patron or an item, where the patron can see but not edit.

I think a separate patron note might be better and not have the OPAC note be better?
Comment 12 Lisette Scheer 2025-09-26 21:22:47 UTC
Purchase suggestions you can add a note at creation but you can't edit anything except cancelling the request.


It seems like that makes more sense here, though I'm somewhat worried about removing that functionality if people are using it that way. Especially with the lack of proper logging on ILL's I'm concerned about this use.
Comment 13 Eric Phetteplace 2025-09-26 22:17:23 UTC
I wouldn't mind that behavior—notes can be created initially not modified—but the main thing for us is we really need the note on creation for things like acceptable editions/formats, not needed by, miscellaneous metadata, etc.

The patron cannot modify any of the other request details so note being immutable is consistent, but it's also a bigger behavior change. For instance, the ILL_REQUEST_MODIFIED notice would no longer have a purpose, as it's not possible for the patron to modify the request. For what it's worth, the opac note cannot be modified after the request is marked "completed".