Bug 22742

Summary: RenewLoan return wrong datetime format
Product: Koha Reporter: Arthur Suzuki <arthur.suzuki>
Component: Web servicesAssignee: Arthur Suzuki <arthur.suzuki>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low CC: martin.renvoize, nick
Version: Main   
Hardware: All   
OS: All   
GIT URL: 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: 22891    
Bug Blocks:    
Attachments: Bug 22742: FIX : RenewLoan returns correct datetime format
Bug 22742: FIX : RenewLoan returns correct datetime format
Bug 22742: FIX : RenewLoan returns correct datetime format
Bug 22742: FIX : RenewLoan returns correct datetime format
Bug 22742: ILS-DI - Fix datetime format returned by RenewLoan

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 (kidclamp) 2019-05-15 12:14:26 UTC
Awesome work all!

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