Bugzilla – Attachment 182117 Details for
Bug 39179
ILL batches should allow editing without having to add new requests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39179: Allow edit batch without having to add new items
Bug-39179-Allow-edit-batch-without-having-to-add-n.patch (text/plain), 3.55 KB, created by
Tomás Cohen Arazi (tcohen)
on 2025-05-08 20:02:45 UTC
(
hide
)
Description:
Bug 39179: Allow edit batch without having to add new items
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2025-05-08 20:02:45 UTC
Size:
3.55 KB
patch
obsolete
>From d671d6154d3e589cd7c2f03f0defb8787d99d53e Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Thu, 20 Feb 2025 16:07:32 +0000 >Subject: [PATCH] Bug 39179: Allow edit batch without having to add new items > >Test plan: >BEFORE APPLYING PATCHES: >1) Enabled ILLModule >2) Install a metadata enrichment plugin .e.g: >https://github.com/PTFS-Europe/koha-plugin-api-pubmed/releases/tag/1.1.1 >3) Visit ILL requests: >http://localhost:8081/cgi-bin/koha/ill/ill-requests.pl >4) Click 'New ILL requests batch' and pick 'Standard' >5) Enter a name 'test', a cardnumber '42' and any library >6) Click "Continue", enter '123' on the identifiers textarea on the right. >7) Click "Process identifiers" >8) Click "Add items to batch" >9) Click "Finish and view batch" >10) Click 'Batch requests' at the top right of the page. >11) Select the batch you just created and click 'edit' >12) Notice you're unable to 'Continue' or 'Finish and view batch' until you add some pubmedid and click 'Process identifiers' >APPLY ALL PATCHES >13) Repeat test plan >14) Notice the layout and cosmetic changes. >15) Notice you can now edit a batch without having to add new requests. Edit the batch name or library or status and click 'Finish and view batch'. Notice it saves the batch. > >Sponsored-by: UKHSA - UK Health Security Agency >Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > .../intranet-tmpl/prog/js/ill-batch-modal.js | 21 ++++++++++++++++++- > 1 file changed, 20 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/ill-batch-modal.js b/koha-tmpl/intranet-tmpl/prog/js/ill-batch-modal.js >index cff37c1955f..1051c5a3ca8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/ill-batch-modal.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/ill-batch-modal.js >@@ -28,7 +28,7 @@ > "create-requests-button" > ); > var statusesSelect = document.getElementById("status_code"); >- var cancelButton = document.getElementById("lhs").querySelector("button"); >+ var cancelButton = document.getElementById("button_cancel_batch"); > var cancelButtonOriginalText = cancelButton.innerHTML; > > // We need a data structure keyed on identifier type, which tells us how to parse that >@@ -134,6 +134,9 @@ > // Are we updating an existing batch > var isUpdate = false; > >+ // Have requests been created? >+ var requestsCreated = false; >+ > // The datatable > var table; > var tableEl = document.getElementById("identifier-table"); >@@ -188,6 +191,7 @@ > fetchBatch(); > isUpdate = true; > setModalHeading(); >+ finishButton.removeAttribute("disabled"); > createButton.style.display = "none"; > } else { > batch.data = emptyBatch; >@@ -317,6 +321,9 @@ > return row; > }); > }) >+ .then(function (data) { >+ requestsCreated = true; >+ }) > .catch(function () { > window.handleApiError(ill_batch_api_request_fail); > }); >@@ -470,6 +477,18 @@ > } > > function doFinish() { >+ if (!requestsCreated && textarea.value.trim().length !== 0) { >+ if ( >+ !confirm( >+ __( >+ "Staged identifiers have not yet been added as requests. Proceed?" >+ ) >+ ) >+ ) { >+ return; >+ } >+ } >+ > updateBatch().then(function () { > $("#ill-batch-modal").modal({ show: false }); > location.href = >-- >2.49.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 39179
:
178433
|
178434
|
178435
|
178436
|
178437
|
178853
|
178854
|
178855
|
178856
|
178857
|
182113
|
182114
|
182115
|
182116
| 182117