[Bug 7045] New: Default-value substitution inconsistent
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7045 Bug #: 7045 Summary: Default-value substitution inconsistent Classification: Unclassified Change sponsored?: --- Product: Koha Version: rel_3_4 Platform: All OS/Version: All Status: NEW Severity: minor Priority: P5 Component: Cataloging AssignedTo: gmcharlt@gmail.com ReportedBy: ruth@bywatersolutions.com QAContact: koha-bugs@lists.koha-community.org CC: ian.walls@bywatersolutions.com If you supply a default value in a framework field, you may include YYYY, MM, DD, and user, to substitute for the year, month, day, and currently-logged-in username, respectively. The downside of this is that the word "user" cannot be used in a default value for a note! Patch coming shortly, to change the substitution to require USER, and to allow the use of YY to insert the last two digits of the year. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7045 D Ruth Bavousett <ruth@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED AssignedTo|gmcharlt@gmail.com |ruth@bywatersolutions.com -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7045 --- Comment #1 from D Ruth Bavousett <ruth@bywatersolutions.com> 2011-10-17 14:18:43 UTC --- Created attachment 5922 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=5922 Proposed patch -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7045 D Ruth Bavousett <ruth@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 |PATCH-Sent Patch Status|--- |Needs Signoff -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7045 --- Comment #2 from Nicole C. Engard <nengard@gmail.com> 2011-10-17 14:30:42 UTC --- I need a bit more documentation on this patch as to how to test it. One smart lady once told me that more details are always relevant. See my screenshots that would make me fail this on QA - but I might be using it wrong. Nicole -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7045 --- Comment #3 from Nicole C. Engard <nengard@gmail.com> 2011-10-17 14:31:08 UTC --- Created attachment 5923 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=5923 default value $z -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7045 --- Comment #4 from Nicole C. Engard <nengard@gmail.com> 2011-10-17 14:31:31 UTC --- Created attachment 5924 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=5924 default value $e -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7045 --- Comment #5 from Nicole C. Engard <nengard@gmail.com> 2011-10-17 14:31:50 UTC --- Created attachment 5925 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=5925 default value $d -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7045 --- Comment #6 from Nicole C. Engard <nengard@gmail.com> 2011-10-17 14:32:14 UTC --- Created attachment 5926 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=5926 item form with strange defaults This doesn't match what i was expecting -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7045 --- Comment #7 from D Ruth Bavousett <ruth@bywatersolutions.com> 2011-10-17 14:36:27 UTC --- USER only substitutes in the bib record, not in items, which is why you're not seeing it in items. Otherwise, you're doing it right--not sure where those dashes are coming from on dates! Try this in bib fields (e.g. notes) as well, since addbiblio.pl is also being modified. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7045 --- Comment #8 from Nicole C. Engard <nengard@gmail.com> 2011-10-17 14:43:32 UTC --- Created attachment 5927 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=5927 works on bib record Okay, this works on the bib record, but the item record has all kind of craziness that needs cleaning up. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7045 --- Comment #9 from Nicole C. Engard <nengard@gmail.com> 2011-10-17 14:49:02 UTC --- Let me define craziness. 1. I entered YYYY-MM-DD as the default and it prints out as 2011-10-17-- 2. I entered USER and it doesn't translate 3. I entered MM/DD/YY and it prints out //11 -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7045 --- Comment #10 from Nicole C. Engard <nengard@gmail.com> 2011-10-17 14:49:53 UTC --- Note to self: Make sure that the manual states that USER only shows the last name (unless that too is part of the craziness) -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7045 --- Comment #11 from Jared Camins-Esakov <jcamins@cpbibliography.com> 2011-10-17 15:10:16 UTC --- Created attachment 5928 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=5928 Bug 7045: Default-value behavior inconsistency This patch will allow for YY as well as YYYY substitutions on framework default values, and changes the substitution of 'user' for the username to require USER. Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7045 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jcamins@cpbibliography.com --- Comment #12 from Jared Camins-Esakov <jcamins@cpbibliography.com> 2011-10-17 15:13:37 UTC --- I did not realize that substitutions were supposed to work in items, too. My experience suggested that it only worked with biblios, and that's what I was signing off on. Please ignore my signed-off patch, and wait for the revised patch from Ruth. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7045 D Ruth Bavousett <ruth@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #5922|0 |1 is obsolete| | Attachment #5923|0 |1 is obsolete| | Attachment #5924|0 |1 is obsolete| | Attachment #5925|0 |1 is obsolete| | Attachment #5926|0 |1 is obsolete| | Attachment #5928|0 |1 is obsolete| | --- Comment #13 from D Ruth Bavousett <ruth@bywatersolutions.com> 2011-10-17 15:22:53 UTC --- Created attachment 5929 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=5929 New patch -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7045 --- Comment #14 from D Ruth Bavousett <ruth@bywatersolutions.com> 2011-10-17 15:23:24 UTC --- As Nicole points out, this all works fine on biblio, but *not* on items--there was a problem with the way that the date was being created on items--I suspect that it wasn't working, ever, but this clears up a FIXME, because it now works correctly. And yes, it is grabbing the surname of the logged in user, Nicole; that's as-designed. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7045 D Ruth Bavousett <ruth@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #5929|0 |1 is obsolete| | --- Comment #15 from D Ruth Bavousett <ruth@bywatersolutions.com> 2011-10-17 15:27:49 UTC --- Created attachment 5931 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=5931 New patch, minus a typo. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7045 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #5931|0 |1 is obsolete| | --- Comment #16 from Nicole C. Engard <nengard@gmail.com> 2011-10-17 15:32:27 UTC --- Created attachment 5932 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=5932 [SIGNED-OFF] Bug 7045: Default-value behavior inconsistency This patch will allow for YY as well as YYYY substitutions on framework default values, and changes the substitution of 'user' for the username to require USER. It also will now allow USER in item fields. Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> Test Plan: 1. Edit 952 in one framework to include 4 defaults, YYYY-MM-DD, MM/DD/YY, USER, and user (in any fields) 2. Edit bib fields (I chose 5xx fields) with the same 4 values 3. Catalog using those frameworks and see if the values populate properly Note: USER enters the logged in User's last name only, not their username or their full name. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7045 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Needs Signoff |Signed Off -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7045 --- Comment #17 from Ian Walls <ian.walls@bywatersolutions.com> 2011-10-17 16:00:29 UTC --- I would think it would be more consistent to use <<YY>> and <<USER>> tokens, instead of raw strings. This would reduce the likelihood of substitution mistakes dramatically, and be consistent with the tokens we use in Notices. Also, I'm not positive that we should be governing individual subfield logic directly in the main code; a plugin would be more versatile with less risk of unintentional side effects. Architecture already exists to connect these plugins to frameworks, and things like date formatted could be handled by the system-preference values. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7045 --- Comment #18 from Nicole C. Engard <nengard@gmail.com> 2011-10-17 16:09:32 UTC --- Ruth's patch just fixes a function that was already there and undocumented - I'd say we should submit another bug/patch to change the way it works if that's necessary, but a fix to the way it works now is necessary if people want to use the word 'user' in a default. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7045 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.poulain@biblibre.com Patch Status|Signed Off |Failed QA --- Comment #19 from Paul Poulain <paul.poulain@biblibre.com> 2011-10-18 16:26:07 UTC --- My 2 cents :
I would think it would be more consistent to use <<YY>> and <<USER>> tokens, instead of raw strings. This would reduce the likelihood of substitution mistakes dramatically, and be consistent with the tokens we use in Notices.
==> I fully agree with Ian.
Also, I'm not positive that we should be governing individual subfield logic directly in the main code;
==> partially agreeing, but Ruth patch fixes a bug, it's not an improvement, so it should be in another bug QA comment: * what will be the behaviour for existing setups ? I feel they'll see their working user not working anymore (as we need USER) . It's worth a small updatedatabase with something like "UPDATE marc_subfield_structure SET defaultvalue='USER' WHERE defaultvalue='user'" Marking failed QA for now -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7045 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=10294 -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7045 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7045 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=14941 -- You are receiving this mail because: You are watching all bug changes. You are the QA Contact for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org