Description
Anke Bruns
2023-10-05 09:26:49 UTC
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. Created attachment 173777 [details] [review] 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. Created attachment 173778 [details] [review] 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. 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 Created attachment 174979 [details] [review] 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. Created attachment 174980 [details] [review] 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. 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. 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 Created attachment 175981 [details] [review] 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 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 Created attachment 176042 [details] [review] 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> (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 |