Bug 25802

Summary: Koha::Calendar->addDate should be renamed addDuration to better reflect it's purpose
Product: Koha Reporter: Martin Renvoize (ashimema) <martin.renvoize>
Component: Architecture, internals, and plumbingAssignee: Eden <eden.bacani>
Status: CLOSED FIXED QA Contact: Kyle M Hall (khall) <kyle>
Severity: enhancement    
Priority: P5 - low CC: caroline.cyr-la-rose, eden.bacani, ellawipatene, fridolin.somers, kyle
Version: MainKeywords: Academy
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.05.00
Circulation function:
Attachments: Bug 25802: changing addDate method to addDuration
Bug 25802: Change addDate to addDuration
Bug 25802: Change addDate to addDuration

Description Martin Renvoize (ashimema) 2020-06-18 10:55:03 UTC
The Koha::Calendar->addDate method actually expects a 'Duration', either as a DateTime::Duration object or as an integer and a unit definition.  

It would be better-called addDuration to reflect it's nature.
Comment 1 Eden 2021-01-19 01:51:17 UTC
Created attachment 115279 [details] [review]
Bug 25802: changing addDate method to addDuration

1.  check using git grep command that addDate does not exist
2. check the patch that addDuration is spelt right
3. Check that tests pass t/Calendar.t
Comment 2 Martin Renvoize (ashimema) 2021-01-19 17:02:50 UTC
Created attachment 115341 [details] [review]
Bug 25802: Change addDate to addDuration

1. Check using git grep command that addDate does not exist
2. Check the patch that addDuration is spelt right
3. Check that tests pass t/Calendar.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 3 Martin Renvoize (ashimema) 2021-01-19 17:03:22 UTC
Excellent work, thanks for your contribution and welcome to the community.

Signing off.
Comment 4 Kyle M Hall (khall) 2021-01-21 19:52:36 UTC
Created attachment 115614 [details] [review]
Bug 25802: Change addDate to addDuration

1. Check using git grep command that addDate does not exist
2. Check the patch that addDuration is spelt right
3. Check that tests pass t/Calendar.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 5 Jonathan Druart 2021-01-22 13:54:03 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 6 Fridolin Somers 2021-01-29 13:53:25 UTC
Enhancement not pushed to 20.11.x