[Bug 19349] New: Allow to store biblio record' s creator and last modifier in MARC
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19349 Bug ID: 19349 Summary: Allow to store biblio record's creator and last modifier in MARC Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: Cataloging Assignee: julian.maurice@biblibre.com Reporter: julian.maurice@biblibre.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl This will allow to store borrowernumber and name of biblio record's creator and last modifier in the MARC record. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19349 --- Comment #1 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 67233 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67233&action=edit Bug 19349: Store record's creator and last modifier in record Test plan: 1. Run updatedatabase.pl 2. Set sysprefs MarcFieldForCreatorId, MarcFieldForCreatorName, MarcFieldForModifierId, MarcFieldForModifierName 3. Create a new biblio 4. Verify that the fields are correctly filled 5. Logout and login as another user 6. Modify the same biblio 7. Verify that only the fields for last modifier have been modified -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19349 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=19349 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |In Discussion CC| |alexbuckley@catalyst.net.nz --- Comment #2 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Hi Julian I have set the four sysprefs with the values 942$w, 942$x, 942$y, and 942$z however when I go to create a new biblio these four fields are not displayed in the '9' tab of the new biblio page -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19349 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff --- Comment #3 from Julian Maurice <julian.maurice@biblibre.com> --- (In reply to Alex Buckley from comment #2)
Hi Julian
I have set the four sysprefs with the values 942$w, 942$x, 942$y, and 942$z however when I go to create a new biblio these four fields are not displayed in the '9' tab of the new biblio page
Hi Alex, you need to create these subfields in the MARC framework you are using, or make them visible if they already exist. Note that the subfields are filled after you click on 'Save', so their values are not visible in the MARC editor when you create a new biblio. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19349 Simon Pouchol <simon.pouchol@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #67233|0 |1 is obsolete| | --- Comment #4 from Simon Pouchol <simon.pouchol@biblibre.com> --- Created attachment 68317 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68317&action=edit Bug 19349: Store record's creator and last modifier in record Test plan: 1. Run updatedatabase.pl 2. Set sysprefs MarcFieldForCreatorId, MarcFieldForCreatorName, MarcFieldForModifierId, MarcFieldForModifierName 3. Create a new biblio 4. Verify that the fields are correctly filled 5. Logout and login as another user 6. Modify the same biblio 7. Verify that only the fields for last modifier have been modified Works perfectly. Signed-off-by: Simon Pouchol <simon.pouchol@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19349 Simon Pouchol <simon.pouchol@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |simon.pouchol@biblibre.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19349 --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Julian, just a few preliminary comments: - # FIXME To replace with ->find_or_create? - if ( my $m_rs = Koha::Biblio::Metadatas->find($metadata) ) { - $m_rs->metadata( $record->as_xml_record($encoding) ); - $m_rs->store; - } else { - my $m_rs = Koha::Biblio::Metadata->new($metadata); - $m_rs->metadata( $record->as_xml_record($encoding) ); - $m_rs->store; + + my $m_rs = Koha::Biblio::Metadatas->find($metadata); + unless ($m_rs) { + $m_rs = Koha::Biblio::Metadata->new($metadata); + } Why did you not apply what is in the FIXME ? You add a new sub in C4/Biblio for MARC manipulation. Actually something like create or update. Should we not be looking now how to do such things in the Koha namespace instead of extending C4? You add four prefs. Would it be handy to combine them. And test on its value before saving? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19349 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Any feedback please ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19349 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #68317|0 |1 is obsolete| | --- Comment #7 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 78639 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=78639&action=edit Bug 19349: Store record's creator and last modifier in record Test plan: 1. Run updatedatabase.pl 2. Set sysprefs MarcFieldForCreatorId, MarcFieldForCreatorName, MarcFieldForModifierId, MarcFieldForModifierName 3. Create a new biblio 4. Verify that the fields are correctly filled 5. Logout and login as another user 6. Modify the same biblio 7. Verify that only the fields for last modifier have been modified Works perfectly. Signed-off-by: Simon Pouchol <simon.pouchol@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19349 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #8 from Julian Maurice <julian.maurice@biblibre.com> --- (In reply to Marcel de Rooy from comment #5)
Why did you not apply what is in the FIXME ? Because find_or_create is not what I want. find_or_new would be nice but it's not implemented in Koha::Objects
You add a new sub in C4/Biblio for MARC manipulation. Actually something like create or update. Should we not be looking now how to do such things in the Koha namespace instead of extending C4? You're right. I moved set_koha_field to Koha::Util::MARC
You add four prefs. Would it be handy to combine them. How do you suggest to combine them ?
And test on its value before saving? Is it possible to check sysprefs value before saving ?
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19349 paxed <pasi.kallinen@joensuu.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pasi.kallinen@joensuu.fi --- Comment #9 from paxed <pasi.kallinen@joensuu.fi> --- Wouldn't the Koha to MARC mapping fields work for these, instead of creating separate sysprefs for each? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19349 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- It won't right now because there are no columns added to any of the tables.(In reply to paxed from comment #9)
Wouldn't the Koha to MARC mapping fields work for these, instead of creating separate sysprefs for each?
Not right now as there are no matching columns in the tables. Although we have something similar already, some placeholders that can be used in the default values of the frameworks (https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7045). Maybe instead of adding new prefs this could be extended? Then the configuration could happen in the frameworks. But needs better documentation. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19349 --- Comment #11 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- QA: Looking here -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19349 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19349 --- Comment #12 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Put 990a in the field. (Yeah should have been 990$a but is not listed on the preferences form..) Internal server error. Tag "990a" is not a valid tag. at /usr/share/koha/devclone/Koha/Util/MARC.pm line 218. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19349 --- Comment #13 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- $record->append_fields($field); Should we actually append or insert_ordered ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19349 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19349 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #78639|0 |1 is obsolete| | --- Comment #14 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 81873 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81873&action=edit Bug 19349: Store record's creator and last modifier in record Test plan: 1. Run updatedatabase.pl 2. Set sysprefs MarcFieldForCreatorId, MarcFieldForCreatorName, MarcFieldForModifierId, MarcFieldForModifierName 3. Create a new biblio 4. Verify that the fields are correctly filled 5. Logout and login as another user 6. Modify the same biblio 7. Verify that only the fields for last modifier have been modified Works perfectly. Signed-off-by: Simon Pouchol <simon.pouchol@biblibre.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19349 --- Comment #15 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 81874 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81874&action=edit Bug 19349: (QA follow-up) Cosmetic changes [1] Construction with a // b instead of a; unless( a ) b; [2] Error checking on subfieldCode [3] Add explanation how to fill preference Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19349 --- Comment #16 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Passed QA If you dont want this in your record, simply do not add something in these prefs. No harm done. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19349 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |nick@bywatersolutions.com --- Comment #17 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 18.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19349 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Resolution|--- |FIXED Status|Pushed to Master |RESOLVED --- Comment #18 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Enhancement, will not be backported to 18.05.x series. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19349 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |24906 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24906 [Bug 24906] Problems with automatic saving the name and id of creator and who modifies the catolog -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org