Bug 32737 - Don't allow placing duplicate ILL requests to same partner
Summary: Don't allow placing duplicate ILL requests to same partner
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: ILL (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Bugs List
QA Contact:
URL:
Keywords:
Depends on: 22531
Blocks:
  Show dependency treegraph
 
Reported: 2023-01-27 13:06 UTC by Pedro Amorim
Modified: 2023-01-27 14:21 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro Amorim 2023-01-27 13:06:07 UTC
Bug 22531 adds the possibility of placing an ILL request with partners even if a request had been placed with a partner previously.
This, however, allows for a request to be placed with the same partner multiple times, adding new entries on message_queue each time the request is placed with the same partner.
A possible solution would be to remove previously placed partners from the "Select partner libraries:" list in the "Place request with partners" UI screen.

To reproduce:
- Apply 22531

Preparation:
- Create a report using the following SQL in order to verify that notices are being generated:
SELECT borrowernumber, subject, content, message_transport_type, to_address, from_address FROM message_queue WHERE letter_code LIKE 'ILL%' ORDER BY message_id DESC
- Create two "partners". These are patrons that belong to a patron category that has a code that matches the <partner_code> value in your koha-conf.xml (default is ILLLIBS). Patrons in this category must have a primary email defined. Patrons defined in this way are offered as request partners within the ILL interface.
- Go to "Koha administration", search for "ILLModule" syspref, ensure it is set to "Enable"
- Go to "Koha administration", search for "IllLog" syspref, ensure it is set to "Log"
- Go to "Koha administration" > "Libraries", choose a library and "Edit" it
- Ensure the "Email" field for the library is populated

Reproduce:
1 - Create an ILL request using the FreeForm backend
2 - From the "Manage ILL request" screen, select "Place request with partners"
3 - In "Select partner libraries" choose one partner library, then click "Send email"
4 - Run the report created during preparation and check that the entry has been added to message_queue
5 - For the same request, repeat steps 2 and 3 and place the request with the same partner as previously
6 - Run the report again and check that a second identical entry has been added to message_queue
7 - Go to the request again and verify that the "ILL request log" also has one entry for each time the request was placed for the same partner (working as intended)