[Bug 24134] New: improve 008 framework flexibility (autogenerate date)
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134 Bug ID: 24134 Summary: improve 008 framework flexibility (autogenerate date) Change sponsored?: --- Product: Koha Version: 18.11 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: philip.bertling@rbg.vic.gov.au QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl When creating a framework for a form type other than book, it does not seem possible to autogenerate the date correctly. The 00-05 ‘date entered on file’ in the 008 field, can almost be auto-filled by using the code <<YYYY>><<MM>><<DD>>. However it doesn’t quite work because the 008 field expects a 6 digit date [YYMMDD] – this code inserts an 8 digit date [YYYYMMDD]. e.g. <<YY>><<MM>><<DD>> b at |||p |||||00| eng d = entered on the date <<29>><<11>><<25>> This creates the following data in a record: <<YY>>1125 b at |||p |||||00| eng d Is it possible to make this date code work to insert a date comprising 6 digits? -- 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=24134 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|improve 008 framework |Add placeholder for 2 digit |flexibility (autogenerate |years to allow |date) |autogeneration of dates in | |008 See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=7045 CC| |katrin.fischer@bsz-bw.de Keywords| |Academy Version|18.11 |master --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- See bug 7045 for the other placeholders already available. At the moment we support: <<DD>> - 2 digit day of month <<MM>> - 2 digit number of month <<YYYY>> - 4 digit year <<USER>> - user adding the record -- 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=24134 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |oleonard@myacpl.org |ity.org | Status|NEW |ASSIGNED -- 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=24134 Carlos Lopez <clopez@dml.vic.edu.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |clopez@dml.vic.edu.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134 --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 96106 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96106&action=edit Bug 24134: Add placeholder for 2 digit years to allow autogeneration of dates in 008 This patch modifies the code for parsing MARC framework configurations so that the placeholder "<<YY>>" translates to a two-year date. To test, apply the patch and modify a framework to include placeholders. For example, in MARC21: - Administration -> MARC structure -> 952 -> Edit subfields -> d - Expand "Advanced constraints" and add a default value: <<YYYY>> <<YY>> <<MM>> <<DD>> <<USER>> - Save your configuration and go to Cataloging. - Go to the add/edit items page for a record which uses the framework you edited. - In the "Add item" form, in the "Date aquired" field, you should see the correct values. For example: '2019 19 12 03 Leonard' Perform the same test when adding an item during the Acquisitions process (depending on your AcqCreateItem setting). Note that acqui/neworderempty.pl has been modified because the placeholder-replacement code is repeated there, but I couldn't discover how to test it (if it is used at all?) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134 Lucas Gass <lucas@bywatersolutions.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=24134 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96106|0 |1 is obsolete| | --- Comment #3 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 96113 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96113&action=edit Bug 24134: Add placeholder for 2 digit years to allow autogeneration of dates in 008 This patch modifies the code for parsing MARC framework configurations so that the placeholder "<<YY>>" translates to a two-year date. To test, apply the patch and modify a framework to include placeholders. For example, in MARC21: - Administration -> MARC structure -> 952 -> Edit subfields -> d - Expand "Advanced constraints" and add a default value: <<YYYY>> <<YY>> <<MM>> <<DD>> <<USER>> - Save your configuration and go to Cataloging. - Go to the add/edit items page for a record which uses the framework you edited. - In the "Add item" form, in the "Date aquired" field, you should see the correct values. For example: '2019 19 12 03 Leonard' Perform the same test when adding an item during the Acquisitions process (depending on your AcqCreateItem setting). Note that acqui/neworderempty.pl has been modified because the placeholder-replacement code is repeated there, but I couldn't discover how to test it (if it is used at all?) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |tomascohen@gmail.com --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This works great int he cataloguing editor, but the replacement doesn't work in the ACQ framework. To test: - Activate UseACQFrameworkForBiblioRecords - Add 008 with a default using placeholders to the ACQ framework - Add a basket - Add a new po line to the basket using 'new record' - Verify that the default is printed as is And we have a log full of those - but before the patch too: Use of uninitialized value $value in substitution (s///) at /home/vagrant/kohaclone/acqui/neworderempty.pl line 236. Use of uninitialized value $value in substitution (s///) at /home/vagrant/kohaclone/acqui/neworderempty.pl line 237. Use of uninitialized value $value in substitution (s///) at /home/vagrant/kohaclone/acqui/neworderempty.pl line 238. Use of uninitialized value $value in substitution (s///) at /home/vagrant/kohaclone/acqui/neworderempty.pl line 239. Use of uninitialized value $value in substitution (s///) at /home/vagrant/kohaclone/acqui/neworderempty.pl line 246. It would be great if it could be fixed, but also contemplating if we should move this into another bug? Adding Tomas for the connection to UseACQFrameworkForBiblioRecords. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=24294 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I'd really like to see this one moving. Jonathan fixes the default value behaviour on controlfields in bug 24294, but the placeholders are not replaced. Maybe we could treat this as a preexisting bug - meaning, we let this move in, but file a new bug for fixing the placeholder behaviour in acquisitions? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=25599 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I've filed bug 25599 for the issue with the ACQ framework. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |25599 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25599 [Bug 25599] Allow use of cataloguing placeholders when ACQ framework is used creating new record (UseACQFrameworkForBiblioRecords) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96113|0 |1 is obsolete| | --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 105430 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105430&action=edit Bug 24134: Add placeholder for 2 digit years to allow autogeneration of dates in 008 This patch modifies the code for parsing MARC framework configurations so that the placeholder "<<YY>>" translates to a two-year date. To test, apply the patch and modify a framework to include placeholders. For example, in MARC21: - Administration -> MARC structure -> 952 -> Edit subfields -> d - Expand "Advanced constraints" and add a default value: <<YYYY>> <<YY>> <<MM>> <<DD>> <<USER>> - Save your configuration and go to Cataloging. - Go to the add/edit items page for a record which uses the framework you edited. - In the "Add item" form, in the "Date aquired" field, you should see the correct values. For example: '2019 19 12 03 Leonard' Perform the same test when adding an item during the Acquisitions process (depending on your AcqCreateItem setting). Note that acqui/neworderempty.pl has been modified because the placeholder-replacement code is repeated there, but I couldn't discover how to test it (if it is used at all?) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |BLOCKED --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Ok, so with bug 25599 fixing neworderempty, we can now move this one on as well. It applies cleanly on top and I have verified it works. Moving to blocked until the dependency moves to PQA. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|BLOCKED |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Unblocking as dependency is in now. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com --- Comment #10 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Katrin Fischer from comment #9)
Unblocking as dependency is in now.
With Lucas SO and your SO, should it be PQA? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105430|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134 --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 108072 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108072&action=edit Bug 24134: Add placeholder for 2 digit years to allow autogeneration of dates in 008 This patch modifies the code for parsing MARC framework configurations so that the placeholder "<<YY>>" translates to a two-year date. To test, apply the patch and modify a framework to include placeholders. For example, in MARC21: - Administration -> MARC structure -> 952 -> Edit subfields -> d - Expand "Advanced constraints" and add a default value: <<YYYY>> <<YY>> <<MM>> <<DD>> <<USER>> - Save your configuration and go to Cataloging. - Go to the add/edit items page for a record which uses the framework you edited. - In the "Add item" form, in the "Date aquired" field, you should see the correct values. For example: '2019 19 12 03 Leonard' Perform the same test when adding an item during the Acquisitions process (depending on your AcqCreateItem setting). Note that acqui/neworderempty.pl has been modified because the placeholder-replacement code is repeated there, but I couldn't discover how to test it (if it is used at all?) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA QA Contact|testopia@bugs.koha-communit |tomascohen@gmail.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |20.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134 --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 20.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #13 from Lucas Gass <lucas@bywatersolutions.com> --- not backporting enhancement to 20.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=14941 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org