Summary: | A date is not correctly filled in default values from batch mod [was Remove C4::Dates from tools/batchMod.pl] | ||
---|---|---|---|
Product: | Koha | Reporter: | Marc Véron <veron> |
Component: | Architecture, internals, and plumbing | Assignee: | Marc Véron <veron> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | chris, jonathan.druart, joonas.kylmala, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14922 | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 14870 | ||
Attachments: |
Bug 14950 - Remove C4::Dates from tools/batchMod.pl
Bug 14950 - Remove C4::Dates from tools/batchMod.pl Bug 14950 - Assign default value for YYYY, MM and DD Bug 14950: Remove unused variable $today_iso Bug 14922: Fix day formatting if < 10 |
Description
Marc Véron
2015-10-04 18:09:53 UTC
Created attachment 43095 [details] [review] Bug 14950 - Remove C4::Dates from tools/batchMod.pl This patch removes C4::Dates from tools/batchMod.pl To test: - In MARC bibliographic Default 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 - Got to Home > Tools > Batch item modification - Enter one ore more barcodes you want to modify - Check checkbox 'Populate fields with defautl values from defautl framework - Click 'Continue' - Verify on the follwing screen that the field in Edit form is populated as appropriate (in our example 'x - Non public note') - Clcik 'Save' - Verify that the items are updated as appropriate What is the comment "FIXME: iso dates don't have commas!" about? split ',', $today_iso doesn't work? Or is the comment about that Koha uses a comma instead of -? (In reply to Joonas Kylmälä from comment #2) > What is the comment "FIXME: iso dates don't have commas!" about? split ',', > $today_iso doesn't work? Or is the comment about that Koha uses a comma > instead of -? I do not really know what the author of tis comment intended. But the comment now is obsolete because the code changed to get the values to replace YYYY, MM and DD (In reply to Marc Véron from comment #3) > (In reply to Joonas Kylmälä from comment #2) > > What is the comment "FIXME: iso dates don't have commas!" about? split ',', > > $today_iso doesn't work? Or is the comment about that Koha uses a comma > > instead of -? > > I do not really know what the author of tis comment intended. But the > comment now is obsolete because the code changed to get the values to > replace YYYY, MM and DD Yes, it's obsolete now. I was reading the git diff in the wrong way and thought that you put the comment there ! :) Created attachment 43106 [details] [review] Bug 14950 - Remove C4::Dates from tools/batchMod.pl Test plan worked. Code looks good. This patch removes C4::Dates from tools/batchMod.pl To test: - In MARC bibliographic Default 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 - Got to Home > Tools > Batch item modification - Enter one ore more barcodes you want to modify - Check checkbox 'Populate fields with defautl values from defautl framework - Click 'Continue' - Verify on the follwing screen that the field in Edit form is populated as appropriate (in our example 'x - Non public note') - Clcik 'Save' - Verify that the items are updated as appropriate Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com> Created attachment 43155 [details] [review] Bug 14950 - Assign default value for YYYY, MM and DD [was Remove C4::Dates from tools/batchMod.pl] This patch replace the YYYY, MM and DD if defined in the default values. This patch also removes C4::Dates from tools/batchMod.pl To test: - In MARC bibliographic Default 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 - Got to Home > Tools > Batch item modification - Enter one ore more barcodes you want to modify - Check checkbox 'Populate fields with defautl values from defautl framework - Click 'Continue' - Verify on the follwing screen that the field in Edit form is populated as appropriate (in our example 'x - Non public note') - Click 'Save' - Verify that the items are updated as appropriate Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Amended commit message: This is a bug fix and can be backported. The YYYY, MM and DD were not replaced correctly before this patch. I got Year:2015-10-06 Month: Day: now I correctly get Year: 2015 Month: 10 Day: 06 Created attachment 43156 [details] [review] Bug 14950: Remove unused variable $today_iso This variable is not used anymore in the template (and has never been used...). Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Patches pushed to master. Thanks Marc! Created attachment 43434 [details] [review] Bug 14922: Fix day formatting if < 10 $dt->day return a single digit if < 10, we want to display it on 2 digits Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Tomas, could you please consider this last patch for master please? On bug 14922, I caught this problem and would prefer to fix it here as the patches could be backported on stable branches (14922 is an enh). Good catch Jonathan! Patch pushed to master, with correctect subject. Pushed to 3.20.x will be in 3.20.5 |