Bug 17983 - Add minutes loan to DiscreteCalendar
Summary: Add minutes loan to DiscreteCalendar
Status: BLOCKED
Alias: None
Product: Koha
Classification: Unclassified
Component: Holidays (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: David Bourgault
QA Contact: Testopia
URL:
Keywords:
Depends on: 17015
Blocks:
  Show dependency treegraph
 
Reported: 2017-01-24 16:51 UTC by Mehdi Hamidi
Modified: 2024-06-18 13:55 UTC (History)
9 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 17983 - Added minutes loan to Koha/DiscreteCalendar (3.77 KB, patch)
2017-01-24 17:21 UTC, Mehdi Hamidi
Details | Diff | Splinter Review
Bug 17983 - Enabled the use of minutes loan (4.48 KB, patch)
2017-01-24 17:21 UTC, Mehdi Hamidi
Details | Diff | Splinter Review
Bug 17983 - Tests for minutes loan (7.16 KB, patch)
2017-01-24 17:21 UTC, Mehdi Hamidi
Details | Diff | Splinter Review
Bug 17983 - Add Minutes math to DiscreteCalendar (3.95 KB, patch)
2017-10-10 15:20 UTC, David Bourgault
Details | Diff | Splinter Review
Bug 17983 - Enabled the use of minutes loan (4.48 KB, patch)
2017-10-10 15:20 UTC, David Bourgault
Details | Diff | Splinter Review
Bug 17983 - Tests for minutes loan (7.12 KB, patch)
2017-10-10 15:20 UTC, David Bourgault
Details | Diff | Splinter Review
Expected due date entry field (31.55 KB, image/png)
2017-10-11 17:49 UTC, David Bourgault
Details
no calendar option at point of checkout (156.28 KB, image/png)
2017-10-12 15:55 UTC, J Schmidt
Details
Bug 17983 part 2 screen capture, collapsed checkout options (154.78 KB, image/png)
2017-10-12 15:58 UTC, J Schmidt
Details
Bug 17983 - Add Minutes math to DiscreteCalendar (3.95 KB, patch)
2018-03-27 19:56 UTC, Charles Farmer
Details | Diff | Splinter Review
Bug 17983 - Enabled the use of minutes loan (4.32 KB, patch)
2018-03-27 19:56 UTC, Charles Farmer
Details | Diff | Splinter Review
Bug 17983 - Tests for minutes loan (7.12 KB, patch)
2018-03-27 19:56 UTC, Charles Farmer
Details | Diff | Splinter Review
Bug 17983: Add minute loans (15.28 KB, patch)
2018-05-22 19:42 UTC, David Bourgault
Details | Diff | Splinter Review
fixed patch tests and minor adjustments (18.13 KB, patch)
2022-03-18 18:18 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 17983: Add minutes loan to DiscreteCalendar (18.81 KB, patch)
2022-03-18 18:43 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 17983: Add minutes loan to DiscreteCalendar (18.82 KB, patch)
2022-03-18 18:44 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 17983: Add minutes loan to DiscreteCalendar (1.55 KB, patch)
2022-03-18 19:00 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 17983: Add minutes loan to DiscreteCalendar (18.93 KB, patch)
2022-06-22 13:24 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 17983: Add minutes loan to DiscreteCalendar (1.55 KB, patch)
2022-06-22 13:24 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 17983: Add minutes loan to DiscreteCalendar (18.83 KB, patch)
2022-08-19 19:04 UTC, Blou
Details | Diff | Splinter Review
Bug 17983: Add minutes loan to DiscreteCalendar (19.03 KB, patch)
2022-11-25 15:47 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 17983: Add minutes loan to DiscreteCalendar (18.63 KB, patch)
2023-05-18 21:08 UTC, Maryse Simard
Details | Diff | Splinter Review
Bug 17983: Add minutes loan to DiscreteCalendar (18.23 KB, patch)
2024-06-18 13:55 UTC, Maryse Simard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Mehdi Hamidi 2017-01-24 16:51:40 UTC
Hello everyone,
This is an additional feature to our new Discrete Calendar.
Theses patches add the possibility to choose the loan unit as minutes in circulations rules.


Test plan:
- Apply patch of Bugzilla 17015
- Apply this patch.
- Run test t/db_dependent/minutes_loan.t
- Create new item type for the new rule.
- Create circulation rule and fill the fields, make sure the unit is set to : minutes, choose the item type of the one created above.- 
- Checkout an item that follow the circulation rule and set due date in the past.

- Run fines.pl.
- Check if the correct amount was calculated.
    - Note: make sure to factor in the fine grace period if set and the system preference FinesIncludeGracePeriod.
Comment 1 Mehdi Hamidi 2017-01-24 17:21:13 UTC Comment hidden (obsolete)
Comment 2 Mehdi Hamidi 2017-01-24 17:21:24 UTC Comment hidden (obsolete)
Comment 3 Mehdi Hamidi 2017-01-24 17:21:29 UTC Comment hidden (obsolete)
Comment 4 Mehdi Hamidi 2017-01-24 17:22:38 UTC
Forget to mention : run Koha tests to make sure everything still works properly.
Comment 5 David Bourgault 2017-10-10 15:20:43 UTC Comment hidden (obsolete)
Comment 6 David Bourgault 2017-10-10 15:20:49 UTC Comment hidden (obsolete)
Comment 7 David Bourgault 2017-10-10 15:20:55 UTC Comment hidden (obsolete)
Comment 8 David Bourgault 2017-10-10 15:22:38 UTC
A patch correcting errors in Bug 17015 (on which this bug depends) broke this bug. I rebased the patches to correct this, and corrected an error in minutes_loan.t which should now pass OK.
Comment 9 J Schmidt 2017-10-11 16:00:19 UTC
-Used sandbox 2 from ByWater.
-Went to Koha admin > Added a new item type (EQUIP)
-Saved those changes.
-Went to Koha admin > Circ and fine rules > Select a library > Betatown.
-Added a new loan rule for the Betatown library.
-New loan rule was Patron category (All). Item type (EQUIP for Equipment). Current Checkouts allow (10). Current on-site checkouts allowed 10. Loan period 4
Comment 10 J Schmidt 2017-10-11 16:20:36 UTC
-Used sandbox 2 from ByWater.
-Went to Koha admin > Added a new item type (EQUIP)
-Saved those changes.
-Went to Koha admin > Circ and fine rules > Select a library > Betatown.
-Added a new loan rule for the Betatown library.
-New loan rule was Patron category (All). Item type (EQUIP for Equipment). Current Checkouts allow (10). Current on-site checkouts allowed 10. Loan period 60 minutes. Hard due date skipped. Fine amount is 1.00. Fine charging interval is 60. When to charge. End of interval. Fine grace period is 120. Overdue fines cap is $10. Renewals allowed count is 1. Renewal period is 60. Automatic renewal is no. Holds allowed is 0...nothing else. loan rule saved.
-Koha > Cataloging > New Record > Fast Add framework. Filled in minimal fields (245$a... couldn't find 100$a, 008)....Save.
-Add item with the new EQUIP item type. Betatown being the permanent and current location....952$d, barcode is 39999000019209, 952$v $50.00, non public note. Click Add item to save the new item

-Koha Check out > Test.
-Checkout to test patron 29999000001016 using barcode 39999000019209
-Clicked checkout settings in advance of selecting the barcode but I'm not seeing the calendar to set the due date into the past....hmmm. 
-Having no calendar to set date due in past I click checkout. Equipment piece is due on 11/10/2017. 

-I go to Koha Set library changing myself to be Betatown. 
-Koha Tools > Calendar > betatown.... looks to be open for 10/11/17
-Koha Tools > Discrete calendar for betatown has no closed times added....
-Koha Checkin 39999000019209 equipment item.
-Koha change test patron to be Betatown patron.
-Checkout new piece of equipment 39999000019209 to Betatown test patron but no calendar displays allowing me to set date due in past. no ability to set any sort of hour either. Not able to go further with fines... etc. 

-Test failed. 10/11/17. jls.
Comment 11 David Bourgault 2017-10-11 17:49:42 UTC
Created attachment 67969 [details]
Expected due date entry field

Following essentially the same steps as you I went to checkout the item and got the expected result. If I understand correctly, you are saying that under "checkout settings" you do not see a date entry field to set the due date, is that correct?

I attached a picture of what it should look like/looks like on my machine.
Comment 12 J Schmidt 2017-10-11 17:54:48 UTC
(In reply to David Bourgault from comment #11)
> Created attachment 67969 [details]
> Expected due date entry field
> 
> Following essentially the same steps as you I went to checkout the item and
> got the expected result. If I understand correctly, you are saying that
> under "checkout settings" you do not see a date entry field to set the due
> date, is that correct?
> 
> I attached a picture of what it should look like/looks like on my machine.

Yes, that is correct. I did not get that calendar shown in your attachment. I'm familiar with that calendar for checkout and the need to set it before actually checking out a specific item by barcode. No clicking I did brought up that calendar. I used Chrome... Sandbox 2....
Comment 13 David Bourgault 2017-10-11 19:59:49 UTC
I tested again on Chrome, Firefox and Opera and managed to get the calendar to show everytime. Did you make sure to clear the cache before checking out? The 7015 patch changes some javascript, maybe it simply did not update correctly. If you could try again but with a clean cache (Ctrl+F5) I'd be very grateful.

David
Comment 14 J Schmidt 2017-10-12 15:54:06 UTC
Hello,
Trying this again...cleared browser cache.....

--Sandbox3 from ByWater.
--Login and set my library to be Betatown.
--Go to Koha Admin > IUtem Types. Create a new item type for EQUIPMENT with EQUIP code.
--Koha Admin > Circ and fine rules for Betatown. 
--Created a new loan rule for Library Betatown for all patrons using new EQUIP item type. Current checkouts allowed is 10; Current on-site checkouts allow is 10. Loan period is 60 minutes. No hard due date. Fine amount is 1.00 fine charging interval is 60 minutes. Charged at the END of interval. Fine grace period is 0. Overdue fines cap is $10.00. Renewaks allowed is 0. No automatic renewwal or holds... Saved loan rule.  
--Search the catalog for a record. Not seeing any records readily. I make a new brief bib on a default framework (filling in required fields like 942, 005, 040, etc.) and item record (952$a, b is betatown, item type is EQUIP, filled in replacement cost, date acquired...). Add item.

--item barcode is 39999000019209
--Go to test patron, 29999000001016 to check out above item (Equip)... 

--Again no calendar to be found... See attached image. 

--Really do not think it's updated..... Hmmm. jen.s
Comment 15 J Schmidt 2017-10-12 15:55:45 UTC
Created attachment 68016 [details]
no calendar option at point of checkout

Screen shot for 17983. Not seeing a calendar option via JS at the point of Koha checkout. Sandbox 3 ByWater... to test bug.
Comment 16 J Schmidt 2017-10-12 15:58:49 UTC
Created attachment 68017 [details]
Bug 17983 part 2 screen capture, collapsed checkout options

This goes with the last attachment. Screen shot for 17983 to show collapsed checkout options at the point of checkout. No calendar window triggered. I almost went into staff client JS to look for anything there.... FYI. jen.
Comment 17 Blou 2017-10-12 17:52:46 UTC
Hi Jen,

I'm curious, those things (calendar...) are put in with Bug 17015.  You've applied it first (I presume), have you tested it before applying 17983?  That could help us see where the issue is.
Comment 18 J Schmidt 2017-11-02 19:59:26 UTC
(In reply to Blou from comment #17)
> Hi Jen,
> 
> I'm curious, those things (calendar...) are put in with Bug 17015.  You've
> applied it first (I presume), have you tested it before applying 17983? 
> That could help us see where the issue is.

Hi,
I typically use ByWater's sandbox page and click "Apply" for a specific sandbox. I think that action means it will apply any dependent patches automatically.  Nick at ByWater relayed I should look into the syspref to set it to SpecifyDueDate which I did not do. I'll test again and do that system pref.  Thank you. jls.
Comment 19 Charles Farmer 2018-03-27 19:56:04 UTC Comment hidden (obsolete)
Comment 20 Charles Farmer 2018-03-27 19:56:09 UTC Comment hidden (obsolete)
Comment 21 Charles Farmer 2018-03-27 19:56:14 UTC Comment hidden (obsolete)
Comment 22 David Bourgault 2018-05-22 19:42:48 UTC
Created attachment 75480 [details] [review]
Bug 17983: Add minute loans

Rebased patch:
+ Adds minute loans logic to DiscreteCalendar
+ Enables minutes loans in Koha code
+ Adds tests for minute loans
Comment 23 Katrin Fischer 2020-01-11 18:36:21 UTC
Marking as BLOCKED because dependency is FQA.
Comment 24 Shi Yao Wang 2022-03-18 18:18:41 UTC
Created attachment 131929 [details] [review]
fixed patch tests and minor adjustments
Comment 25 Shi Yao Wang 2022-03-18 18:43:15 UTC
Created attachment 131930 [details] [review]
Bug 17983: Add minutes loan to DiscreteCalendar

This is an additional feature to our new Discrete Calendar.
Theses patches add the possibility to choose the loan unit as minutes in circulations rules.

Test plan:
- Apply patch of Bugzilla 17015
- Apply this patch.
- Run test t/db_dependent/minutes_loan.t
- Create new item type for the new rule.
- Create circulation rule and fill the fields, make sure the unit is set to : minutes, choose the item type of the one created above.-
- Checkout an item that follow the circulation rule and set due date in the past.

- Run fines.pl.
- Check if the correct amount was calculated.
    - Note: make sure to factor in the fine grace period if set and the system preference FinesIncludeGracePeriod.fixed patch tests and minor adjustments
Comment 26 Shi Yao Wang 2022-03-18 18:44:37 UTC
Created attachment 131931 [details] [review]
Bug 17983: Add minutes loan to DiscreteCalendar

This is an additional feature to our new Discrete Calendar.
Theses patches add the possibility to choose the loan unit as minutes in circulations rules.

Test plan:
- Apply patch of Bugzilla 17015
- Apply this patch.
- Run test t/db_dependent/minutes_loan.t
- Create new item type for the new rule.
- Create circulation rule and fill the fields, make sure the unit is set to : minutes, choose the item type of the one created above.-
- Checkout an item that follow the circulation rule and set due date in the past.

- Run fines.pl.
- Check if the correct amount was calculated.
    - Note: make sure to factor in the fine grace period if set and the system preference FinesIncludeGracePeriod.fixed patch tests and minor adjustments
Comment 27 Shi Yao Wang 2022-03-18 19:00:14 UTC
Created attachment 131932 [details] [review]
Bug 17983: Add minutes loan to DiscreteCalendar

This is an additional feature to our new Discrete Calendar.
Theses patches add the possibility to choose the loan unit as minutes in circulations rules.

Test plan:
- Apply patch of Bugzilla 17015
- Apply this patch.
- Run test t/db_dependent/minutes_loan.t
- Create new item type for the new rule.
- Create circulation rule and fill the fields, make sure the unit is set to : minutes, choose the item type of the one created above.-
- Checkout an item that follow the circulation rule and set due date in the past.

- Run fines.pl.
- Check if the correct amount was calculated.
    - Note: make sure to factor in the fine grace period if set and the system preference FinesIncludeGracePeriod.fixed patch tests and minor adjustments
Comment 28 Shi Yao Wang 2022-06-22 13:24:45 UTC
Created attachment 136414 [details] [review]
Bug 17983: Add minutes loan to DiscreteCalendar

This is an additional feature to our new Discrete Calendar.
Theses patches add the possibility to choose the loan unit as minutes in circulations rules.

Test plan:
- Apply patch of Bugzilla 17015
- Apply this patch.
- Run test t/db_dependent/minutes_loan.t
- Create new item type for the new rule.
- Create circulation rule and fill the fields, make sure the unit is set to : minutes, choose the item type of the one created above.-
- Checkout an item that follow the circulation rule and set due date in the past.

- Run fines.pl.
- Check if the correct amount was calculated.
    - Note: make sure to factor in the fine grace period if set and the system preference FinesIncludeGracePeriod.fixed patch tests and minor adjustments
Comment 29 Shi Yao Wang 2022-06-22 13:24:50 UTC
Created attachment 136415 [details] [review]
Bug 17983: Add minutes loan to DiscreteCalendar

This is an additional feature to our new Discrete Calendar.
Theses patches add the possibility to choose the loan unit as minutes in circulations rules.

Test plan:
- Apply patch of Bugzilla 17015
- Apply this patch.
- Run test t/db_dependent/minutes_loan.t
- Create new item type for the new rule.
- Create circulation rule and fill the fields, make sure the unit is set to : minutes, choose the item type of the one created above.-
- Checkout an item that follow the circulation rule and set due date in the past.

- Run fines.pl.
- Check if the correct amount was calculated.
    - Note: make sure to factor in the fine grace period if set and the system preference FinesIncludeGracePeriod.fixed patch tests and minor adjustments
Comment 30 Blou 2022-08-19 19:04:46 UTC
Created attachment 139519 [details] [review]
Bug 17983: Add minutes loan to DiscreteCalendar

This is an additional feature to our new Discrete Calendar.
Theses patches add the possibility to choose the loan unit as minutes in circulations rules.

Test plan:
- Apply patch of Bugzilla 17015
- Apply this patch.
- Run test t/db_dependent/minutes_loan.t
- Create new item type for the new rule.
- Create circulation rule and fill the fields, make sure the unit is set to : minutes, choose the item type of the one created above.-
- Checkout an item that follow the circulation rule and set due date in the past.

- Run fines.pl.
- Check if the correct amount was calculated.
    - Note: make sure to factor in the fine grace period if set and the system preference FinesIncludeGracePeriod.fixed patch tests and minor adjustments
Comment 31 Shi Yao Wang 2022-11-25 15:47:54 UTC
Created attachment 144267 [details] [review]
Bug 17983: Add minutes loan to DiscreteCalendar

This is an additional feature to our new Discrete Calendar.
Theses patches add the possibility to choose the loan unit as minutes in circulations rules.

Test plan:
- Apply patch of Bugzilla 17015
- Apply this patch.
- Run test t/db_dependent/minutes_loan.t
- Create new item type for the new rule.
- Create circulation rule and fill the fields, make sure the unit is set to : minutes, choose the item type of the one created above.-
- Checkout an item that follow the circulation rule and set due date in the past.

- Run fines.pl.
- Check if the correct amount was calculated.
    - Note: make sure to factor in the fine grace period if set and the system preference FinesIncludeGracePeriod.fixed patch tests and minor adjustments
Comment 32 Maryse Simard 2023-05-18 21:08:46 UTC
Created attachment 151452 [details] [review]
Bug 17983: Add minutes loan to DiscreteCalendar

This is an additional feature to our new Discrete Calendar.
Theses patches add the possibility to choose the loan unit as minutes in circulations rules.

Test plan:
- Apply patch of Bugzilla 17015
- Apply this patch.
- Run test t/db_dependent/minutes_loan.t
- Create new item type for the new rule.
- Create circulation rule and fill the fields, make sure the unit is set to : minutes, choose the item type of the one created above.-
- Checkout an item that follow the circulation rule and set due date in the past.

- Run fines.pl.
- Check if the correct amount was calculated.
    - Note: make sure to factor in the fine grace period if set and the system preference FinesIncludeGracePeriod.fixed patch tests and minor adjustments
Comment 33 Maryse Simard 2024-06-18 13:55:36 UTC
Created attachment 167846 [details] [review]
Bug 17983: Add minutes loan to DiscreteCalendar

This is an additional feature to our new Discrete Calendar.
Theses patches add the possibility to choose the loan unit as minutes in circulations rules.

Test plan:
- Apply patch of Bugzilla 17015
- Apply this patch.
- Run test t/db_dependent/minutes_loan.t
- Create new item type for the new rule.
- Create circulation rule and fill the fields, make sure the unit is set to : minutes, choose the item type of the one created above.-
- Checkout an item that follow the circulation rule and set due date in the past.

- Run fines.pl.
- Check if the correct amount was calculated.
    - Note: make sure to factor in the fine grace period if set and the system preference FinesIncludeGracePeriod.fixed patch tests and minor adjustments