[Koha-bugs] [Bug 14101] auto renewal is tied to 'no renewal before'

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

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Status|Passed QA   |Pushed to Master
 CC||tomasco...@gmail.com

--- Comment #33 from Tomás Cohen Arazi  ---
Patch pushed to master.

Thanks Holger!

-- 
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 14101] auto renewal is tied to 'no renewal before'

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

--- Comment #32 from Kyle M Hall  ---
Created attachment 44991
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44991=edit
[PASSED QA] Bug 14101: Unit tests

This patch adds new test cases to check if CanBookBeRenewed provides
correct return values and error codes for premature renewals. Both manual
and automatic renewals and different settings for 'No renewal before'
are tested.

To test:
1) prove t/db_dependent/Circulation.t

Sponsored-by: Hochschule für Gesundheit (hsg), Germany

Signed-off-by: Kyle M Hall 

-- 
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 14101] auto renewal is tied to 'no renewal before'

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

Kyle M Hall  changed:

   What|Removed |Added

  Attachment #44948|0   |1
is obsolete||
  Attachment #44949|0   |1
is obsolete||

--- Comment #31 from Kyle M Hall  ---
Created attachment 44990
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44990=edit
[PASSED QA] Bug 14101: Automatic renewals exactly on due date

If no value for 'no renewal before' is specified, automatic renewal now
falls back on the due date. Also 'no renewal before' can now be zero, so
both automatic and manual renewals can be delayed until due date.

Test plan:

1) Create some circulation rules with different settings for 'No renewal
   before' and 'Automatic renewal'. Both daily and hourly loans should
   work.

2) Try to renew both manually and automatically before and after a renewal
   should be possible. You can run misc/cronjobs/automatic_renewals.pl for
   automatic renewal.

3) Confirm that:
   * Both automatic and manual renewal with 'No renewal before' set
 to 0 do not happen before the due date (exact DateTime).
   * Manual renewal with 'No renewal before' set to undef (enter empty
 string) is unrestricted.
   * Automatic renewal with 'No renewal before' set to undef does not
 happen before the due date.

Sponsored-by: Hochschule für Gesundheit (hsg), Germany

Signed-off-by: Kyle M Hall 

-- 
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 14101] auto renewal is tied to 'no renewal before'

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

Kyle M Hall  changed:

   What|Removed |Added

 Status|Signed Off  |Passed QA

-- 
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 14101] auto renewal is tied to 'no renewal before'

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

Holger Meißner  changed:

   What|Removed |Added

  Attachment #43809|0   |1
is obsolete||

--- Comment #29 from Holger Meißner  ---
Created attachment 44949
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44949=edit
Bug 14101: Unit tests

This patch adds new test cases to check if CanBookBeRenewed provides
correct return values and error codes for premature renewals. Both manual
and automatic renewals and different settings for 'No renewal before'
are tested.

To test:
1) prove t/db_dependent/Circulation.t

Sponsored-by: Hochschule für Gesundheit (hsg), Germany

-- 
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 14101] auto renewal is tied to 'no renewal before'

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

Holger Meißner  changed:

   What|Removed |Added

  Attachment #43808|0   |1
is obsolete||

--- Comment #28 from Holger Meißner  ---
Created attachment 44948
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44948=edit
Bug 14101: Automatic renewals exactly on due date

If no value for 'no renewal before' is specified, automatic renewal now
falls back on the due date. Also 'no renewal before' can now be zero, so
both automatic and manual renewals can be delayed until due date.

Test plan:

1) Create some circulation rules with different settings for 'No renewal
   before' and 'Automatic renewal'. Both daily and hourly loans should
   work.

2) Try to renew both manually and automatically before and after a renewal
   should be possible. You can run misc/cronjobs/automatic_renewals.pl for
   automatic renewal.

3) Confirm that:
   * Both automatic and manual renewal with 'No renewal before' set
 to 0 do not happen before the due date (exact DateTime).
   * Manual renewal with 'No renewal before' set to undef (enter empty
 string) is unrestricted.
   * Automatic renewal with 'No renewal before' set to undef does not
 happen before the due date.

Sponsored-by: Hochschule für Gesundheit (hsg), Germany

-- 
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 14101] auto renewal is tied to 'no renewal before'

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

--- Comment #30 from Holger Meißner  ---
Rebased on 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 14101] auto renewal is tied to 'no renewal before'

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

Holger Meißner  changed:

   What|Removed |Added

  Attachment #39800|0   |1
is obsolete||

--- Comment #25 from Holger Meißner  ---
Created attachment 43808
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43808=edit
Bug 14101: Automatic renewals exactly on due date

If no value for 'no renewal before' is specified, automatic renewal now
falls back on the due date. Also 'no renewal before' can now be zero, so
both automatic and manual renewals can be delayed until due date.

Test plan:

1) Create some circulation rules with different settings for 'No renewal
   before' and 'Automatic renewal'. Both daily and hourly loans should
   work.

2) Try to renew both manually and automatically before and after a renewal
   should be possible. You can run misc/cronjobs/automatic_renewals.pl for
   automatic renewal.

3) Confirm that:
   * Both automatic and manual renewal with 'No renewal before' set
 to 0 do not happen before the due date (exact DateTime).
   * Manual renewal with 'No renewal before' set to undef (enter empty
 string) is unrestricted.
   * Automatic renewal with 'No renewal before' set to undef does not
 happen before the due date.

Sponsored-by: Hochschule für Gesundheit (hsg), Germany

-- 
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 14101] auto renewal is tied to 'no renewal before'

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

Holger Meißner  changed:

   What|Removed |Added

  Attachment #42773|0   |1
is obsolete||

--- Comment #26 from Holger Meißner  ---
Created attachment 43809
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43809=edit
Bug 14101: Unit tests

This patch adds new test cases to check if CanBookBeRenewed provides
correct return values and error codes for premature renewals. Both manual
and automatic renewals and different settings for 'No renewal before'
are tested.

To test:
1) prove t/db_dependent/Circulation.t

Sponsored-by: Hochschule für Gesundheit (hsg), Germany

-- 
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 14101] auto renewal is tied to 'no renewal before'

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

--- Comment #27 from Holger Meißner  ---
Hi Jonathan, thanks for QA! I think I fixed everything :)

-- 
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 14101] auto renewal is tied to 'no renewal before'

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

--- Comment #24 from Jonathan Druart  
---
Comment on attachment 39800
  --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39800
Bug 14101: Automatic renewals exactly on due date

Review of attachment 39800:
 --> 
(http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html=14101=39800)
-

::: C4/Circulation.pm
@@ +2737,4 @@
>  return ( 0, "too_many" )
>if $issuingrule->{renewalsallowed} <= $itemissue->{renewals};
>  
> +if ( defined $issuingrule->{norenewalbefore} ) {

What about the empty string? I am not sure it's relevant, but I would like to
be sure.

@@ +2751,5 @@
>  return ( 0, "too_soon" );
>  }
> +else {
> +return ( 0, "auto_renew" ) if $itemissue->{auto_renew};
> +return ( 1, undef );

This last return is not needed, the process should continue I think.
Imagine someone else adds a new check in the futur.

@@ +2759,5 @@
> +# Fallback for automatic renewals:
> +# If norenewalbefore is undef, don't renew before due date.
> +elsif ( $itemissue->{auto_renew} ) {
> +return ( 0, "auto_renew" )
> +  if DateTime->now( time_zone => C4::Context->tz() ) >=

Prefer dt_from_string to get a DateTime object.

-- 
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 14101] auto renewal is tied to 'no renewal before'

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

--- Comment #22 from Holger Meißner  ---
Created attachment 42773
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42773=edit
Bug 14101: Unit tests

This patch adds new test cases to cover the changes introduced by
bug 14101.

To test:
1) prove t/db_dependent/Circulation.t

Sponsored-by: Hochschule für Gesundheit (hsg), Germany

-- 
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 14101] auto renewal is tied to 'no renewal before'

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

Holger Meißner  changed:

   What|Removed |Added

 Status|Failed QA   |Signed Off

--- Comment #23 from Holger Meißner  ---
Hello Jonathan, unit tests are now provided. Setting back to 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 14101] auto renewal is tied to 'no renewal before'

2015-08-19 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14101

Jonathan Druart jonathan.dru...@bugs.koha-community.org changed:

   What|Removed |Added

 Status|Signed Off  |Failed QA
 CC||jonathan.dru...@bugs.koha-c
   ||ommunity.org

--- Comment #21 from Jonathan Druart jonathan.dru...@bugs.koha-community.org 
---
Holger, please provide tests for the changes done to CanBookBeRenewed.

-- 
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 14101] auto renewal is tied to 'no renewal before'

2015-07-21 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14101

bondiurbano cost...@gmail.com 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 14101] auto renewal is tied to 'no renewal before'

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

--- Comment #20 from bondiurbano cost...@gmail.com ---
(In reply to Holger Meißner from comment #19)
 Okay. I'll work on it. I think it should be sysprefed and in a separate
 patch, depending on this one. See bug 14395.

-
Good idea Holger! I agree. So, as a summing up for me:

1) In this bug you have enabled 0 (zero) value for no renewals before
parameter into the issuing rule
2) And bug 14395 will separate (sysprefering) no renewals before into days
and hours

-- 
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 14101] auto renewal is tied to 'no renewal before'

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

Holger Meißner h.meissner...@web.de changed:

   What|Removed |Added

 Blocks||14395

-- 
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 14101] auto renewal is tied to 'no renewal before'

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

--- Comment #19 from Holger Meißner h.meissner...@web.de ---
Okay. I'll work on it. I think it should be sysprefed and in a separate patch,
depending on this one. See bug 14395.

-- 
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 14101] auto renewal is tied to 'no renewal before'

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

Indranil Das Gupta indr...@gmail.com changed:

   What|Removed |Added

 CC||indr...@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/


[Koha-bugs] [Bug 14101] auto renewal is tied to 'no renewal before'

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

--- Comment #17 from Holger Meißner h.meissner...@web.de ---
Bondiurbano,

the calculation uses the exact DateTime. When the unit for the loan period is
days, as far as I know koha always sets the time for the due date to 23:59.

So with due date 04/06/2015 23:59 and 'No renewal before' 1, renewal will be
possible 03/06/2015 23:59. In your Example it is 20:59, three hours too early.

I admit that this is not intuitive, but this way the calculation works for
hours as well as days.

Maybe I should develop two different formulas, based on unit?

-- 
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 14101] auto renewal is tied to 'no renewal before'

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

--- Comment #18 from bondiurbano cost...@gmail.com ---
Hi Holger!

Ah! I understand.

In my opinion no renewal before has no sense in hours. But it's only my point
of view. Not because it is not needed by me, but I can't imagine a situation
like this.

As you suggest, I think that the best way is separating the calculation in
hours and days

-- 
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 14101] auto renewal is tied to 'no renewal before'

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

Holger Meißner h.meissner...@web.de changed:

   What|Removed |Added

 CC||fiona.borthwick@ptfs-europe
   ||.com

--- Comment #13 from Holger Meißner h.meissner...@web.de ---
*** Bug 14214 has been marked as a duplicate of this bug. ***

-- 
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 14101] auto renewal is tied to 'no renewal before'

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

--- Comment #12 from Holger Meißner h.meissner...@web.de ---
Created attachment 39802
  --
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39802action=edit
Table to illustrate how automatic renewals should work.

To make testing easier and for documentation purposes I include a table about
how the feature is supposed to work. Please let me know if you think the
behavior should be altered.

Note: I can't think of a use case, but negative values for 'No renewal before'
work.

-- 
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 14101] auto renewal is tied to 'no renewal before'

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

Holger Meißner h.meissner...@web.de changed:

   What|Removed |Added

 CC||cost...@gmail.com

--- Comment #14 from Holger Meißner h.meissner...@web.de ---
*** Bug 14301 has been marked as a duplicate of this bug. ***

-- 
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 14101] auto renewal is tied to 'no renewal before'

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

--- Comment #11 from Holger Meißner h.meissner...@web.de ---
Created attachment 39800
  --
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39800action=edit
Bug 14101: Automatic renewals exactly on due date

If no value for 'no renewal before' is specified, automatic renewal now
falls back on the due date. Also 'no renewal before' can now be zero, so
both automatic and manual renewals can be delayed until due date.

Test plan:

1) Create some circulation rules with different settings for 'No renewal
   before' and 'Automatic renewal'. Both daily and hourly loans should
   work.

2) Run misc/cronjobs/automatic_renewals.pl and try to renew manually
   before and after a renewal should be possible.

3) Confirm that:
   * Both automatic and manual renewal with 'No renewal before' set
 to 0 do not happen before the due date (exact DateTime).
   * Manual renewal with 'No renewal before' set to undef (enter empty
 string) is unrestricted.
   * Automatic renewal with 'No renewal before' set to undef does not
 happen before the due date.

Sponsored-by: Hochschule für Gesundheit (hsg), Germany

-- 
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 14101] auto renewal is tied to 'no renewal before'

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

Holger Meißner h.meissner...@web.de changed:

   What|Removed |Added

 Status|ASSIGNED|Needs Signoff

-- 
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 14101] auto renewal is tied to 'no renewal before'

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

Holger Meißner h.meissner...@web.de changed:

   What|Removed |Added

   Patch complexity|--- |Small patch
  Change sponsored?|--- |Sponsored

-- 
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 14101] auto renewal is tied to 'no renewal before'

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

--- Comment #15 from bondiurbano cost...@gmail.com ---
Holger,

I've upload a PDF with a case I'd like you to consider.

I've made a test as you suggested:

1) Now is possible to set no renewals before to 0. It works fine.
2) Calculation of days to disable renewals is OK.
3) But Koha fails when it must to enable renewal possibility

-- 
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 14101] auto renewal is tied to 'no renewal before'

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

--- Comment #16 from bondiurbano cost...@gmail.com ---
Created attachment 39829
  --
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39829action=edit
Test 1 no renewals before

-- 
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 14101] auto renewal is tied to 'no renewal before'

2015-05-31 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14101

Katrin Fischer katrin.fisc...@bsz-bw.de changed:

   What|Removed |Added

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

-- 
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 14101] auto renewal is tied to 'no renewal before'

2015-05-28 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14101

--- Comment #9 from Holger Meißner h.meissner...@web.de ---
I am unable to reproduce this problem. We already use the feature in 3.18.

Loan period: 30 days
Renewal period: 20 days
No renewal before: 11 days
Renewals allowed (count): 16

I checked out some items on 29/04/2015, the cronjob is running nightly. So far
it renewed only once. 15 renewals are still left.

Today I also tested in 3.21 with hour-based issues.

Loan period: 2 hours
Renewal period: 2 hours
No renewal before: 1 hour
Renewals allowed (count): 3

I ran automatic_renewals.pl multiple times, before an hour had passed and
after. It renewed just once, an hour after check out.

Kyle, could there be some problem with DateTime-now() in your setup? Does it
give you the correct time?

-- 
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 14101] auto renewal is tied to 'no renewal before'

2015-05-28 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14101

--- Comment #10 from Holger Meißner h.meissner...@web.de ---
(In reply to Katrin Fischer from comment #4) 
 Maybe the feature could fall back to try a renewal on the due date if there
 is nothing else specified in the circulation rules?
I think that's a great idea! I'll implement that.

-- 
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 14101] auto renewal is tied to 'no renewal before'

2015-05-28 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14101

Holger Meißner h.meissner...@web.de changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|koha-b...@lists.koha-commun |h.meissner...@web.de
   |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
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 14101] auto renewal is tied to 'no renewal before'

2015-05-27 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14101

Kyle M Hall k...@bywatersolutions.com changed:

   What|Removed |Added

 CC||k...@bywatersolutions.com

--- Comment #7 from Kyle M Hall k...@bywatersolutions.com ---
Right. My current testing on 3.18 makes me think the entire feature is broken (
or needs more documentation because I don't know how to set it up ).

I set up a test and included a no renewal before value and the nightly cron
still renewed all my items each night!

(In reply to Holger Meißner from comment #6)
 (In reply to Kyle M Hall from comment #3)
  This seems to happen even if I set a no renewal before value.
 
 Hi Kyle, which values did you test? It should work with values equal to or
 greater than 1. Maybe the feature broke. I am going to re-test, but this is
 how it used to work. The cronjob calls CanBookBeRenewed. There no renewal
 before is calculated like this:
 
 if ( $issuingrule-{norenewalbefore} ) {
 
 # Get current time and add norenewalbefore.
 # If this is smaller than date_due, it's too soon for renewal.
 if (
 DateTime-now( time_zone = C4::Context-tz() )-add(
 $issuingrule-{lengthunit} = $issuingrule-{norenewalbefore}
 )  $itemissue-{date_due}
   )
 {
 return ( 0, auto_too_soon ) if $itemissue-{auto_renew};
 return ( 0, too_soon );
 }
 }

-- 
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 14101] auto renewal is tied to 'no renewal before'

2015-05-27 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14101

--- Comment #8 from Katrin Fischer katrin.fisc...@bsz-bw.de ---
Hi Kyle, what are the loan period and no renewal before values you tested with?

-- 
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 14101] auto renewal is tied to 'no renewal before'

2015-05-19 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14101

--- Comment #6 from Holger Meißner h.meissner...@web.de ---
(In reply to Kyle M Hall from comment #3)
 This seems to happen even if I set a no renewal before value.

Hi Kyle, which values did you test? It should work with values equal to or
greater than 1. Maybe the feature broke. I am going to re-test, but this is how
it used to work. The cronjob calls CanBookBeRenewed. There no renewal before
is calculated like this:

if ( $issuingrule-{norenewalbefore} ) {

# Get current time and add norenewalbefore.
# If this is smaller than date_due, it's too soon for renewal.
if (
DateTime-now( time_zone = C4::Context-tz() )-add(
$issuingrule-{lengthunit} = $issuingrule-{norenewalbefore}
)  $itemissue-{date_due}
  )
{
return ( 0, auto_too_soon ) if $itemissue-{auto_renew};
return ( 0, too_soon );
}
}

-- 
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 14101] auto renewal is tied to 'no renewal before'

2015-05-19 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14101

--- Comment #5 from Holger Meißner h.meissner...@web.de ---
(In reply to Nicole C. Engard from comment #0)
 It seems as though the autorenewal feature needs to have the column no
 renewal before filled in or it will auto renew everyday after the duedate

Hello Nicole. Yes, this is intentional. The no renewal before setting is the
only way for the cronjob to know whether it is too soon for renewal or not. So
without it, it will just renew every time it runs. Unless another restriction
is met.

 I'm not sure (haven't had time to test) how this effects auto renewals that
 happen from the check box on the check out screen.

There is a flag in the database called issues.auto_renew. If automatic renewal
is scheduled by issing rule, this flag will be set for all issues where the
rule applies. By checkbox the same flag is set, just for one issue. It makes no
difference for the automatic renewal cronjob. It just tries to renew every
flagged issue and uses the no renewal before settig from the issuing rule
that applies.

-- 
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 14101] auto renewal is tied to 'no renewal before'

2015-05-18 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14101

--- Comment #3 from Kyle M Hall k...@bywatersolutions.com ---
Maybe the documentation on this feature is wrong, but when I've tried to set up
automatica renewals I have a serious issue. 

I enable the nightly cron and all my automatic renewals are renewed every
night! So if I set up automatic renewals on an item with 3 renewals and a
renewal period of 7 days, I find that the item is renewed on the 1st night, on
the 2nd night, and on the 3rd night. At that point it's out of renewals!

This seems to happen even if I set a no renewal before value.

Katrin, have you tried the feature? I'd love to get confirmation or
clarification on how this should 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/


[Koha-bugs] [Bug 14101] auto renewal is tied to 'no renewal before'

2015-05-18 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14101

--- Comment #2 from Nicole C. Engard neng...@gmail.com ---
I'm a bit confused then on how it works if I check the auto renew box when I
check out - in that scenario you're overriding the default and there is no way
to set 'no renewal before' in that scenario ... make sense?

-- 
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 14101] auto renewal is tied to 'no renewal before'

2015-05-18 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14101

--- Comment #4 from Katrin Fischer katrin.fisc...@bsz-bw.de ---
I think it should take the 'no renewal before' into account - I am not sure why
it wouldn't. I haven't tested this myself, but I have added the developer in
CC.

Maybe the feature could fall back to try a renewal on the due date if there is
nothing else specified in the circulation rules?

-- 
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 14101] auto renewal is tied to 'no renewal before'

2015-05-18 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14101

Katrin Fischer katrin.fisc...@bsz-bw.de changed:

   What|Removed |Added

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

-- 
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 14101] auto renewal is tied to 'no renewal before'

2015-05-15 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14101

Katrin Fischer katrin.fisc...@bsz-bw.de changed:

   What|Removed |Added

 CC||h.meissner...@web.de,
   ||katrin.fisc...@bsz-bw.de

--- Comment #1 from Katrin Fischer katrin.fisc...@bsz-bw.de ---
Hi Nicole,

I think this is how it's intended to work and not sure how it could be changed
to work differently. See
http://wiki.koha-community.org/wiki/Automatic_renewal_RFC

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