[Bug 14922] New: Remove C4::Dates from cataloguing/additem.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14922 Bug ID: 14922 Summary: Remove C4::Dates from cataloguing/additem.pl Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: veron@veron.ch QA Contact: testopia@bugs.koha-community.org This patch removes C4::Dates from cataloguing/additem.pl -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14922 --- Comment #1 from Marc Véron <veron@veron.ch> --- Created attachment 42951 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42951&action=edit Bug 14922 - Remove C4::Dates from cataloguing/additem.pl C4::Dates is not used in this file. Removed. To test: - Apply patch. - Search a biblio - Add/Edit items - Verify that everything behaves as without patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14922 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |14870 Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch QA Contact|testopia@bugs.koha-communit |veron@veron.ch |y.org | Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14870 [Bug 14870] Delete C4/Dates.pm from System -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14922 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|veron@veron.ch |testopia@bugs.koha-communit | |y.org Assignee|gmcharlt@gmail.com |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=14922 Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |In Discussion CC| |hector.hecaxmmx@gmail.com --- Comment #2 from Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> --- Hi, Marc. The module C4::Dates is still used in line 504 my $today_iso = C4::Dates->today('iso'); The scalar variable it's repeating in many places. So I change here the bug status to in discussion Regards -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14922 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #42951|0 |1 is obsolete| | --- Comment #3 from Marc Véron <veron@veron.ch> --- Comment on attachment 42951 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42951 Bug 14922 - Remove C4::Dates from cataloguing/additem.pl New patch will follow. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14922 --- Comment #4 from Marc Véron <veron@veron.ch> --- Created attachment 42973 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42973&action=edit Bug 14922 - Remove C4::Dates from cataloguing/additem.pl This patch removes C4::Dates from cataloguing/additem.pl To test: - In MARC bibliographic framework, define a default value for one of the in Tag 952 Subfield struture, e.g. for subfield x Non-public note. You can define it under 'Advancde constraints'. Define the value similar to the following: Year:YYYY Month:MM Day:DD - Create a new item for a biblio and verify that YYYY, MM and DD are replaced with today's values. - Apply patch and repeat that previous step behaves as before. - Verify that the overall functionality of the form is the same as before applying the patch. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14922 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14922 Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #42973|0 |1 is obsolete| | --- Comment #5 from Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> --- Created attachment 42987 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42987&action=edit [SIGNED-OFF]Bug 14922 - Remove C4::Dates from cataloguing/additem.pl This patch removes C4::Dates from cataloguing/additem.pl To test: - In MARC bibliographic framework, define a default value for one of the in Tag 952 Subfield struture, e.g. for subfield x Non-public note. You can define it under 'Advancde constraints'. Define the value similar to the following: Year:YYYY Month:MM Day:DD - Create a new item for a biblio and verify that YYYY, MM and DD are replaced with today's values. - Apply patch and repeat that previous step behaves as before. - Verify that the overall functionality of the form is the same as before applying the patch. Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised. With the last script not accept more than YYYYMMDD If you enter something else, the script sends to the end of line. This patch follow up the pattern in constraint default value -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14922 Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.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=14922 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Marc, What about using Koha::DateUtils to replace ->today? Something like my $today = dt_from_string; my $month = $today->month; my $day = $today->day; do what you want. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14922 --- Comment #7 from Marc Véron <veron@veron.ch> --- Created attachment 43069 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43069&action=edit Bug 14922 - Remove C4::Dates from cataloguing/additem.pl This patch removes C4::Dates from cataloguing/additem.pl To test: - In MARC bibliographic framework, define a default value for one of the in Tag 952 Subfield struture, e.g. for subfield x Non-public note. You can define it under 'Advancde constraints'. Define the value similar to the following: Year:YYYY Month:MM Day:DD - Create a new item for a biblio and verify that YYYY, MM and DD are replaced with today's values. - Apply patch and repeat that previous step behaves as before. - Verify that the overall functionality of the form is the same as before applying the patch. Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised. With the last script not accept more than YYYYMMDD If you enter something else, the script sends to the end of line. This patch follow up the pattern in constraint default value Patch amended following comment #6 / mv -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14922 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #42987|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14922 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14922 Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |In Discussion --- Comment #8 from Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> --- (In reply to Marc Véron from comment #7)
Created attachment 43069 [details] [review] Bug 14922 - Remove C4::Dates from cataloguing/additem.pl ... Patch amended following comment #6 / mv
Hi, MARC I tested this patch with this kind of patterns: Pattern: Year:YYYY Month:MM Day:DD the result is: Year:2015-10-07T11:26:57->year Mount:2015-10-07T11:26:57->month Date:2015-10-07T11:26:57->day Pattern: YYYYMMDD Result: 2015-10-07T11:35:32->year2015-10-07T11:35:32->month2015-10-07T11:35:32->day I've been tested other sort of patterns but the result is the same. Patch 14936 not applied since patch in Discussion and not mentioned in this bug. I don't know if this behaviour in dates is right. Regards -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14922 --- Comment #9 from Marc Véron <veron@veron.ch> --- Hi Hector, Thanks for testing - and silly me, I tested be editing an item where the value had already been set by previous tests. Patch follows. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14922 --- Comment #10 from Marc Véron <veron@veron.ch> --- Created attachment 43203 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43203&action=edit Bug 14922 - (followup) Fix string output This patch makes YYYY MM and DD display correctly. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14922 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14922 Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nengard@gmail.com --- Comment #11 from Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> --- I was looking that there no info about this in documentation <http://manual.koha-community.org/3.14/en/catadmin.html#editsubfields>, section Advanced constraints or I don't know if this exist in another page. I added here Documentation Manager. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14922 Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #43069|0 |1 is obsolete| | --- Comment #12 from Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> --- Created attachment 43215 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43215&action=edit [SIGNED OFF]Bug 14922 - Remove C4::Dates from cataloguing/additem.pl This patch removes C4::Dates from cataloguing/additem.pl To test: - In MARC bibliographic framework, define a default value for one of the in Tag 952 Subfield struture, e.g. for subfield x Non-public note. You can define it under 'Advancde constraints'. Define the value similar to the following: Year:YYYY Month:MM Day:DD - Create a new item for a biblio and verify that YYYY, MM and DD are replaced with today's values. - Apply patch and repeat that previous step behaves as before. - Verify that the overall functionality of the form is the same as before applying the patch. Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised. With the last script not accept more than YYYYMMDD If you enter something else, the script sends to the end of line. This patch follow up the pattern in constraint default value Patch amended following comment #6 / mv -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14922 Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #43203|0 |1 is obsolete| | --- Comment #13 from Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> --- Created attachment 43216 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43216&action=edit [SIGNED-OFF]Bug 14922 - (followup) Fix string output This patch makes YYYY MM and DD display correctly. Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14922 Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.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=14922 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Marc, I would prefer the first version, could be done with: my ( $yyyy, $mm, $dd ) = ( $today->year, $today->month, $today->day ); $value =~ s/YYYY/$yyyy/g; $value =~ s/MM/$mm/g; $value =~ s/DD/$dd/g; and avoid 1 call to output_string. Especially because it's how we did on bug 14950 for batchMod.pl (also the default values). But maybe we have an issue, the $today->day returns "8" instead of "08". I don't know what is the expected behavior. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14922 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=14950 --- Comment #15 from Marc Véron <veron@veron.ch> --- Hi Jonathan, Would that be the same as the patch from comment #5, the first one signed-off by Héctor? http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42987 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14922 --- Comment #16 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I would prefer not to depend on something else than Koha::DateUtils. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14922 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |In Discussion --- Comment #17 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Marc, I think that 14950 has introduced a bug (3 instead of 03), do you agree with that? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14922 --- Comment #18 from Marc Véron <veron@veron.ch> --- (In reply to Jonathan Druart from comment #17)
Marc, I think that 14950 has introduced a bug (3 instead of 03), do you agree with that?
Do you mean because of tools/batchMod.pl near line 337? my $month = $today->month; my $day = $today->day; Output without leading 0 (3 instead of 03)? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14922 --- Comment #19 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- yes, exactly, both should have the same behavior. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14922 --- Comment #20 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (and yes I know, it was my idea... sorry!) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14922 --- Comment #21 from Marc Véron <veron@veron.ch> --- (In reply to Jonathan Druart from comment #20)
(and yes I know, it was my idea... sorry!)
No problem :-) Is it necessay to fix 14950 immediately? My problem is that I am now out of office for about 2 days... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14922 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14922 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #43215|0 |1 is obsolete| | Attachment #43216|0 |1 is obsolete| | --- Comment #22 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 43435 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43435&action=edit Bug 14922 - Remove C4::Dates from cataloguing/additem.pl This patch removes C4::Dates from cataloguing/additem.pl To test: - In MARC bibliographic framework, define a default value for one of the in Tag 952 Subfield struture, e.g. for subfield x Non-public note. You can define it under 'Advancde constraints'. Define the value similar to the following: Year:YYYY Month:MM Day:DD - Create a new item for a biblio and verify that YYYY, MM and DD are replaced with today's values. - Apply patch and repeat that previous step behaves as before. - Verify that the overall functionality of the form is the same as before applying the patch. Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised. With the last script not accept more than YYYYMMDD If you enter something else, the script sends to the end of line. This patch follow up the pattern in constraint default value Patch amended following comment #6 / mv Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14922 --- Comment #23 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 43436 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43436&action=edit Bug 14922 - (followup) Fix string output This patch makes YYYY MM and DD display correctly. Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14922 --- Comment #24 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Marc Véron from comment #21)
(In reply to Jonathan Druart from comment #20)
(and yes I know, it was my idea... sorry!)
No problem :-)
Is it necessay to fix 14950 immediately? My problem is that I am now out of office for about 2 days...
I have submitted a patch on bug 14950 to fix the issue. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14922 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|Passed QA |Pushed to Master --- Comment #25 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patches pushed to master. Thanks Marc! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14922 --- Comment #26 from Nicole C. Engard <nengard@gmail.com> --- (In reply to Héctor Eduardo Castro Avalos from comment #11)
I was looking that there no info about this in documentation <http://manual.koha-community.org/3.14/en/catadmin.html#editsubfields>, section Advanced constraints or I don't know if this exist in another page.
I added here Documentation Manager.
I removed it from the manual when I found that it no longer worked. I'll add it in to the recent manual. Nicole -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org