Summary: | Marc Modification Templates treat subfield 0 and no subfield set | ||
---|---|---|---|
Product: | Koha | Reporter: | Nick Clemens (kidclamp) <nick> |
Component: | Tools | Assignee: | Nick Clemens (kidclamp) <nick> |
Status: | CLOSED FIXED | QA Contact: | Katrin Fischer <katrin.fischer> |
Severity: | normal | ||
Priority: | P5 - low | CC: | aleisha, jonathan.druart, lucas |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
20.11.00, 20.05.06
|
|
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 26894 | ||
Attachments: |
Bug 26781: Check for subfield defined rather than truth
Bug 26781: Check for subfield defined rather than truth k Bug 26781: Check for subfield defined rather than truth Bug 26781: Check for subfield defined rather than truth Bug 26781: (follow-up) Adjust tests as fields are no longer completely removed |
Description
Nick Clemens (kidclamp)
2020-10-22 10:47:38 UTC
Created attachment 112164 [details] [review] Bug 26781: Check for subfield defined rather than truth To recreate: 1 - Have a record with 100$0 defined 2 - Define a Marc Modification template: Delete field 100$0 3 - Perform Batch record modification, enter the record above in the list of records 4 - Preview the MARC 5 - Note the entire 100 field has been deleted, don't modify the record 6 - Apply patch 7 - Restart all the things 8 - Test the modification again 9 - This time the preview confirms only the subfield 0 deleted 10 - Modify the record 11 - Confirm the record is correctly updated Created attachment 112409 [details] [review] Bug 26781: Check for subfield defined rather than truth To recreate: 1 - Have a record with 100$0 defined 2 - Define a Marc Modification template: Delete field 100$0 3 - Perform Batch record modification, enter the record above in the list of records 4 - Preview the MARC 5 - Note the entire 100 field has been deleted, don't modify the record 6 - Apply patch 7 - Restart all the things 8 - Test the modification again 9 - This time the preview confirms only the subfield 0 deleted 10 - Modify the record 11 - Confirm the record is correctly updated Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Created attachment 112433 [details] [review] k Created attachment 112434 [details] [review] Bug 26781: Check for subfield defined rather than truth To recreate: 1 - Have a record with 100$0 defined 2 - Define a Marc Modification template: Delete field 100$0 3 - Perform Batch record modification, enter the record above in the list of records 4 - Preview the MARC 5 - Note the entire 100 field has been deleted, don't modify the record 6 - Apply patch 7 - Restart all the things 8 - Test the modification again 9 - This time the preview confirms only the subfield 0 deleted 10 - Modify the record 11 - Confirm the record is correctly updated Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 112488 [details] [review] Bug 26781: Check for subfield defined rather than truth To recreate: 1 - Have a record with 100$0 defined 2 - Define a Marc Modification template: Delete field 100$0 3 - Perform Batch record modification, enter the record above in the list of records 4 - Preview the MARC 5 - Note the entire 100 field has been deleted, don't modify the record 6 - Apply patch 7 - Restart all the things 8 - Test the modification again 9 - This time the preview confirms only the subfield 0 deleted 10 - Modify the record 11 - Confirm the record is correctly updated Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> JD amended patch: Fix typo ony vs only Pushed to master for 20.11, thanks to everybody involved! There is a failing test: t/db_dependent/MarcModificationTemplates.t .. 1/126 # Failed test '100$0 has been deleted, added back, updated, moved to 600$0, and copied back to 100$0; finally, 245$0 has been copied and replaced to 700$0' # at t/db_dependent/MarcModificationTemplates.t line 799. # Structures begin differing at: # $got->{_fields}[2]{_ind1} = '1' # $expected->{_fields}[2]{_ind1} = ' ' # Looks like you failed 1 test of 126. Please fix ASAP. Created attachment 112826 [details] [review] Bug 26781: (follow-up) Adjust tests as fields are no longer completely removed (In reply to Nick Clemens from comment #8) > Created attachment 112826 [details] [review] [review] > Bug 26781: (follow-up) Adjust tests as fields are no longer completely > removed Pushed to master. backported to 20.05.x for 20.05.06 doesn't apply cleanly on 19.11.x, not backported |