[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2024-01-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Marcel de Rooy  changed:

   What|Removed |Added

 Status|Signed Off  |In Discussion

--- Comment #58 from Marcel de Rooy  ---
QA Comment:
Code changes look good to me. Fixed test in a follow-up.
The only thing remaining is the discussion about the rounding (changing from
floor to ceil).

I will pass QA if we change it back for current behavior.
If we do not want to change it, please provide evidence for community consensus
about that change.
You could do so by mailing the lists or putting on the dev meeting agenda, etc.

Putting on ID for now.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2024-01-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

--- Comment #57 from Marcel de Rooy  ---
Created attachment 160925
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160925&action=edit
Bug 14293: (QA follow-up) Remove copy and paste test

The comment is in contradiction with the code.
The test has been copied. Not needed to repeat it.

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2024-01-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Marcel de Rooy  changed:

   What|Removed |Added

 Attachment #159504|0   |1
is obsolete||

--- Comment #56 from Marcel de Rooy  ---
Created attachment 160924
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160924&action=edit
Bug 14293: The suspension should be calculated in days

There was a mismatch between bug 13909 and bug 5549.
The get_chargeable_units call from _debar_user_on_return should specify
that we want a suspension in days.

However I don't understand the comment let by the author of bug 5549
f61a9617184ec4b24100c1d99150bfd4ebf13336

1/
> finedays is in days, so hourly loans must multiply by 24
Yes but the suspension is in days, so no need to * 24

2/ And we should have a look on this one too:
> grace period is measured in the same units as the loan
But the grace period is always in days. On the circ rules the column is
"Fine grace period (day)".
I think we should replace
  DateTime::Duration->new( $unit => $issuingrule->{firstremind} );
with
  DateTime::Duration->new( days => $issuingrule->{firstremind} );

Anyway, we definitelly need more tests in this area!

Test plan:
1/ Define an issuing rule with a unit=hour
2/ Set a suspension in days
3/ Check an item out and specify a past due date.
4/ Check the item in
5/ The patron should be debarred correctly

Signed-off-by: David Nind 

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2024-01-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Marcel de Rooy  changed:

   What|Removed |Added

   Patch complexity|Medium patch|Small patch

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2024-01-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Marcel de Rooy  changed:

   What|Removed |Added

 QA Contact|testo...@bugs.koha-communit |m.de.r...@rijksmuseum.nl
   |y.org   |

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2024-01-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

--- Comment #55 from Marcel de Rooy  ---
Looking here now

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2023-12-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

--- Comment #54 from David Nind  ---
Testing notes (using koha-testing-docker):

1. Tests pass for me: prove t/db_dependent/Circulation/maxsuspensiondays.t

2. Use the same test plan as in comment#49

Maybe the code changes made need to be tidied using Perltidy?
(https://wiki.koha-community.org/wiki/Coding_Guidelines#PERL1:_Perltidy and
https://wiki.koha-community.org/wiki/Perltidy)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2023-12-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

David Nind  changed:

   What|Removed |Added

 Attachment #159277|0   |1
is obsolete||

--- Comment #53 from David Nind  ---
Created attachment 159504
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159504&action=edit
Bug 14293: The suspension should be calculated in days

There was a mismatch between bug 13909 and bug 5549.
The get_chargeable_units call from _debar_user_on_return should specify
that we want a suspension in days.

However I don't understand the comment let by the author of bug 5549
f61a9617184ec4b24100c1d99150bfd4ebf13336

1/
> finedays is in days, so hourly loans must multiply by 24
Yes but the suspension is in days, so no need to * 24

2/ And we should have a look on this one too:
> grace period is measured in the same units as the loan
But the grace period is always in days. On the circ rules the column is
"Fine grace period (day)".
I think we should replace
  DateTime::Duration->new( $unit => $issuingrule->{firstremind} );
with
  DateTime::Duration->new( days => $issuingrule->{firstremind} );

Anyway, we definitelly need more tests in this area!

Test plan:
1/ Define an issuing rule with a unit=hour
2/ Set a suspension in days
3/ Check an item out and specify a past due date.
4/ Check the item in
5/ The patron should be debarred correctly

Signed-off-by: David Nind 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2023-12-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

David Nind  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2023-11-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

--- Comment #52 from Thibaud Guillot  ---
(In reply to Marcel de Rooy from comment #50)
>  FAIL
>FAIL   git manipulation
> The file has been added and deleted in the same patchset
> 
>  OK C4/Circulation.pm
> 
>  WARN   C4/Overdues.pm
>WARN   tidiness
> The file is less tidy than before (bad/messy lines before:
> 122, now: 125)
> 
>  WARN   t/db_dependent/Circulation/maxsuspensiondays.t
>WARN   tidiness
> The file is less tidy than before (bad/messy lines before:
> 52, now: 77)
> 
> 
> Processing additional checks
> 
> * Signed-off-by line 'Signed-off-by: Arthur Suzuki
> ' seems invalid
> * Signed-off-by line 'Signed-off-by: Mark Tompsett
> ' seems invalid
> * Signed-off-by line 'Signed-off-by: Mark Tompsett
> ' seems invalid
> 
> Running tests (1)
> * Proving
> /usr/share/koha/t/db_dependent/Circulation/maxsuspensiondays.t KO!
> DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st
> execute failed: Incorrect datetime value: 'SCALAR(0x5595a6847398)' for
> column `koha_myclone`.`borrowers`.`updated_on` at row 1 at
> /usr/share/koha/Koha/Object.pm line 170
>  Invalid value passed, borrowers.updated_on=SCALAR(0x5595a6847398) expected
> type is datetime # Looks like your test exited with 11 before it could
> output anything.
>  /usr/share/koha/t/db_dependent/Circulation/maxsuspensiondays.t ..
> Dubious, test returned 11 (wstat 2816, 0xb00)
>  Failed 4/4 subtests

Thanks for your feedback, I've rebased it and hope it's ok now for the order
and bad commit messages.

For the tests I don't understand because it was and still is okay on my
instance.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2023-11-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Thibaud Guillot  changed:

   What|Removed |Added

 Attachment #159128|0   |1
is obsolete||
 Attachment #159129|0   |1
is obsolete||

--- Comment #51 from Thibaud Guillot  ---
Created attachment 159277
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159277&action=edit
Bug 14293: The suspension should be calculated in days

There was a mismatch between bug 13909 and bug 5549.
The get_chargeable_units call from _debar_user_on_return should specify
that we want a suspension in days.

However I don't understand the comment let by the author of bug 5549
f61a9617184ec4b24100c1d99150bfd4ebf13336

1/
> finedays is in days, so hourly loans must multiply by 24
Yes but the suspension is in days, so no need to * 24

2/ And we should have a look on this one too:
> grace period is measured in the same units as the loan
But the grace period is always in days. On the circ rules the column is
"Fine grace period (day)".
I think we should replace
  DateTime::Duration->new( $unit => $issuingrule->{firstremind} );
with
  DateTime::Duration->new( days => $issuingrule->{firstremind} );

Anyway, we definitelly need more tests in this area!

Test plan:
1/ Define an issuing rule with a unit=hour
2/ Set a suspension in days
3/ Check an item out and specify a past due date.
4/ Check the item in
5/ The patron should be debarred correctly

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2023-11-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Thibaud Guillot  changed:

   What|Removed |Added

 Status|Failed QA   |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2023-11-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Marcel de Rooy  changed:

   What|Removed |Added

 CC||m.de.r...@rijksmuseum.nl
 Status|Signed Off  |Failed QA

--- Comment #50 from Marcel de Rooy  ---
 FAIL
   FAIL   git manipulation
The file has been added and deleted in the same patchset

 OK C4/Circulation.pm

 WARN   C4/Overdues.pm
   WARN   tidiness
The file is less tidy than before (bad/messy lines before: 122,
now: 125)

 WARN   t/db_dependent/Circulation/maxsuspensiondays.t
   WARN   tidiness
The file is less tidy than before (bad/messy lines before: 52,
now: 77)


Processing additional checks

* Signed-off-by line 'Signed-off-by: Arthur Suzuki
' seems invalid
* Signed-off-by line 'Signed-off-by: Mark Tompsett
' seems invalid
* Signed-off-by line 'Signed-off-by: Mark Tompsett
' seems invalid

Running tests (1)
* Proving
/usr/share/koha/t/db_dependent/Circulation/maxsuspensiondays.t KO!
DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st
execute failed: Incorrect datetime value: 'SCALAR(0x5595a6847398)' for column
`koha_myclone`.`borrowers`.`updated_on` at row 1 at
/usr/share/koha/Koha/Object.pm line 170
 Invalid value passed, borrowers.updated_on=SCALAR(0x5595a6847398) expected
type is datetime # Looks like your test exited with 11 before it could output
anything.
 /usr/share/koha/t/db_dependent/Circulation/maxsuspensiondays.t ..
Dubious, test returned 11 (wstat 2816, 0xb00)
 Failed 4/4 subtests

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2023-11-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

David Nind  changed:

   What|Removed |Added

 CC||da...@davidnind.com

--- Comment #49 from David Nind  ---
I've tested and signed off. But feel free to change back to "Needs signoff" if
this isn't sufficient.

(I'm always nervous about testing circulation and fine rules - "Here be
dragons".)

Testing notes using KTD:

1. Set the "All All" rule as follows:
   - Unit: change from Days to Hours
   - Suspension in days (day): change from blank to 2
   - Max. suspension duration (day): left blank
   - Suspension charging interval: 1

2. Items checked out on 20 November 2023.

3. Results before the patch was applied (I set the due date for an item to
11/09/2023). When checked in, the message says:
   "[Patron name] is now debarred until 06/05/2055."

4. After the patch was applied, the message on check in says: "[Patron name] is
now debarred until 12/10/2023."
   - Matches what was expected: difference between due date and checked in date
= 10; x2 = 20 days = 12/10/2023

5. I then set "Suspension in days (day)" to 1. The message on check in says:
"[Patron name] is now debarred until 11/30/2023."
   - Matches what was expected: difference between due date and checked in date
= 10; x1 = 10 days = 11/30/2023

6. The tests pass: prove t/db_dependent/Circulation/maxsuspensiondays.t

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2023-11-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

David Nind  changed:

   What|Removed |Added

 Attachment #159076|0   |1
is obsolete||

--- Comment #48 from David Nind  ---
Created attachment 159129
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159129&action=edit
Bug 14293: Rebasing tests

--Including:--

Bug 14293: Add more tests and improve get_chargeable_units

Not sure at all about this change, especially because it could modify
CalcFine

Signed-off-by: Arthur Suzuki 

Signed-off-by: Mark Tompsett 

Bug 14293: Add more tests and fix floor/ceil

Signed-off-by: Mark Tompsett 

Signed-off-by: David Nind 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2023-11-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

David Nind  changed:

   What|Removed |Added

 Attachment #159075|0   |1
is obsolete||

--- Comment #47 from David Nind  ---
Created attachment 159128
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159128&action=edit
Bug 14293: The suspension should be calculated in days

There was a mismatch between bug 13909 and bug 5549.
The get_chargeable_units call from _debar_user_on_return should specify
that we want a suspension in days.

However I don't understand the comment let by the author of bug 5549
f61a9617184ec4b24100c1d99150bfd4ebf13336

1/
> finedays is in days, so hourly loans must multiply by 24
Yes but the suspension is in days, so no need to * 24

2/ And we should have a look on this one too:
> grace period is measured in the same units as the loan
But the grace period is always in days. On the circ rules the column is
"Fine grace period (day)".
I think we should replace
  DateTime::Duration->new( $unit => $issuingrule->{firstremind} );
with
  DateTime::Duration->new( days => $issuingrule->{firstremind} );

Anyway, we definitelly need more tests in this area!

Test plan:
1/ Define an issuing rule with a unit=hour
2/ Set a suspension in days
3/ Check an item out and specify a past due date.
4/ Check the item in
5/ The patron should be debarred correctly

Signed-off-by: Nick Clemens 
Signed-off-by: Arthur Suzuki 

Signed-off-by: Mark Tompsett 
Signed-off-by: David Nind 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2023-11-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

David Nind  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2023-11-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Thibaud Guillot  changed:

   What|Removed |Added

   Assignee|koha-b...@lists.koha-commun |thibaud.guil...@biblibre.co
   |ity.org |m

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2023-11-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Thibaud Guillot  changed:

   What|Removed |Added

 CC||thibaud.guil...@biblibre.co
   ||m

--- Comment #46 from Thibaud Guillot  ---
Hello,

I'll try to move this patch forward, I rebased the patch first before adding
the "when to charge" option so that everyone can test it under fresh master
conditions. Thanks for your feedback

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2023-11-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

--- Comment #45 from Thibaud Guillot  ---
Created attachment 159076
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159076&action=edit
Bug 14293: Rebasing tests

--Including:--

Bug 14293: Add more tests and improve get_chargeable_units

Not sure at all about this change, especially because it could modify
CalcFine

Signed-off-by: Arthur Suzuki 

Signed-off-by: Mark Tompsett 

Bug 14293: Add more tests and fix floor/ceil

Signed-off-by: Mark Tompsett 

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2023-11-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Thibaud Guillot  changed:

   What|Removed |Added

  Attachment #90955|0   |1
is obsolete||
  Attachment #90956|0   |1
is obsolete||
  Attachment #90957|0   |1
is obsolete||

--- Comment #44 from Thibaud Guillot  ---
Created attachment 159075
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159075&action=edit
Bug 14293: The suspension should be calculated in days

There was a mismatch between bug 13909 and bug 5549.
The get_chargeable_units call from _debar_user_on_return should specify
that we want a suspension in days.

However I don't understand the comment let by the author of bug 5549
f61a9617184ec4b24100c1d99150bfd4ebf13336

1/
> finedays is in days, so hourly loans must multiply by 24
Yes but the suspension is in days, so no need to * 24

2/ And we should have a look on this one too:
> grace period is measured in the same units as the loan
But the grace period is always in days. On the circ rules the column is
"Fine grace period (day)".
I think we should replace
  DateTime::Duration->new( $unit => $issuingrule->{firstremind} );
with
  DateTime::Duration->new( days => $issuingrule->{firstremind} );

Anyway, we definitelly need more tests in this area!

Test plan:
1/ Define an issuing rule with a unit=hour
2/ Set a suspension in days
3/ Check an item out and specify a past due date.
4/ Check the item in
5/ The patron should be debarred correctly

Signed-off-by: Nick Clemens 
Signed-off-by: Arthur Suzuki 

Signed-off-by: Mark Tompsett 

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2023-11-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Thibaud Guillot  changed:

   What|Removed |Added

 Status|Failed QA   |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2023-08-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

--- Comment #43 from Katrin Fischer  ---
(In reply to Tomás Cohen Arazi from comment #42)
> (In reply to Jonathan Druart from comment #35)
> > I understand from comment 29 that Sonia disagrees with the behavior of this
> > patch.
> 
> Sonia's concern can be addressed by adding an option, analogous to fines'
> 'When to charge', and defaulting it to end of the interval, of course.

I think we could even use the one used for fines now: "When to charge"

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2021-03-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Tomás Cohen Arazi  changed:

   What|Removed |Added

 CC||tomasco...@gmail.com

--- Comment #42 from Tomás Cohen Arazi  ---
(In reply to Jonathan Druart from comment #35)
> I understand from comment 29 that Sonia disagrees with the behavior of this
> patch.

Sonia's concern can be addressed by adding an option, analogous to fines' 'When
to charge', and defaulting it to end of the interval, of course.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-10-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Martin Renvoize  changed:

   What|Removed |Added

   Keywords||needs_rfc

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-10-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

--- Comment #41 from Arthur Suzuki  ---
Hi,
Patch applies just fine on master however when I try to return an issue I get
an infinite loading and no restriction to the user.
Also I think there is an error in C4/Circulation.pm line 2270, floor has been
changed to ceil and I suspect this affect day loans as well (at least it
changes the behaviour as mentioned by Sonia earlier).
Arthur

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-10-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

--- Comment #40 from Arthur Suzuki  ---
Hi,
Patch applies just fine on master however when I try to return an issue I get
an infinite loading and no restriction to the user.
Also I think there is an error in C4/Circulation.pm line 2270, floor has been
changed to ceil and I suspect this affect day loans as well (at least it
changes the behaviour as mentioned by Sonia earlier).
Arthur

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-10-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Martin Renvoize  changed:

   What|Removed |Added

 CC||martin.renvoize@ptfs-europe
   ||.com
   See Also||https://bugs.koha-community
   ||.org/bugzilla3/show_bug.cgi
   ||?id=23382

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-09-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

--- Comment #39 from Niamh  ---
We are using Suspensions only. We don't 'charge fines'. This miscalculation has
a local impact for us where if a restricted loan or short loan item is 5 hours
overdue there is no suspension for the patron who kept it over, where as if we
were using fines they would be penalised. So we are definitely interested in
getting this sorted.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-09-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

--- Comment #38 from Katrin Fischer  ---
(In reply to Koha Team Lyon 3 from comment #37)
> But for the moment, I'm not sure a lot of libraries are using it 
> Sonia

We have 2 or 3 libraries using it currently (one is in Spain, it appears common
there too).

I haven't read through all the bug to see what it changes, just wanted to leave
a note that this is probably a wider used feature.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-09-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Jonathan Druart  changed:

   What|Removed |Added

   Assignee|jonathan.dru...@bugs.koha-c |koha-b...@lists.koha-commun
   |ommunity.org|ity.org

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-08-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

--- Comment #37 from Koha Team Lyon 3  ---
Hi,
Yes Jonathan, I'm not really fond of the behavior proposed because it changes
the current calculation of suspension days for the loan in days. 
I don't want to block the resolution of this issue, but if we keep the
correction proposed, We just have to be aware that we should explain that
there's a change and that people have to check their circulation rules if they
use the Suspension charging interval. 
But for the moment, I'm not sure a lot of libraries are using it 
Sonia

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-06-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Kyle M Hall  changed:

   What|Removed |Added

 Status|Signed Off  |Failed QA
 CC||k...@bywatersolutions.com

--- Comment #36 from Kyle M Hall  ---
This new algorithm for calculating due dates in days derived from hours will
result in different due dates than what is currently expected:

prove t/db_dependent/Circulation.t
t/db_dependent/Circulation.t .. 28/45
#   Failed test 'Test at line 1886'
#   at t/db_dependent/Circulation.t line 93.
#  got: '2019-07-01'
# expected: '2019-06-30'
# Looks like you failed 1 test of 21.
t/db_dependent/Circulation.t .. 29/45
#   Failed test 'AddReturn + suspension_chargeperiod'
#   at t/db_dependent/Circulation.t line 1976.
t/db_dependent/Circulation.t .. 45/45 # Looks like you failed 1 test of 45.
t/db_dependent/Circulation.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/45 subtests

Test Summary Report
---
t/db_dependent/Circulation.t (Wstat: 256 Tests: 45 Failed: 1)
  Failed test:  29
  Non-zero exit status: 1
Files=1, Tests=45, 28 wallclock secs ( 0.08 usr  0.01 sys + 19.32 cusr  3.82
csys = 23.23 CPU)
Result: FAIL

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-06-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

--- Comment #35 from Jonathan Druart  
---
I understand from comment 29 that Sonia disagrees with the behavior of this
patch.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-06-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

M. Tompsett  changed:

   What|Removed |Added

 CC||mtomp...@hotmail.com

--- Comment #34 from M. Tompsett  ---
(In reply to Arthur Suzuki from comment #30)
> I guess we could move on this bugs since anyone agreed that this solves at
> least the hourly loan issue.
> From what I understood following the discussion, there is a bigger issue
> with the whole fine calculation rules but I'd say it's not in the same scope
> and shall be documented in another bugzilla.

Given this comment, and the tests actually testing the changes. I figured it
needed to be signed off to move forward.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-06-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

--- Comment #32 from M. Tompsett  ---
Created attachment 90956
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90956&action=edit
Bug 14293: Add more tests and improve get_chargeable_units

Not sure at all about this change, especially because it could modify
CalcFine

Signed-off-by: Arthur Suzuki 

Signed-off-by: Mark Tompsett 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-06-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

--- Comment #33 from M. Tompsett  ---
Created attachment 90957
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90957&action=edit
Bug 14293: Add more tests and fix floor/ceil

Signed-off-by: Mark Tompsett 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-06-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

M. Tompsett  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-06-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

M. Tompsett  changed:

   What|Removed |Added

  Attachment #85407|0   |1
is obsolete||
  Attachment #85408|0   |1
is obsolete||
  Attachment #85788|0   |1
is obsolete||

--- Comment #31 from M. Tompsett  ---
Created attachment 90955
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90955&action=edit
Bug 14293: The suspension should be calculated in days

There was a mismatch between bug 13909 and bug 5549.
The get_chargeable_units call from _debar_user_on_return should specify
that we want a suspension in days.

However I don't understand the comment let by the author of bug 5549
f61a9617184ec4b24100c1d99150bfd4ebf13336

1/
> finedays is in days, so hourly loans must multiply by 24
Yes but the suspension is in days, so no need to * 24

2/ And we should have a look on this one too:
> grace period is measured in the same units as the loan
But the grace period is always in days. On the circ rules the column is
"Fine grace period (day)".
I think we should replace
  DateTime::Duration->new( $unit => $issuingrule->{firstremind} );
with
  DateTime::Duration->new( days => $issuingrule->{firstremind} );

Anyway, we definitelly need more tests in this area!

Test plan:
1/ Define an issuing rule with a unit=hour
2/ Set a suspension in days
3/ Check an item out and specify a past due date.
4/ Check the item in
5/ The patron should be debarred correctly

Signed-off-by: Nick Clemens 
Signed-off-by: Arthur Suzuki 

Signed-off-by: Mark Tompsett 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-06-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Arthur Suzuki  changed:

   What|Removed |Added

 Status|In Discussion   |Needs Signoff
   Priority|P5 - low|P4

--- Comment #30 from Arthur Suzuki  ---
I guess we could move on this bugs since anyone agreed that this solves at
least the hourly loan issue.
>From what I understood following the discussion, there is a bigger issue with
the whole fine calculation rules but I'd say it's not in the same scope and
shall be documented in another bugzilla.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-05-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

--- Comment #29 from Koha Team Lyon 3  ---
Hi,
I've tested when patrons are charged with days of suspension in a 18.11
version. If the setting "Suspension charging interval" is 2, they are not
charged if they are only one day late. They are charged if they are 2 days
late.

I think that we shouldn't change it with this bug. Libraries are certainly used
to this behaviour and to my opinion, this rules should be kept when calculting
suspension for loans in hours.

Sonia

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-04-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

--- Comment #28 from Jonathan Druart  
---
So, what's next? Waiting something from me?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-03-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

--- Comment #27 from Arthur Suzuki  ---
(In reply to Katrin Fischer from comment #26)
> I think we could use the "when to charge" parameter for this as it's the
> same problem as with fines. It allows to charge at the beginning of the
> interval (charge first day) or at the end (charge after 2 days). This way
> the behavior would be configurable and we even have the option already.
> 
> What do you think?

Agreed :)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-02-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

--- Comment #26 from Katrin Fischer  ---
(In reply to Jonathan Druart from comment #25)
> (In reply to Koha Team Lyon 3 from comment #24)
> > In my opinion, if suspension_chargeperiod = 2, we should not charge on the
> > first day... but, I'm not sure of the behaviour in the current version of
> > Koha.
> 
> Did not test neither remember. But my feeling is that: if you are late, you
> pay. If you do not want this behavior you could use the grace.
> 
> Before continuing on this maybe we should ask on the list?

I think we could use the "when to charge" parameter for this as it's the same
problem as with fines. It allows to charge at the beginning of the interval
(charge first day) or at the end (charge after 2 days). This way the behavior
would be configurable and we even have the option already.

What do you think?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-02-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

--- Comment #25 from Jonathan Druart  
---
(In reply to Koha Team Lyon 3 from comment #24)
> In my opinion, if suspension_chargeperiod = 2, we should not charge on the
> first day... but, I'm not sure of the behaviour in the current version of
> Koha.

Did not test neither remember. But my feeling is that: if you are late, you
pay. If you do not want this behavior you could use the grace.

Before continuing on this maybe we should ask on the list?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-02-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Koha Team Lyon 3  changed:

   What|Removed |Added

 Status|Needs Signoff   |In Discussion

--- Comment #24 from Koha Team Lyon 3  ---
Hello Katrin, you're right. I have to buy a new brain. I've begun my tests with
the right logic and I don't know why, I swapped...

Jonathan, before redoing the tests,I'm not sure we are on the same logic for
the case "1 day of suspension every 2 days (finedays = 1,
suspension_chargeperiod = 2)"

  - 20 days late => 10 days of suspension : OK

  - 1 day late => 1 day of suspension (was 2 before the last patch)
-> Should we begin to add charge before 2 days late ?
I would say :
  * 1 day late => 0 day of suspension (was 2 before the last patch)
  * 2 days late => 1 day of suspension

  - 2 hours late => 1 day of suspension (was 2 before the last patch)
The same here 
   * 2 hours late => 0 day of suspension (was 2 before the last patch)
   * 2 hours late + 1 day => 1 day of supension

  - 2 hours before => 0 day of suspension : OK

In my opinion, if suspension_chargeperiod = 2, we should not charge on the
first day... but, I'm not sure of the behaviour in the current version of Koha.

Other opinions on that?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-02-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

--- Comment #23 from Koha Team Lyon 3  ---
Hello Katrin, you're right. I have to buy a new brain. I've begun my tests with
the right logic and I don't know why, I swapped...

Jonathan, before redoing the tests,I'm not sure we are on the same logic for
the case "1 day of suspension every 2 days (finedays = 1,
suspension_chargeperiod = 2)"

  - 20 days late => 10 days of suspension : OK
  - 1 day late => 1 day of suspension (was 2 before the last patch)
-> Should we begin to add charge before 2 days late ?
I would say :
  - 1 day late => 0 day of suspension (was 2 before the last patch)
  - 2 days late => 1 day of suspension

  - 2 hours late => 1 day of suspension (was 2 before the last patch)
  - 2 hours before => 0 day of suspension

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-02-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

--- Comment #21 from Jonathan Druart  
---
Created attachment 85788
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85788&action=edit
Bug 14293: Add more tests and fix floor/ceil

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-02-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Jonathan Druart  changed:

   What|Removed |Added

 Status|Failed QA   |Needs Signoff

--- Comment #22 from Jonathan Druart  
---
My tests cover the following situations:

* 2 days of suspension every day (finedays = 2, suspension_chargeperiod = 1)
  - 20 days late => 40 days of suspension
  - 1 day late => 2 days of suspension
  - 2 hours late => 2 days of suspension
  - 2 hours before => 0 day of suspension

* 1 day of suspension every 2 days (finedays = 1, suspension_chargeperiod = 2)
  - 20 days late => 10 days of suspension
  - 1 day late => 1 day of suspension (was 2 before the last patch)
  - 2 hours late => 1 day of suspension (was 2 before the last patch)
  - 2 hours before => 0 day of suspension

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-02-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

--- Comment #20 from Jonathan Druart  
---
Could you please list the different situations you have tested (circulation
rules values) then what you would have expected and what you get?

With OK and NOK in front of each cases.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-02-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

--- Comment #19 from Niamh  ---
Is this because the suspensions only operate in days but the loan rule is in
hours? So if the item is returned on the same day Koha does not recognise it as
overdue... especially if the cron job only runs overnight?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-02-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Katrin Fischer  changed:

   What|Removed |Added

 CC||katrin.fisc...@bsz-bw.de

--- Comment #18 from Katrin Fischer  ---
(In reply to Koha Team Lyon 3 from comment #17)
> Hello,
> I've begun the tests but there's a case there the calculation is wrong.
> If you have this circulation rules for an hourly loan : 
> Suspension in days (day) = 1 -> Suspension charging interval = 2
> 
> With few hours late, no suspension are charged : it should be 2 days.
> With one day + few hours late, the suspension is 2 days, it should be 4 days.
> 
> 
> (but it works for Suspension in days (day) = 1 -> Suspension charging
> interval = 1)
> 
> Sonia

Should it not be the other way around? suspension in days 2 and charging
interval  1 for the results you describe?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-02-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Koha Team Lyon 3  changed:

   What|Removed |Added

 Status|Signed Off  |Failed QA

--- Comment #17 from Koha Team Lyon 3  ---
Hello,
I've begun the tests but there's a case there the calculation is wrong.
If you have this circulation rules for an hourly loan : 
Suspension in days (day) = 1 -> Suspension charging interval = 2

With few hours late, no suspension are charged : it should be 2 days.
With one day + few hours late, the suspension is 2 days, it should be 4 days.


(but it works for Suspension in days (day) = 1 -> Suspension charging interval
= 1)

Sonia

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-02-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Arthur Suzuki  changed:

   What|Removed |Added

 Status|In Discussion   |Signed Off

--- Comment #16 from Arthur Suzuki  ---
Ok, patches signed properly after been applied to the right version (master).

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-02-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Arthur Suzuki  changed:

   What|Removed |Added

  Attachment #85255|0   |1
is obsolete||

--- Comment #15 from Arthur Suzuki  ---
Created attachment 85408
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85408&action=edit
Bug 14293: Add more tests and improve get_chargeable_units

Not sure at all about this change, especially because it could modify
CalcFine

Signed-off-by: Arthur Suzuki 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-02-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Arthur Suzuki  changed:

   What|Removed |Added

  Attachment #85252|0   |1
is obsolete||

--- Comment #14 from Arthur Suzuki  ---
Created attachment 85407
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85407&action=edit
Bug 14293: The suspension should be calculated in days

There was a mismatch between bug 13909 and bug 5549.
The get_chargeable_units call from _debar_user_on_return should specify
that we want a suspension in days.

However I don't understand the comment let by the author of bug 5549
f61a9617184ec4b24100c1d99150bfd4ebf13336

1/
> finedays is in days, so hourly loans must multiply by 24
Yes but the suspension is in days, so no need to * 24

2/ And we should have a look on this one too:
> grace period is measured in the same units as the loan
But the grace period is always in days. On the circ rules the column is
"Fine grace period (day)".
I think we should replace
  DateTime::Duration->new( $unit => $issuingrule->{firstremind} );
with
  DateTime::Duration->new( days => $issuingrule->{firstremind} );

Anyway, we definitelly need more tests in this area!

Test plan:
1/ Define an issuing rule with a unit=hour
2/ Set a suspension in days
3/ Check an item out and specify a past due date.
4/ Check the item in
5/ The patron should be debarred correctly

Signed-off-by: Nick Clemens 
Signed-off-by: Arthur Suzuki 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-02-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Arthur Suzuki  changed:

   What|Removed |Added

  Attachment #85211|0   |1
is obsolete||

--- Comment #13 from Arthur Suzuki  ---
Created attachment 85255
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85255&action=edit
Bug 14293: Add more tests and improve get_chargeable_units

Not sure at all about this change, especially because it could modify
CalcFine

Signed-off-by: Arthur Suzuki 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-02-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Arthur Suzuki  changed:

   What|Removed |Added

 Status|Signed Off  |In Discussion

--- Comment #12 from Arthur Suzuki  ---
Meh, guess I broke up something while trying to sign the patches, only one of
them is signed and I cannot apply the patches anymore using git-bz...
I wonder what I screwed up here :/

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-02-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Arthur Suzuki  changed:

   What|Removed |Added

 Status|In Discussion   |Signed Off

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-02-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Arthur Suzuki  changed:

   What|Removed |Added

  Attachment #85251|0   |1
is obsolete||

--- Comment #11 from Arthur Suzuki  ---
Created attachment 85252
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85252&action=edit
Bug 14293: The suspension should be calculated in days

There was a mismatch between bug 13909 and bug 5549.
The get_chargeable_units call from _debar_user_on_return should specify
that we want a suspension in days.

However I don't understand the comment let by the author of bug 5549
f61a9617184ec4b24100c1d99150bfd4ebf13336

1/
> finedays is in days, so hourly loans must multiply by 24
Yes but the suspension is in days, so no need to * 24

2/ And we should have a look on this one too:
> grace period is measured in the same units as the loan
But the grace period is always in days. On the circ rules the column is
"Fine grace period (day)".
I think we should replace
  DateTime::Duration->new( $unit => $issuingrule->{firstremind} );
with
  DateTime::Duration->new( days => $issuingrule->{firstremind} );

Anyway, we definitelly need more tests in this area!

Test plan:
1/ Define an issuing rule with a unit=hour
2/ Set a suspension in days
3/ Check an item out and specify a past due date.
4/ Check the item in
5/ The patron should be debarred correctly

Signed-off-by: Nick Clemens 
Signed-off-by: Arthur Suzuki 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-02-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Arthur Suzuki  changed:

   What|Removed |Added

  Attachment #85210|0   |1
is obsolete||

--- Comment #10 from Arthur Suzuki  ---
Created attachment 85251
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85251&action=edit
Bug 14293: The suspension should be calculated in days

There was a mismatch between bug 13909 and bug 5549.
The get_chargeable_units call from _debar_user_on_return should specify
that we want a suspension in days.

However I don't understand the comment let by the author of bug 5549
f61a9617184ec4b24100c1d99150bfd4ebf13336

1/
> finedays is in days, so hourly loans must multiply by 24
Yes but the suspension is in days, so no need to * 24

2/ And we should have a look on this one too:
> grace period is measured in the same units as the loan
But the grace period is always in days. On the circ rules the column is
"Fine grace period (day)".
I think we should replace
  DateTime::Duration->new( $unit => $issuingrule->{firstremind} );
with
  DateTime::Duration->new( days => $issuingrule->{firstremind} );

Anyway, we definitelly need more tests in this area!

Test plan:
1/ Define an issuing rule with a unit=hour
2/ Set a suspension in days
3/ Check an item out and specify a past due date.
4/ Check the item in
5/ The patron should be debarred correctly

Signed-off-by: Nick Clemens 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-02-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

--- Comment #9 from Arthur Suzuki  ---
This new patch do suspend the user until next day from the first minute overdue
up until 24h late (non-inclusive).

Then suspends for one more day for each period of 24h overdue.

IMHO it is quite fair that one who is overdue for the night and brings back
yesterday's hourly loans on the next morning may not borrow new books on the
same day.

If someone take a hourly loan and only brings back the book on the next morning
then one might not get suspended for let say 10 days if one is 10 periods of 1h
overdue.

This behaviour is same whatever the hourly loan period is (tried with 1h and
6h), which I guess is the expected/desired behaviour.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-02-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

--- Comment #8 from Jonathan Druart  
---
Sonia, please give this new version a try.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-02-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

--- Comment #7 from Jonathan Druart  
---
Created attachment 85211
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85211&action=edit
Bug 14293: Add more tests and improve get_chargeable_units

Not sure at all about this change, especially because it could modify
CalcFine

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-02-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Jonathan Druart  changed:

   What|Removed |Added

  Attachment #42492|0   |1
is obsolete||

--- Comment #6 from Jonathan Druart  
---
Created attachment 85210
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85210&action=edit
Bug 14293: The suspension should be calculated in days

There was a mismatch between bug 13909 and bug 5549.
The get_chargeable_units call from _debar_user_on_return should specify
that we want a suspension in days.

However I don't understand the comment let by the author of bug 5549
f61a9617184ec4b24100c1d99150bfd4ebf13336

1/
> finedays is in days, so hourly loans must multiply by 24
Yes but the suspension is in days, so no need to * 24

2/ And we should have a look on this one too:
> grace period is measured in the same units as the loan
But the grace period is always in days. On the circ rules the column is
"Fine grace period (day)".
I think we should replace
  DateTime::Duration->new( $unit => $issuingrule->{firstremind} );
with
  DateTime::Duration->new( days => $issuingrule->{firstremind} );

Anyway, we definitelly need more tests in this area!

Test plan:
1/ Define an issuing rule with a unit=hour
2/ Set a suspension in days
3/ Check an item out and specify a past due date.
4/ Check the item in
5/ The patron should be debarred correctly

Signed-off-by: Nick Clemens 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-02-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Jonathan Druart  changed:

   What|Removed |Added

 Status|Failed QA   |In Discussion

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-02-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Arthur Suzuki  changed:

   What|Removed |Added

 CC||arthur.suz...@biblibre.com

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2019-02-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Koha Team Lyon 3  changed:

   What|Removed |Added

 CC||k...@univ-lyon3.fr
 Status|In Discussion   |Failed QA

--- Comment #5 from Koha Team Lyon 3  ---
The present path doesn't apply anymore :

t/db_dependent/Circulation/IssuingRules/maxsuspensiondays.t
CONFLICT (content): Merge conflict in
t/db_dependent/Circulation/IssuingRules/maxsuspensiondays.t
Auto-merging C4/Circulation.pm
CONFLICT (content): Merge conflict in C4/Circulation.pm
error: Failed to merge in the changes.

To give a feedback to Kyle'question :
> I suppose the question is, should hourly loans suspend in days the number of 
> hours overdue? If an hourly loan is 3 hours late, should the patron be 
> suspended for 3 days? If so, changes are needed.

In our library, we don't want hours late to be change in days suspension. 
If "Suspension in days (day)" = 1, we want that 2h or 2mn late calculate 1 day
of suspension.
If there more than 24h, then it will be 2 days of suspension.

I hope that this bug could be correct easily.

Sonia

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2018-04-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Niamh  changed:

   What|Removed |Added

 CC||niamh.walker-headon@it-tall
   ||aght.ie

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2015-10-23 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Kyle M Hall  changed:

   What|Removed |Added

 Status|Signed Off  |In Discussion

--- Comment #4 from Kyle M Hall  ---
(In reply to Nick Clemens from comment #3)
> Test plan worked as expected with one question: if they are hours overdue on
> an hourly loan, and not a day overdue, it seems to not suspend them.  Should
> it?

I suppose the question is, should hourly loans suspend in days the number of
hours overdue? If an hourly loan is 3 hours late, should the patron be
suspended for 3 days? If so, changes are needed.

This patch makes it so that hourly loans are suspended based on the number of
*days* the item is overdue. Anything less than 24 hours rounds down to 0 days.
Should hourly loans suspend for a minimum of 1 day if they are overdue by less
than 24 hours?

I think the logic of how hourly loan suspension should work needs to be decided
before it can be decided if this patch is correct, or if it needs additional
changes.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2015-10-13 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Jonathan Druart  changed:

   What|Removed |Added

   See Also||http://bugs.koha-community.
   ||org/bugzilla3/show_bug.cgi?
   ||id=14975

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2015-09-11 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Nick Clemens  changed:

   What|Removed |Added

  Attachment #42387|0   |1
is obsolete||

--- Comment #2 from Nick Clemens  ---
Created attachment 42492
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42492&action=edit
Bug 14293: The suspension should be calculated in days

There was a mismatch between bug 13909 and bug 5549.
The get_chargeable_units call from _debar_user_on_return should specify
that we want a suspension in days.

However I don't understand the comment let by the author of bug 5549
f61a9617184ec4b24100c1d99150bfd4ebf13336

1/
> finedays is in days, so hourly loans must multiply by 24
Yes but the suspension is in days, so no need to * 24

2/ And we should have a look on this one too:
> grace period is measured in the same units as the loan
But the grace period is always in days. On the circ rules the column is
"Fine grace period (day)".
I think we should replace
  DateTime::Duration->new( $unit => $issuingrule->{firstremind} );
with
  DateTime::Duration->new( days => $issuingrule->{firstremind} );

Anyway, we definitelly need more tests in this area!

Test plan:
1/ Define an issuing rule with a unit=hour
2/ Set a suspension in days
3/ Check an item out and specify a past due date.
4/ Check the item in
5/ The patron should be debarred correctly

Signed-off-by: Nick Clemens 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2015-09-11 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Nick Clemens  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2015-09-11 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Nick Clemens  changed:

   What|Removed |Added

 CC||n...@quecheelibrary.org

--- Comment #3 from Nick Clemens  ---
Test plan worked as expected with one question: if they are hours overdue on an
hourly loan, and not a day overdue, it seems to not suspend them.  Should it?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2015-09-04 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Jonathan Druart  changed:

   What|Removed |Added

   Patch complexity|--- |Medium patch
   Assignee|koha-b...@lists.koha-commun |jonathan.dru...@bugs.koha-c
   |ity.org |ommunity.org
   Severity|normal  |major

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2015-09-04 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

--- Comment #1 from Jonathan Druart  
---
Created attachment 42387
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42387&action=edit
Bug 14293: The suspension should be calculated in days

There was a mismatch between bug 13909 and bug 5549.
The get_chargeable_units call from _debar_user_on_return should specify
that we want a suspension in days.

However I don't understand the comment let by the author of bug 5549
f61a9617184ec4b24100c1d99150bfd4ebf13336

1/
> finedays is in days, so hourly loans must multiply by 24
Yes but the suspension is in days, so no need to * 24

2/ And we should have a look on this one too:
> grace period is measured in the same units as the loan
But the grace period is always in days. On the circ rules the column is
"Fine grace period (day)".
I think we should replace
  DateTime::Duration->new( $unit => $issuingrule->{firstremind} );
with
  DateTime::Duration->new( days => $issuingrule->{firstremind} );

Anyway, we definitelly need more tests in this area!

Test plan:
1/ Define an issuing rule with a unit=hour
2/ Set a suspension in days
3/ Check an item out and specify a past due date.
4/ Check the item in
5/ The patron should be debarred correctly

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2015-09-04 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Jonathan Druart  changed:

   What|Removed |Added

 Status|NEW |Needs Signoff

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2015-09-04 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Jonathan Druart  changed:

   What|Removed |Added

Version|3.20|master
 CC||jonathan.dru...@bugs.koha-c
   ||ommunity.org

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2015-09-03 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

MetaBiblioteca Colombia  changed:

   What|Removed |Added

Version|3.18|3.20

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day

2015-06-01 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

MetaBiblioteca Colombia  changed:

   What|Removed |Added

 CC||felipe.gom...@gmail.com

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/