Bug 25802 - Koha::Calendar->addDate should be renamed addDuration to better reflect it's purpose
Summary: Koha::Calendar->addDate should be renamed addDuration to better reflect it's ...
Status: RESOLVED 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: Eden
QA Contact: Kyle M Hall
URL:
Keywords: Academy
Depends on:
Blocks:
 
Reported: 2020-06-18 10:55 UTC by Martin Renvoize
Modified: 2021-06-14 21:35 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Text to go in the release notes:
Version(s) released in:
21.05.00


Attachments
Bug 25802: changing addDate method to addDuration (7.97 KB, patch)
2021-01-19 01:51 UTC, Eden
Details | Diff | Splinter Review
Bug 25802: Change addDate to addDuration (8.02 KB, patch)
2021-01-19 17:02 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 25802: Change addDate to addDuration (8.09 KB, patch)
2021-01-21 19:52 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 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 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 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 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