Bug 30268 - When creating an order from a staged file, mandatory item subfields that are empty do not block form submission
Summary: When creating an order from a staged file, mandatory item subfields that are ...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Julian Maurice
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-10 14:07 UTC by Julian Maurice
Modified: 2023-06-08 22:26 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00, 22.05.05, 21.11.12
Circulation function:


Attachments
Bug 30268: Check mandatory fields in addorderiso2709.pl (2.50 KB, patch)
2022-03-10 14:12 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 30268: Check mandatory fields in addorderiso2709.pl (2.58 KB, patch)
2022-06-30 13:47 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 30268: Check mandatory fields in addorderiso2709.pl (2.65 KB, patch)
2022-07-14 09:39 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Maurice 2022-03-10 14:07:51 UTC
Steps to reproduce:
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. You will be
   able to submit the form without filling the mandatory item subfields, but
   that should not be possible.
Comment 1 Julian Maurice 2022-03-10 14:12:45 UTC
Created attachment 131557 [details] [review]
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.
Comment 2 Biblibre Sandboxes 2022-06-30 13:47:39 UTC
Created attachment 136771 [details] [review]
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.

Signed-off-by: Thibault Kero <thibault.keromnes@univ-paris8.fr>
Comment 3 Martin Renvoize (ashimema) 2022-07-14 09:39:26 UTC
Created attachment 137703 [details] [review]
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.

Signed-off-by: Thibault Kero <thibault.keromnes@univ-paris8.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 4 Martin Renvoize (ashimema) 2022-07-14 09:39:53 UTC
Nice improvement, works as described.

Passing QA
Comment 5 Tomás Cohen Arazi (tcohen) 2022-07-20 14:54:31 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 6 Lucas Gass (lukeg) 2022-08-23 20:08:36 UTC
Backported to 22.05.x for 22.05.05
Comment 7 Arthur Suzuki 2022-08-30 09:29:37 UTC
thx pushed to 21.11.x for 21.11.12
Comment 8 Victor Grousset/tuxayo 2022-09-14 19:30:49 UTC
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed.

Nothing to document, marking resolved.