[Bug 34989] New: Subscription cannot be added if a control field is set up in "Additional Fields" parameter
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34989 Bug ID: 34989 Summary: Subscription cannot be added if a control field is set up in "Additional Fields" parameter Change sponsored?: --- Product: Koha Version: 23.05 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Serials Assignee: koha-bugs@lists.koha-community.org Reporter: anke.bruns@gwdg.de QA Contact: testopia@bugs.koha-community.org Subscriptions can't be created because of an HTTP 500 and the following message in the plack error log: "Control fields (generally, just tags below 010) do not have subfields, use data() at /usr/share/koha/lib/Koha/Object/Mixin/AdditionalFields.pm line 68." The workaround by Joubu (many thanks!) in the Koha chat was to look whether in Administration > Additional fields > Table 'subscription' (/cgi-bin/koha/admin/additional-fields.pl?tablename=subscription) a MARC field was present that was a control field (ie. without $ field/subfield separator). We indeed had a 001 configured there with MARC field mode "Get value from MARC record" and Searchable=Yes Removing this solved the problem, but perhaps subscriptions should also work if a control field is configured in the place mentioned above? Another thing is that we are not completely sure if the error was produced when we upgraded from 22.05 or if it was present there as well with the additional field set. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34989 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|23.05 |master --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Confirmed in current development version. Tested with 001 and 001@. It would be nice if we could add support as the 001 would be really useful. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34989 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34989 --- Comment #2 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Created attachment 173777 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173777&action=edit Bug 34989: Subscription cannot be added if a control field is set up in "Additional Fields" parameter Test plan for MARC21: 1 - Create a subscription 2 - Go to administration -> aditional fields add a field for any CONTROL field existing in your subscription for example 005 3 - Also create an additional field for 245$a (check non regression) 4 - On the subscription page: Edit -> Edit subscription -> Next -> Save subscription -> You get: "Internal server error" 5 - Apply patch 6 - Repeat 4, you have no error anymore. On the subscription page you can see both additional fields. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34989 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173777|0 |1 is obsolete| | --- Comment #3 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Created attachment 173778 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173778&action=edit Bug 34989: Subscription cannot be added if a control field is set up in "Additional Fields" parameter Test plan for MARC21: 1 - Create a subscription 2 - Go to administration -> aditional fields add a field for any CONTROL field existing in your subscription for example 005 3 - Also create an additional field for 245$a (check non regression) 4 - On the subscription page: Edit -> Edit subscription -> Next -> Save subscription -> You get: "Internal server error" 5 - Apply patch 6 - Repeat 4, you have no error anymore. On the subscription page you can see both additional fields. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34989 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |baptiste.wojtkowski@biblibr | |e.com Severity|enhancement |minor -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34989 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |baptiste.wojtkowski@biblibr |ity.org |e.com CC| |david@davidnind.com --- Comment #4 from David Nind <david@davidnind.com> --- I couldn't replicate the issue - steps 2-5. The subscription I created had an 001 and 005 value in the record. What I entered in the additional field form (for the subscription table): - Name: BZ34989-1 - Authorized value category: None - Repeatable: left blank - MARC field: 005 - MARC field mode: Get value from MARC record (not modifiable) - Searchable: selected -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34989 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173778|0 |1 is obsolete| | --- Comment #5 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Created attachment 174979 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174979&action=edit Bug 34989: [23.11] Subscription cannot be added if a control field is set up in "Additional Fields" parameter Test plan for MARC21: 1 - Create a subscription 2 - Go to administration -> aditional fields add a field for any CONTROL field existing in your subscription for example 005 3 - Also create an additional field for 245$a (check non regression) 4 - On the subscription page: Edit -> Edit subscription -> Next -> Save subscription -> You get: "Internal server error" 5 - Apply patch 6 - Repeat 4, you have no error anymore. On the subscription page you can see both additional fields. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34989 --- Comment #6 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Created attachment 174980 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174980&action=edit Bug 34989: Subscription cannot be added if a control field is set up in Additional Fields parameter Test plan for main and MARC21: 1 - Apply bug 38528 2 - Create a subscription 3 - Go to administration -> aditional fields add a field for any CONTROL field existing in your subscription for example 005 4 - Also create an additional field for 245$a (check non regression) 5 - On the subscription page: Edit -> Edit subscription -> Next -> Save subscription -> You get: "Internal server error" 6 - Apply patch 7 - Repeat 4, you have no error anymore. On the subscription page you can see both additional fields. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34989 --- Comment #7 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Hi @David, thanks for paying attention to this patch :) Sry for taking long time to answer, I had to dig a bit. Unfortunately I had mistakenly tested it on top of 23.11, and as far as I investigated, main is quite broken concerning additional fields using get, that's why you don't reproduce the bug. On main, 'get' fields are not fetched from database anymore (I reported Bug 38528 to this end). To reproduce the bug, it is necessary to force a data to be present in additional_field_values, hence I added the install of Bug 38528 in the test plan, it is also possible to add the proper row in the database. Note: I did not add it as a dependency since the patch applies on main without Bug 38528 and the requirement to reproduce the bug is only to have the proper data in additional_field_values. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34989 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=38528 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34989 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply --- Comment #8 from David Nind <david@davidnind.com> --- Thanks Baptiste! Apologies for taking so long to re-test. The patch no longer applies on main 8-(... git bz apply 34989 Bug 34989 - Subscription cannot be added if a control field is set up in "Additional Fields" parameter 174979 - Bug 34989: [23.11] Subscription cannot be added if a control field is set up in "Additional Fields" parameter 174980 - Bug 34989: Subscription cannot be added if a control field is set up in Additional Fields parameter Apply? [(y)es, (n)o, (i)nteractive] i Applying: Bug 34989: Subscription cannot be added if a control field is set up in Additional Fields parameter Using index info to reconstruct a base tree... M Koha/Object/Mixin/AdditionalFields.pm Falling back to patching base and 3-way merge... Auto-merging Koha/Object/Mixin/AdditionalFields.pm CONFLICT (content): Merge conflict in Koha/Object/Mixin/AdditionalFields.pm error: Failed to merge in the changes. Patch failed at 0001 Bug 34989: Subscription cannot be added if a control field is set up in Additional Fields parameter -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34989 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34989 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #174980|0 |1 is obsolete| | --- Comment #9 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Created attachment 175981 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=175981&action=edit Bug 34989: Subscription cannot be added if a control field is set up in Additional Fields parameter Test plan for main and MARC21: 1 - Apply bug 38528 2 - Create a subscription 3 - Go to administration -> aditional fields add a field for any CONTROL field existing in your subscription for example 005 4 - Also create an additional field for 245$a (check non regression) 5 - On the subscription page: Edit -> Edit subscription -> Next -> Save subscription -> You get: "Internal server error" 6 - Apply patch 7 - Repeat 4, you have no error anymore. On the subscription page you can see both additional fields. Also check that 245$a is properly reported -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34989 --- Comment #10 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Hi, I don't get why it wasn't applying automatically but I reapplied it manually and it seems to work now. Note: I tested it on top of the [ALTERNATIVE] patch for 38528 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34989 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34989 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #175981|0 |1 is obsolete| | --- Comment #11 from David Nind <david@davidnind.com> --- Created attachment 176042 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176042&action=edit Bug 34989: Subscription cannot be added if a control field is set up in Additional Fields parameter Test plan for main and MARC21: 1 - Apply bug 38528 2 - Create a subscription 3 - Go to administration -> aditional fields add a field for any CONTROL field existing in your subscription for example 005 4 - Also create an additional field for 245$a (check non regression) 5 - On the subscription page: Edit -> Edit subscription -> Next -> Save subscription -> You get: "Internal server error" 6 - Apply patch 7 - Repeat 4, you have no error anymore. On the subscription page you can see both additional fields. Also check that 245$a is properly reported Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34989 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This fixes adding a serial release notes| |subscription when | |additional fields are used, | |and the additional field's | |MARC field is a control | |field, such as 000 to 010 | |(Administration > | |Additional parameters > | |Additional fields > | |Serials). This caused an | |error "Control fields | |(generally, just tags below | |010) do not have subfields, | |use data()..." when adding | |a subscription. --- Comment #12 from David Nind <david@davidnind.com> --- (In reply to Baptiste Wojtkowski (bwoj) from comment #10)
Hi, I don't get why it wasn't applying automatically but I reapplied it manually and it seems to work now.
Note: I tested it on top of the [ALTERNATIVE] patch for 38528
I think it was a "me" problem! (Not reading everything correctly.) Things applied correctly if I: - Interactively applied the "Bug 38528: [ALTERNATIVE] Update empty field value logic" patch - Interactively applied the "Bug 34989: Subscription..." patch for this bug (don't apply the 23.11 patch) David -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34989 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |nick@bywatersolutions.com --- Comment #13 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- This needs unit tests to cover the change You should use 'is_control_field' to determine which method to use rather than the existence of subfield -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34989 --- Comment #14 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- I'm writing tests, and I finally feel like the changes made to the 'set' mode are wrong, don't you think ? I does it make sense to be able to update a control field through an additional value ? Shouldn't we simply forbid this ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34989 --- Comment #15 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- (the changes to the 'get' mode prevent the errors so they make sense) -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org