Bug 14931 - Remove C4::Dates from files admin/aq*.pl
Summary: Remove C4::Dates from files admin/aq*.pl
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Marc Véron
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 14870
  Show dependency treegraph
 
Reported: 2015-09-30 16:49 UTC by Marc Véron
Modified: 2016-06-21 21:40 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 14931 - Remove C4::Dates from files admin/aq*.pl (5.47 KB, patch)
2015-09-30 16:52 UTC, Marc Véron
Details | Diff | Splinter Review
[SIGNED-OFF]Bug 14931 - Remove C4::Dates from files admin/aq*.pl (5.68 KB, patch)
2015-10-09 16:15 UTC, Héctor Eduardo Castro Avalos
Details | Diff | Splinter Review
Bug 14931 - (Follow-up) Validate date entry in contracts (6.70 KB, patch)
2015-10-15 11:05 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 14931 - (Follow-up) Validate date entry in contracts (7.06 KB, patch)
2015-10-25 17:22 UTC, Marc Véron
Details | Diff | Splinter Review
[SIGNED OFF] Bug 14931 - (Follow-up) Validate date entry in contracts (7.12 KB, patch)
2015-10-27 21:40 UTC, Jesse Weaver
Details | Diff | Splinter Review
Bug 14931 - Remove C4::Dates from files admin/aq*.pl (5.74 KB, patch)
2015-10-28 08:42 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14931 - (Follow-up) Validate date entry in contracts (7.18 KB, patch)
2015-10-28 08:42 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14931: (qa followu-up) small improvements (1.96 KB, patch)
2015-10-28 08:42 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14931: Fix test xt/author/valid_templates complaining on opac-topissues.tt (1.14 KB, patch)
2015-10-28 08:59 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Véron 2015-09-30 16:49:23 UTC
This patch removes C4::Dates from:

- admin/aqbudgets.pl
- admin/aqplan.pl
- admin/aqcontract.pl


To test:

- Apply patch

- Go to Home > Adminstration > Budgets > All funds
  (admin/aqbudgets.pl)
- Verify that everything displays as before

- Edit one of the funds and click on 'Planning - Plan by months'
  (admin/aqplan.pl)
- Verify that planning works as before

- Go to Home > Acquisitions, search for an active vendor and view the vendor
- Click on 'Contracts' at the left
  (admin/aqcontract.pl)
- Create and edit contracts and verify that it works OK.
  (Note: there is no help for this page, see Bug 14929)
Comment 1 Marc Véron 2015-09-30 16:52:26 UTC Comment hidden (obsolete)
Comment 2 Héctor Eduardo Castro Avalos 2015-10-09 16:15:21 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2015-10-15 09:16:40 UTC
I get a software error if the dates are not correctly formatted.
Comment 4 Marc Véron 2015-10-15 11:05:56 UTC Comment hidden (obsolete)
Comment 5 Marc Véron 2015-10-15 11:07:02 UTC
The Follow-up needs an other sign-off.
Comment 6 Marc Véron 2015-10-23 09:41:33 UTC
Still applies
Comment 7 Héctor Eduardo Castro Avalos 2015-10-23 20:34:40 UTC
Sorry Marc, but fail me.

This is the error message:

DBIx::Class::ResultSet::find(): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= 'booksellerid' AND me.1 IS NULL AND me.2015-12-31 = 'contractname' AND me.Fict' at line 1 at /home/koha/kohaclone/C4/Contract.pm line 125

This happend me when modifing the contract and i've entered an invalid date 32/10/2015 (DD/MM/YY)

This happen me when modifying the contract and entered an invalid date 32/10/2015 (DD/MM/YY)
Comment 8 Marc Véron 2015-10-25 17:22:55 UTC Comment hidden (obsolete)
Comment 9 Jesse Weaver 2015-10-27 21:40:38 UTC Comment hidden (obsolete)
Comment 10 Jonathan Druart 2015-10-28 08:42:28 UTC
Created attachment 44103 [details] [review]
Bug 14931 - Remove C4::Dates from files admin/aq*.pl

This patch removes C4::Dates from:

- admin/aqbudgets.pl
- admin/aqplan.pl
- admin/aqcontract.pl

To test:

- Apply patch

- Go to Home > Adminstration > Budgets > All funds
  (admin/aqbudgets.pl)
- Verify that everything displays as before

- Edit one of the funds and click on 'Planning - Plan by months'
  (admin/aqplan.pl)
- Verify that planning works as before

- Go to Home > Acquisitions, search for an active vendor and view the vendor
- Click on 'Contracts' at the left
  (admin/aqcontract.pl)
- Create and edit contracts and verify that it works OK.
  (Note: there is no help for this page, see Bug 14929)

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. Tested with dateformat syspref
Dates in planning by months not needed to be on iso format, aqplan.pl
uses instead Date::Calc

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 11 Jonathan Druart 2015-10-28 08:42:39 UTC
Created attachment 44104 [details] [review]
Bug 14931 - (Follow-up) Validate date entry in contracts

Go to Home > Acquisitions, search for an active vendor and view the vendor
- Click on 'Contracts' at the left
  (admin/aqcontract.pl)
- Create and edit contracts and verify that it works OK.
  (Note: there is no help for this page, see Bug 14929)

Amended for comment #7  25.10.2015 / mv

Signed-off-by: Jesse Weaver <pianohacker@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 12 Jonathan Druart 2015-10-28 08:42:43 UTC
Created attachment 44105 [details] [review]
Bug 14931: (qa followu-up) small improvements

- Avoid 1 call to dt_from_string in some cases
- Do not use $_

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 13 Jonathan Druart 2015-10-28 08:59:41 UTC Comment hidden (obsolete)
Comment 14 Tomás Cohen Arazi 2015-10-29 15:05:42 UTC
Patches pushed to master.

Thanks Marc!