Bug 38928

Summary: Openurl 'id' or 'rft_id' may contain key information
Product: Koha Reporter: Pedro Amorim <pedro.amorim>
Component: ILLAssignee: Pedro Amorim <pedro.amorim>
Status: Pushed to main --- QA Contact: Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski>
Severity: enhancement    
Priority: P5 - low CC: baptiste.wojtkowski, caroline.cyr-la-rose, 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:
25.11.00
Circulation function:
Attachments: Bug 38928: Handle rft_id or id
Bug 38928: Handle rft_id or id
Bug 38928: Handle rft_id or id
Bug 38928: (QA follow-up)

Description Pedro Amorim 2025-01-20 13:31:50 UTC Comment hidden (obsolete)
Comment 1 Pedro Amorim 2025-01-20 13:32:36 UTC
Currently, the Standard backend is mapping 'id' or 'rft_id' in the openurl to 'doi'.

But 'id' or 'rft_id' may contain  'DOI:12345' where '12345' is the doi value.
Comment 2 Pedro Amorim 2025-01-20 13:35:45 UTC
Created attachment 176807 [details] [review]
Bug 38928: Handle rft_id or id

If a semicolon exists, the key should be what's before the semicolon, and its value, whats the after.
Otherwise, default to 'doi' as it was before.

To test:
1) Enable ILLModule.
2) Visit the following URLs
http://localhost:8080/cgi-bin/koha/opac-illrequests.pl?op=create&backend=Standard&openurl=1&genre=article&id=10.1016/j.cognition.2024.105913
http://localhost:8080/cgi-bin/koha/opac-illrequests.pl?op=create&backend=Standard&openurl=1&genre=article&id=doi:10.1016/j.cognition.2024.105913
3) Notice that in both cases, only the doi value '10.1016/j.cognition.2024.105913' should be present in the input.
Comment 3 Caroline Cyr La Rose 2025-03-31 14:12:53 UTC
Created attachment 180050 [details] [review]
Bug 38928: Handle rft_id or id

If a semicolon exists, the key should be what's before the semicolon, and its value, whats the after.
Otherwise, default to 'doi' as it was before.

To test:
1) Enable ILLModule.
2) Visit the following URLs
http://localhost:8080/cgi-bin/koha/opac-illrequests.pl?op=create&backend=Standard&openurl=1&genre=article&id=10.1016/j.cognition.2024.105913
http://localhost:8080/cgi-bin/koha/opac-illrequests.pl?op=create&backend=Standard&openurl=1&genre=article&id=doi:10.1016/j.cognition.2024.105913
3) Notice that in both cases, only the doi value '10.1016/j.cognition.2024.105913' should be present in the input.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Comment 4 Baptiste Wojtkowski (bwoj) 2025-06-13 08:33:22 UTC
Created attachment 183231 [details] [review]
Bug 38928: Handle rft_id or id

If a semicolon exists, the key should be what's before the semicolon, and its value, whats the after.
Otherwise, default to 'doi' as it was before.

To test:
1) Enable ILLModule.
2) Visit the following URLs
http://localhost:8080/cgi-bin/koha/opac-illrequests.pl?op=create&backend=Standard&openurl=1&genre=article&id=10.1016/j.cognition.2024.105913
http://localhost:8080/cgi-bin/koha/opac-illrequests.pl?op=create&backend=Standard&openurl=1&genre=article&id=doi:10.1016/j.cognition.2024.105913
3) Notice that in both cases, only the doi value '10.1016/j.cognition.2024.105913' should be present in the input.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Comment 5 Baptiste Wojtkowski (bwoj) 2025-06-13 08:33:24 UTC
Created attachment 183232 [details] [review]
Bug 38928: (QA follow-up)
Comment 6 Lucas Gass (lukeg) 2025-06-24 21:52:39 UTC
Nice work everyone!

Pushed to main for 25.11