[Bug 9201] New: OAI-PMH mapping value cannot be 0
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9201 Bug ID: 9201 Summary: OAI-PMH mapping value cannot be 0 Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: System Administration Assignee: koha-bugs@lists.koha-community.org Reporter: mirko@abunchofthings.net CC: gmcharlt@gmail.com When adding or editing OAI-PMH mappings, using 0 as a value results in that mapping being deleted. 0 is a valid value, mappings should only be deleted when the value is empty. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9201 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch --- Comment #1 from Marc Véron <veron@veron.ch> --- I can confirm this behaviour. The reason is in file admin/oai_set_mappings.pl, line: if($marcfields[$i] and $marcsubfields[$i] and $marcvalues[$i]) I think it should be something like if($marcfields[$i] and $marcsubfields[$i] and ($marcvalues[$i] and $marcvalues ne '')) -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9201 --- Comment #2 from Mirko Tietgen <mirko@abunchofthings.net> --- Created attachment 14108 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=14108&action=edit Bug 9201 OAI-PMH mapping value cannot be 0 Allow the value of a OAI set mapping to be 0 / empty. Delete the mapping if field or subfield are empty. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9201 Mirko Tietgen <mirko@abunchofthings.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Depends on| |8906 Assignee|koha-bugs@lists.koha-commun |mirko@abunchofthings.net |ity.org | --- Comment #3 from Mirko Tietgen <mirko@abunchofthings.net> --- This patch is not touching the .tt file with description that says you need to empty one of these fields. I don't want to interfere with Bug 8906 that deletes this description anyway. Marking this bug as dependant on 8906 for that reason. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9201 Mirko Tietgen <mirko@abunchofthings.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9201 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9201 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #14108|0 |1 is obsolete| | --- Comment #4 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 14271 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=14271&action=edit Bug 9201 OAI-PMH mapping value cannot be 0 Allow the value of a OAI set mapping to be 0 / empty. Delete the mapping if field or subfield are empty. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Now it is possible to add a value == 0 or an empty string. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9201 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9201 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #14271|0 |1 is obsolete| | --- Comment #5 from Mason James <mtj@kohaaloha.com> --- Created attachment 14940 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=14940&action=edit Bug 9201 OAI-PMH mapping value cannot be 0 Allow the value of a OAI set mapping to be 0 / empty. Delete the mapping if field or subfield are empty. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Now it is possible to add a value == 0 or an empty string. Signed-off-by: Mason James <mtj@kohaaloha.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9201 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com --- Comment #6 from Mason James <mtj@kohaaloha.com> --- (In reply to comment #5)
Created attachment 14940 [details] Bug 9201 OAI-PMH mapping value cannot be 0
Allow the value of a OAI set mapping to be 0 / empty. Delete the mapping if field or subfield are empty.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Now it is possible to add a value == 0 or an empty string. Signed-off-by: Mason James <mtj@kohaaloha.com>
passing QA, works as expected... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9201 --- Comment #7 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- Before I can push this, bug 8906 will have to be QAed. I will also need a detailed test plan so I can confirm that it actually works. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9201 --- Comment #8 from Mirko Tietgen <mirko@abunchofthings.net> --- Before applying the patch: Go to Administration > OAI sets configuration Choose »Add a new set« setSpec: aaa setName: bbb Save Choose »Define mappings« for your new set. Enter »Field«: 100, »Subfield«: a, »Value«: 0 Click »Save« and see »Warning: no mappings defined for this set« Apply patch Enter field: 100, subfield: a, value: 0 Click »Save« and see that your mapping is saved -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9201 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #9 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- This patch has been pushed to master. I spoke with Mirko, and he clarified that the functionality does not depend on Bug 8906, so I am pushing this patch now. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9201 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |chris@bigballofwax.co.nz --- Comment #10 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to 3.10.x and 3.8.x will be in 3.10.3 and 3.8.10 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org