Bug 21316

Summary: Adding controlfields to the ACQ framework causes issues when adding to basket
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: AcquisitionsAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: major    
Priority: P5 - low CC: christian.stelzenmueller, fridolin.somers, jonathan.druart, lucas, m.de.rooy, marjorie.barry-vila, paul.thornton
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24294
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.11.00,19.05.03
Circulation function:
Bug Depends on: 19289    
Bug Blocks:    
Attachments: Bug 21316: Handle control fields in the ACQ frameworks
Bug 21316: Handle control fields in the ACQ frameworks
Bug 21316: Handle control fields in the ACQ frameworks
Bug 21316: Handle control fields in the ACQ frameworks

Description Nick Clemens (kidclamp) 2018-09-05 12:55:45 UTC
To recreate:
1 - Export your default framework
2 - Import it into the ACQ framework
3 - Attempt to add to a basket from an existing record
4 - Internal server error:
Control fields (generally, just tags below 010) do not have subfields, use data() at /home/vagrant/kohaclone/acqui/neworderempty.pl line 295.
Comment 1 Jonathan Druart 2018-09-16 18:12:38 UTC
Why would you want to do that?

Before bug 19289 the ACQ framework was only used for items, now it is used to edit *few* fields of a bibliographic records when creating a new order. If you create ACQ from the default framework you will end up with a huge list of inputs/selects.
Comment 2 Nick Clemens (kidclamp) 2018-09-21 17:17:22 UTC
Yes, you don't want all, just easy way to recreate

You might want 001 or 003 though
Comment 3 Katrin Fischer 2018-10-28 18:27:48 UTC
I agree 001/003 would be good! Also possible 008 if you want to have them show up correctly in publication year search (might make sense especially looking for new things).
Comment 4 Jonathan Druart 2019-03-05 19:11:42 UTC
Created attachment 86114 [details] [review]
Bug 21316: Handle control fields in the ACQ frameworks

Test plan:
Turn UseACQFrameworkForBiblioRecords on
Add 003@ to the ACQ framework
Create an order from an existing record
=> The 003 value will be displayed!

It fixes the following error:
Control fields (generally, just tags below 010) do not have subfields,
use data() at /home/vagrant/kohaclone/acqui/neworderempty.pl line 293.
Comment 5 PTFS Europe Sandboxes 2019-07-12 12:28:32 UTC
Created attachment 91484 [details] [review]
Bug 21316: Handle control fields in the ACQ frameworks

Test plan:
Turn UseACQFrameworkForBiblioRecords on
Add 003@ to the ACQ framework
Create an order from an existing record
=> The 003 value will be displayed!

It fixes the following error:
Control fields (generally, just tags below 010) do not have subfields,
use data() at /home/vagrant/kohaclone/acqui/neworderempty.pl line 293.

Signed-off-by: CS <christian.stelzenmueller@bsz-bw.de>
Comment 6 Katrin Fischer 2019-07-12 12:31:51 UTC
Confirmed in master, but also in 18.11.06
Comment 7 Katrin Fischer 2019-07-13 09:47:20 UTC
Created attachment 91516 [details] [review]
Bug 21316: Handle control fields in the ACQ frameworks

Test plan:
- Turn UseACQFrameworkForBiblioRecords on
- Add 003@ to the ACQ framework
- Create an order from an existing record
=> The 003 value will be displayed!

It fixes the following error:
Control fields (generally, just tags below 010) do not have subfields,
use data() at /home/vagrant/kohaclone/acqui/neworderempty.pl line 293.

Signed-off-by: Christian Stelzenmüller <christian.stelzenmueller@bsz-bw.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Katrin Fischer 2019-07-13 09:47:50 UTC
Fixed the sign-off line, but as I helped with testing, it would be nice to get another set of QA eyes on this.
Comment 9 Marcel de Rooy 2019-07-19 06:47:35 UTC
Created attachment 91613 [details] [review]
Bug 21316: Handle control fields in the ACQ frameworks

Test plan:
- Turn UseACQFrameworkForBiblioRecords on
- Add 003@ to the ACQ framework
- Create an order from an existing record
=> The 003 value will be displayed!

It fixes the following error:
Control fields (generally, just tags below 010) do not have subfields,
use data() at /home/vagrant/kohaclone/acqui/neworderempty.pl line 293.

Signed-off-by: Christian Stelzenmüller <christian.stelzenmueller@bsz-bw.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 10 Martin Renvoize (ashimema) 2019-07-19 09:10:08 UTC
Nice work!

Pushed to master for 19.11.00
Comment 11 Fridolin Somers 2019-08-06 13:47:57 UTC
Pushed to 19.05.x for 19.05.03
Comment 12 Lucas Gass (lukeg) 2019-08-13 19:53:43 UTC
backported to 18.11.x for 18.11.09