[Koha-bugs] [Bug 14146] Additional days are not added to restriction period when checking-in several overdues for same patron

2017-03-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14146

Kyle M Hall  changed:

   What|Removed |Added

 Status|Passed QA   |Pushed to Master
 CC||k...@bywatersolutions.com

--- Comment #25 from Kyle M Hall  ---
Pushed to master for 17.05, thanks Jonathan!

-- 
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 14146] Additional days are not added to restriction period when checking-in several overdues for same patron

2017-03-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14146

--- Comment #24 from Marcel de Rooy  ---
(In reply to Jonathan Druart from comment #22)
> (In reply to Marcel de Rooy from comment #21)
> > [1] We now assume that the max suspension days should be applied on the
> > individual suspension, not on the accumulation. Is that a logical choice?
> > No blocker, just mentioning it.
> 
> I do not get it, what do you mean?
> There is now a pref to choose the behavior you want to apply.

If you return 10 books which result in say 3 fine days each. Is 30.
But the max suspension days is say 5.
The current logic compares 10 times 3 with 5 and says ok.
My question was: Should it be applied to the accumulation. So should we say
when it reaches 6 with the second book: Max reached?

-- 
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 14146] Additional days are not added to restriction period when checking-in several overdues for same patron

2017-03-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14146

--- Comment #23 from Marcel de Rooy  ---
(In reply to Jonathan Druart from comment #22)
> Yes but I was wondering if it is really what we expect.
> If a checkin is 5 days late, with 2 days of fine per day of overdue and 1
> day of grace: I think it would make more sense to apply the grace on the
> total of fine days, then 5 * 2 - 1.

I would stick to the current policy. Subtract the grace period first. You
should not be fined over the grace period. Which you do if you do 5*2-1.

-- 
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 14146] Additional days are not added to restriction period when checking-in several overdues for same patron

2017-03-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14146

--- Comment #22 from Jonathan Druart  
---
(In reply to Marcel de Rooy from comment #16)
> +# FIXME Is it right? I'd have expected 5 * 2 - 1 instead
> +# Same for the others
> +my $expected_expiration = output_pref(
> +{
> +dt => dt_from_string->add( days => ( 5 - 1 ) * 2 ),
> 
> If I look to the code:
> my $grace =   DateTime::Duration->new( $unit =>
> $issuing_rule->firstremind );
> my $deltadays = DateTime::Duration->new( days =>
> $chargeable_units );
> if ( $deltadays->subtract($grace)->is_positive() ) {
> my $suspension_days = $deltadays * $finedays;
> Then I would expect indeed (5-1)*2.
> Why would you expect 5*2-1 ?
> First you do deltadays - grace (=1) and then you multiply with finedays (2)

Yes but I was wondering if it is really what we expect.
If a checkin is 5 days late, with 2 days of fine per day of overdue and 1 day
of grace: I think it would make more sense to apply the grace on the total of
fine days, then 5 * 2 - 1.

(In reply to Marcel de Rooy from comment #21)
> QA Comment:
> 
> [1] We now assume that the max suspension days should be applied on the
> individual suspension, not on the accumulation. Is that a logical choice?
> No blocker, just mentioning it.

I do not get it, what do you mean?
There is now a pref to choose the behavior you want to apply.

> [2] The unit test does not return the case where you would return first the
> 10 day book and then the 5 day book. This might be interesting to add since
> formerly the second return would not make a difference.
> Note: I tested this case in the interface and it works.

Hum maybe, but looking at the current code it seems hard to change it that much
to break that condition. I would have added it if I did not have to c/p ~70
lines of code...

-- 
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 14146] Additional days are not added to restriction period when checking-in several overdues for same patron

2017-03-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14146

--- Comment #21 from Marcel de Rooy  ---
QA Comment:

[1] We now assume that the max suspension days should be applied on the
individual suspension, not on the accumulation. Is that a logical choice?
No blocker, just mentioning it.

[2] The unit test does not return the case where you would return first the 10
day book and then the 5 day book. This might be interesting to add since
formerly the second return would not make a difference.
Note: I tested this case in the interface and it works.

-- 
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 14146] Additional days are not added to restriction period when checking-in several overdues for same patron

2017-03-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14146

Marcel de Rooy  changed:

   What|Removed |Added

  Attachment #60409|0   |1
is obsolete||

--- Comment #20 from Marcel de Rooy  ---
Created attachment 61538
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61538=edit
Bug 14146: Add the new pref CumulativeRestrictionPeriods

Sponsored-by: Orex Digital

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
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 14146] Additional days are not added to restriction period when checking-in several overdues for same patron

2017-03-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14146

Marcel de Rooy  changed:

   What|Removed |Added

  Attachment #60407|0   |1
is obsolete||

--- Comment #18 from Marcel de Rooy  ---
Created attachment 61536
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61536=edit
Bug 14146: Add the ability to cumulate restriction periods

At the moment the default behaviour is not to cumulate the restriction
periods but to apply the longest one.
This patch set creates a new syspref CumulativeRestrictionPeriods. If
on, the behaviour changes and the restriction periods are cumulated: the
days of the second restriction are added to the actual restriction
period.

We could add a new circulation rule instead of a syspref, but I am not
sure it's very useful to have such granularity for this behaviour (can
be changed if needed).

How it works:
Let's take 2 items, A and B.
A is returned with Na days late, and B Nb days late
The grace period is Ng and there is 1 day of suspension charge per day
of overdue
The suspension period is until day D = Na - Ng + Nb - Ng

I would have expected D = Na + Nb - Ng but it's how it worked before
this patch.

Test plan:
Create several overdue for a given patron
Do the checkins and confirm that the period are added if the pref is on.
If the pref is off, you should not get any changes in the existing behaviour.

Sponsored-by: Orex Digital

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
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 14146] Additional days are not added to restriction period when checking-in several overdues for same patron

2017-03-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14146

Marcel de Rooy  changed:

   What|Removed |Added

  Attachment #60408|0   |1
is obsolete||

--- Comment #19 from Marcel de Rooy  ---
Created attachment 61537
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61537=edit
Bug 14146: Clean a bit and make the code understandable

The code was a bit weird and this patch cleans it a bit by renaming
variables and adding a variable.

Sponsored-by: Orex Digital

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
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 14146] Additional days are not added to restriction period when checking-in several overdues for same patron

2017-03-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14146

Marcel de Rooy  changed:

   What|Removed |Added

  Attachment #60406|0   |1
is obsolete||

--- Comment #17 from Marcel de Rooy  ---
Created attachment 61535
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61535=edit
Bug 14146: Add tests for AddReturn + CumulativeRestrictionPeriods

Sponsored-by: Orex Digital

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
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 14146] Additional days are not added to restriction period when checking-in several overdues for same patron

2017-03-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14146

Marcel de Rooy  changed:

   What|Removed |Added

 Status|Signed Off  |Passed QA
   Patch complexity|--- |Small 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 14146] Additional days are not added to restriction period when checking-in several overdues for same patron

2017-03-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14146

--- Comment #16 from Marcel de Rooy  ---
+# FIXME Is it right? I'd have expected 5 * 2 - 1 instead
+# Same for the others
+my $expected_expiration = output_pref(
+{
+dt => dt_from_string->add( days => ( 5 - 1 ) * 2 ),

If I look to the code:
my $grace =   DateTime::Duration->new( $unit =>
$issuing_rule->firstremind );
my $deltadays = DateTime::Duration->new( days =>
$chargeable_units );
if ( $deltadays->subtract($grace)->is_positive() ) {
my $suspension_days = $deltadays * $finedays;
Then I would expect indeed (5-1)*2.
Why would you expect 5*2-1 ?
First you do deltadays - grace (=1) and then you multiply with finedays (2)

-- 
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 14146] Additional days are not added to restriction period when checking-in several overdues for same patron

2017-03-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14146

--- Comment #15 from Marcel de Rooy  ---
QA: Still looking here btw

-- 
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 14146] Additional days are not added to restriction period when checking-in several overdues for same patron

2017-03-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14146

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
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 14146] Additional days are not added to restriction period when checking-in several overdues for same patron

2017-03-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14146

Marcel de Rooy  changed:

   What|Removed |Added

 CC||m.de.r...@rijksmuseum.nl

--- Comment #14 from Marcel de Rooy  ---
I do not see a signoff on those patches?

-- 
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 14146] Additional days are not added to restriction period when checking-in several overdues for same patron

2017-02-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14146

Jonathan Druart  changed:

   What|Removed |Added

 Status|Patch doesn't apply |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 14146] Additional days are not added to restriction period when checking-in several overdues for same patron

2017-02-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14146

Jonathan Druart  changed:

   What|Removed |Added

  Attachment #58129|0   |1
is obsolete||

--- Comment #10 from Jonathan Druart  
---
Created attachment 60406
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60406=edit
Bug 14146: Add tests for AddReturn + CumulativeRestrictionPeriods

Sponsored-by: Orex Digital

-- 
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 14146] Additional days are not added to restriction period when checking-in several overdues for same patron

2017-02-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14146

Jonathan Druart  changed:

   What|Removed |Added

  Attachment #58131|0   |1
is obsolete||

--- Comment #12 from Jonathan Druart  
---
Created attachment 60408
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60408=edit
Bug 14146: Clean a bit and make the code understandable

The code was a bit weird and this patch cleans it a bit by renaming
variables and adding a variable.

Sponsored-by: Orex Digital

-- 
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 14146] Additional days are not added to restriction period when checking-in several overdues for same patron

2017-02-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14146

Jonathan Druart  changed:

   What|Removed |Added

  Attachment #58130|0   |1
is obsolete||

--- Comment #11 from Jonathan Druart  
---
Created attachment 60407
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60407=edit
Bug 14146: Add the ability to cumulate restriction periods

At the moment the default behaviour is not to cumulate the restriction
periods but to apply the longest one.
This patch set creates a new syspref CumulativeRestrictionPeriods. If
on, the behaviour changes and the restriction periods are cumulated: the
days of the second restriction are added to the actual restriction
period.

We could add a new circulation rule instead of a syspref, but I am not
sure it's very useful to have such granularity for this behaviour (can
be changed if needed).

How it works:
Let's take 2 items, A and B.
A is returned with Na days late, and B Nb days late
The grace period is Ng and there is 1 day of suspension charge per day
of overdue
The suspension period is until day D = Na - Ng + Nb - Ng

I would have expected D = Na + Nb - Ng but it's how it worked before
this patch.

Test plan:
Create several overdue for a given patron
Do the checkins and confirm that the period are added if the pref is on.
If the pref is off, you should not get any changes in the existing behaviour.

Sponsored-by: Orex Digital

-- 
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 14146] Additional days are not added to restriction period when checking-in several overdues for same patron

2017-02-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14146

Jonathan Druart  changed:

   What|Removed |Added

  Attachment #58149|0   |1
is obsolete||

--- Comment #13 from Jonathan Druart  
---
Created attachment 60409
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60409=edit
Bug 14146: Add the new pref CumulativeRestrictionPeriods

Sponsored-by: Orex Digital

-- 
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 14146] Additional days are not added to restriction period when checking-in several overdues for same patron

2017-02-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14146

Nick Clemens  changed:

   What|Removed |Added

 Status|Signed Off  |Patch doesn't apply
 CC||n...@bywatersolutions.com

--- Comment #9 from Nick Clemens  ---
Conflict in the tests

-- 
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 14146] Additional days are not added to restriction period when checking-in several overdues for same patron

2016-12-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14146

Hugo Agud  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off
 CC||ha...@orex.es

-- 
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 14146] Additional days are not added to restriction period when checking-in several overdues for same patron

2016-12-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14146

Jonathan Druart  changed:

   What|Removed |Added

  Attachment #58128|0   |1
is obsolete||

--- Comment #8 from Jonathan Druart  
---
Created attachment 58149
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58149=edit
Bug 14146: Add the new pref CumulativeRestrictionPeriods

Sponsored-by: Orex Digital

-- 
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 14146] Additional days are not added to restriction period when checking-in several overdues for same patron

2016-12-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14146

--- Comment #4 from Jonathan Druart  
---
Created attachment 58128
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58128=edit
Bug 14146: Add the new pref CumulativeRestrictionPeriods

Sponsored-by: Orex Digital

-- 
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 14146] Additional days are not added to restriction period when checking-in several overdues for same patron

2016-12-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14146

Jonathan Druart  changed:

   What|Removed |Added

   Assignee|koha-b...@lists.koha-commun |jonathan.dru...@bugs.koha-c
   |ity.org |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 14146] Additional days are not added to restriction period when checking-in several overdues for same patron

2016-12-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14146

--- Comment #6 from Jonathan Druart  
---
Created attachment 58130
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58130=edit
Bug 14146: Add the ability to cumulate restriction periods

At the moment the default behaviour is not to cumulate the restriction
periods but to apply the longest one.
This patch set creates a new syspref CumulativeRestrictionPeriods. If
on, the behaviour changes and the restriction periods are cumulated: the
days of the second restriction are added to the actual restriction
period.

We could add a new circulation rule instead of a syspref, but I am not
sure it's very useful to have such granularity for this behaviour (can
be changed if needed).

How it works:
Let's take 2 items, A and B.
A is returned with Na days late, and B Nb days late
The grace period is Ng and there is 1 day of suspension charge per day
of overdue
The suspension period is until day D = Na - Ng + Nb - Ng

I would have expected D = Na + Nb - Ng but it's how it worked before
this patch.

Test plan:
Create several overdue for a given patron
Do the checkins and confirm that the period are added if the pref is on.
If the pref is off, you should not get any changes in the existing behaviour.

Sponsored-by: Orex Digital

-- 
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 14146] Additional days are not added to restriction period when checking-in several overdues for same patron

2016-12-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14146

--- Comment #7 from Jonathan Druart  
---
Created attachment 58131
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58131=edit
Bug 14146: Clean a bit and make the code understandable

The code was a bit weird and this patch cleans it a bit by renaming
variables and adding a variable.

Sponsored-by: Orex Digital

-- 
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 14146] Additional days are not added to restriction period when checking-in several overdues for same patron

2016-12-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14146

--- Comment #5 from Jonathan Druart  
---
Created attachment 58129
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58129=edit
Bug 14146: Add tests for AddReturn + CumulativeRestrictionPeriods

Sponsored-by: Orex Digital

-- 
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 14146] Additional days are not added to restriction period when checking-in several overdues for same patron

2016-12-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14146

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 14146] Additional days are not added to restriction period when checking-in several overdues for same patron

2016-11-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14146

Jonathan Druart  changed:

   What|Removed |Added

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

--- Comment #3 from Jonathan Druart  
---
(In reply to Katrin Fischer from comment #2)
> I have just run some tests on Koha 3.22 - if the second item has been longer
> overdue, the restriction is recalculated to be longer. 
> 
> But it doesn't just add up the days for each returned item. I think that's
> how the feature is intended to work right now and the other would be a
> variation that coudl be an optional feature. Switching to enhancement.

Confirmed, reading the code it's how it's intended to work.
Would it make more sense to add a global switch (syspref) or a new circulation
rule?

-- 
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 14146] Additional days are not added to restriction period when checking-in several overdues for same patron

2016-11-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14146

Katrin Fischer  changed:

   What|Removed |Added

 CC||katrin.fisc...@bsz-bw.de
   Severity|minor   |enhancement

--- Comment #2 from Katrin Fischer  ---
I have just run some tests on Koha 3.22 - if the second item has been longer
overdue, the restriction is recalculated to be longer. 

But it doesn't just add up the days for each returned item. I think that's how
the feature is intended to work right now and the other would be a variation
that coudl be an optional feature. Switching to enhancement.

-- 
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 14146] Additional days are not added to restriction period when checking-in several overdues for same patron

2016-08-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14146

Owen Leonard  changed:

   What|Removed |Added

 OS|Windows |All
Version|3.16|master
   Hardware|PC  |All

--- Comment #1 from Owen Leonard  ---
(In reply to Carolina Andreu from comment #0)
> We check-in
> second and third item, but restriction period remains the same number of
> days, additional days of suspension are not accumulated to the restriction
> period.

I find that this is still the way it works in master, but I wonder if it's not
the expected behavior? Could this be a problem of differing interpretations of
how "fine in days" is supposed to work?

-- 
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/