Bug 22742 - RenewLoan return wrong datetime format
Summary: RenewLoan return wrong datetime format
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Web services (show other bugs)
Version: master
Hardware: All All
: P5 - low trivial (vote)
Assignee: Arthur Suzuki
QA Contact: Testopia
URL:
Keywords:
Depends on: 22891
Blocks:
  Show dependency treegraph
 
Reported: 2019-04-19 09:47 UTC by Arthur Suzuki
Modified: 2019-05-30 19:16 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 22742: FIX : RenewLoan returns correct datetime format (940 bytes, patch)
2019-04-19 09:51 UTC, Arthur Suzuki
Details | Diff | Splinter Review
Bug 22742: FIX : RenewLoan returns correct datetime format (995 bytes, patch)
2019-05-10 19:09 UTC, Arthur Bousquet
Details | Diff | Splinter Review
Bug 22742: FIX : RenewLoan returns correct datetime format (1.12 KB, patch)
2019-05-10 20:06 UTC, Bin Wen
Details | Diff | Splinter Review
Bug 22742: FIX : RenewLoan returns correct datetime format (1.08 KB, patch)
2019-05-10 20:08 UTC, Bin Wen
Details | Diff | Splinter Review
Bug 22742: ILS-DI - Fix datetime format returned by RenewLoan (1.14 KB, patch)
2019-05-13 11:20 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Arthur Suzuki 2019-04-19 09:47:58 UTC
DateTime format returned by RenewLoan method is "%Y-%m-%d %H:%S".
I guess the later %S should be replaced with %M.
Comment 1 Arthur Suzuki 2019-04-19 09:51:30 UTC
Created attachment 88341 [details] [review]
Bug 22742: FIX : RenewLoan returns correct datetime format

Test plan :
Call RenewLoan a few times and check the date returned is correct (minute wise).
Comment 2 Arthur Bousquet 2019-05-10 19:09:56 UTC
Created attachment 89565 [details] [review]
Bug 22742: FIX : RenewLoan returns correct datetime format

Test plan :
Call RenewLoan a few times and check the date returned is correct (minute wise).

Signed-off-by: Arthur Bousquet <arthur.bousquet@inlibro.com>
Comment 3 Bin Wen 2019-05-10 20:06:49 UTC
Created attachment 89568 [details] [review]
Bug 22742: FIX : RenewLoan returns correct datetime format

Test plan :
Call RenewLoan a few times and check the date returned is correct (minute wise).

Signed-off-by: Arthur Bousquet <arthur.bousquet@inlibro.com>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>

https://bugs.koha-community.org/show_bug.cgi?id=22472
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Comment 4 Bin Wen 2019-05-10 20:08:59 UTC
Created attachment 89569 [details] [review]
Bug 22742: FIX : RenewLoan returns correct datetime format

Test plan :
Call RenewLoan a few times and check the date returned is correct (minute wise).

Signed-off-by: Arthur Bousquet <arthur.bousquet@inlibro.com>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>

https://bugs.koha-community.org/show_bug.cgi?id=22472
Comment 5 Katrin Fischer 2019-05-11 09:57:11 UTC
Hi Arthur, please check our guidelines for commit messages :)
https://wiki.koha-community.org/wiki/Commit_messages

Now:
[PATCH] Bug 22742: FIX : RenewLoan returns correct datetime format

Better: 
Bug 22742: ILS-DI: Fix datetime format returned by RenewLoan

I am sorry, but I am not able to test this further. RenewLoan dies for me:

circular data structures not supported at /home/vagrant/kohaclone/opac/ilsdi.pl line 233.

or: 

Can't encode a value of type: CODE at /home/vagrant/kohaclone/opac/ilsdi.pl line 233.

URL I used:
http://localhost:8080/cgi-bin/koha/ilsdi.pl?service=RenewLoan&patron_id=51&item_id=756

I am marking this as BLOCKED and dependent on the new bug 22891 I filed.

While I can see that this change should work, usually a unit test would be needed for any change in a .pm file.
Comment 6 Katrin Fischer 2019-05-13 11:20:50 UTC
Created attachment 89654 [details] [review]
Bug 22742: ILS-DI - Fix datetime format returned by RenewLoan

Test plan :
Call RenewLoan a few times and check the date returned is correct (minute wise).

Signed-off-by: Arthur Bousquet <arthur.bousquet@inlibro.com>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>

https://bugs.koha-community.org/show_bug.cgi?id=22472

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Nick Clemens 2019-05-15 12:14:26 UTC
Awesome work all!

Pushed to master for 19.05
Comment 8 Martin Renvoize 2019-05-30 19:16:41 UTC
Bug caused by enhancement not in 18.11.x series.