Bug 29958 changed item edits so that a blank date accessioned would not auto populate. This broke workflows for libraries who have vendors processing their item records. When a library imports the final records, the date accessioned is not included, as the vendor doesn't know the date, and existing date is now blanked. I believe we should preserve the date accessioned unless the file includes a new one.
Created attachment 144553 [details] [review] Bug 32456: Preserve date accessioned if a date is not explicitly passed To test: 1 - Edit an item record to have a blank date accessioned 2 - Save the record as marcxml from the detail page 3 - Edit the item to have an accession date 4 - Stage and import the file - matching in KohaBiblio and replacing items 5 - Import the file 6 - Confirm the date accessioned is cleared 7 - Apply patch 8 - Provide an accession date for the item 9 - Stage and import the file again 10 - Confirm the date remained 11 - Edit the item to remove the date 12 - Confirm you can manually blank the field
Created attachment 144593 [details] [review] Bug 32456: Preserve date accessioned if a date is not explicitly passed To test: 1 - Edit an item record to have a blank date accessioned 2 - Save the record as marcxml from the detail page 3 - Edit the item to have an accession date 4 - Stage and import the file - matching in KohaBiblio and replacing items 5 - Import the file 6 - Confirm the date accessioned is cleared 7 - Apply patch 8 - Provide an accession date for the item 9 - Stage and import the file again 10 - Confirm the date remained 11 - Edit the item to remove the date 12 - Confirm you can manually blank the field Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Created attachment 144637 [details] [review] Bug 32456: Preserve date accessioned if a date is not explicitly passed To test: 1 - Edit an item record to have a blank date accessioned 2 - Save the record as marcxml from the detail page 3 - Edit the item to have an accession date 4 - Stage and import the file - matching in KohaBiblio and replacing items 5 - Import the file 6 - Confirm the date accessioned is cleared 7 - Apply patch 8 - Provide an accession date for the item 9 - Stage and import the file again 10 - Confirm the date remained 11 - Edit the item to remove the date 12 - Confirm you can manually blank the field Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This works as described and I believe resolves a regression without causing further issues with the feature that introduced the regression. I'd love to see a Unit Test though so we don't risk regressing again?
Created attachment 144692 [details] [review] Bug 32456: Unit tests
Created attachment 144693 [details] [review] Bug 32456: Preserve date accessioned if a date is not explicitly passed To test: 1 - Edit an item record to have a blank date accessioned 2 - Save the record as marcxml from the detail page 3 - Edit the item to have an accession date 4 - Stage and import the file - matching in KohaBiblio and replacing items 5 - Import the file 6 - Confirm the date accessioned is cleared 7 - Apply patch 8 - Provide an accession date for the item 9 - Stage and import the file again 10 - Confirm the date remained 11 - Edit the item to remove the date 12 - Confirm you can manually blank the field Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 144740 [details] [review] Bug 32456: Unit tests Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 144741 [details] [review] Bug 32456: Preserve date accessioned if a date is not explicitly passed To test: 1 - Edit an item record to have a blank date accessioned 2 - Save the record as marcxml from the detail page 3 - Edit the item to have an accession date 4 - Stage and import the file - matching in KohaBiblio and replacing items 5 - Import the file 6 - Confirm the date accessioned is cleared 7 - Apply patch 8 - Provide an accession date for the item 9 - Stage and import the file again 10 - Confirm the date remained 11 - Edit the item to remove the date 12 - Confirm you can manually blank the field Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Works well, resolves the regression. Passing QA
Created attachment 144851 [details] [review] Bug 32456: Preserve date accessioned if a date is not explicitly passed To test: 1 - Edit an item record to have a blank date accessioned 2 - Save the record as marcxml from the detail page 3 - Edit the item to have an accession date 4 - Stage and import the file - matching in KohaBiblio and replacing items 5 - Import the file 6 - Confirm the date accessioned is cleared 7 - Apply patch 8 - Provide an accession date for the item 9 - Stage and import the file again 10 - Confirm the date remained 11 - Edit the item to remove the date 12 - Confirm you can manually blank the field Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Pushed to master for 23.05. Nice work everyone, thanks!
Nice work, thanks everyone! Pushed to 22.11.x for the next release.
Backported to 22.05.x for upcoming 22.05.09
patch conflicts + new tests are failing on 21.11.x. won't backport.
*** Bug 32451 has been marked as a duplicate of this bug. ***