Bugzilla – Attachment 131557 Details for
Bug 30268
When creating an order from a staged file, mandatory item subfields that are empty do not block form submission
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30268: Check mandatory fields in addorderiso2709.pl
Bug-30268-Check-mandatory-fields-in-addorderiso270.patch (text/plain), 2.50 KB, created by
Julian Maurice
on 2022-03-10 14:12:45 UTC
(
hide
)
Description:
Bug 30268: Check mandatory fields in addorderiso2709.pl
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2022-03-10 14:12:45 UTC
Size:
2.50 KB
patch
obsolete
>From 4c46a86209a3d94713776554279898d019d4e4cb Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Wed, 9 Mar 2022 16:42:50 +0100 >Subject: [PATCH] Bug 30268: Check mandatory fields in addorderiso2709.pl > >Test plan: >1. Make sure you have mandatory item subfields in the MARC bibliographic > framework used in acquisitions ("ACQ" if it exists, the default framework > otherwise). >2. Use the "Stage MARC records for import" tool to upload a file. Do not import > the bibliographic records. >3. Create a new acquisition basket ("Create items when:" must be set to > "placing an order") and add a new order from a staged file >4. Select the file you just uploaded >5. In the "Items information" tab, make sure at least one mandatory subfield is > empty >6. Try to submit the form. If there are errors about other mandatory fields > (like the fund for instance), fix those errors and resubmit. There should be > an error message about mandatory item subfields. >7. Enter a value for the mandatory item subfields and resubmit the form. Verify > that the order and the item have been correctly created. >--- > .../prog/en/modules/acqui/addorderiso2709.tt | 1 + > koha-tmpl/intranet-tmpl/prog/js/addorderiso2709.js | 8 ++++++++ > 2 files changed, 9 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >index d22111bb6a..cdb386cefc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >@@ -17,6 +17,7 @@ Batch list > [% INCLUDE 'datatables.inc' %] > [% Asset.js("js/acq.js") | $raw %] > [% Asset.js("js/funds_sorts.js") | $raw %] >+[% Asset.js("js/cataloging.js") | $raw %] > [% Asset.js("js/addorderiso2709.js") | $raw %] > </head> > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/addorderiso2709.js b/koha-tmpl/intranet-tmpl/prog/js/addorderiso2709.js >index 861c0db3a3..a499d79ba3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/addorderiso2709.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/addorderiso2709.js >@@ -71,6 +71,14 @@ $(document).ready(function() { > return false; > } > >+ if (0 < CheckMandatorySubfields(this.form)) { >+ // Open the item tab >+ $('#tabs').tabs('option', 'active', 1); >+ >+ alert(__('Some required item subfields are not set')); >+ return false; >+ } >+ > disableUnchecked($(this.form)); > > $(this.form).submit(); >-- >2.30.2
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 30268
:
131557
|
136771
|
137703