[Koha-bugs] [Bug 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

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

Fridolin SOMERS  changed:

   What|Removed |Added

 Blocks||21020
 Depends on|21020   |


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21020
[Bug 21020] Return branch not set for transfer when using SIP
-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2018-06-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

Nick Clemens  changed:

   What|Removed |Added

 Depends on||21020


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21020
[Bug 21020] Return branch not set for transfer when using SIP
-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

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

Fridolin SOMERS  changed:

   What|Removed |Added

 Status|Pushed to Master|RESOLVED
 Resolution|--- |FIXED

--- Comment #68 from Fridolin SOMERS  ---
Enhancement not pushed to 17.05.x

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-07-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

--- Comment #67 from Marcel de Rooy  ---
(In reply to Jonathan Druart from comment #64)
> Would be great to have the SIP tests moved to t

Will try to add at least a test for checkin on 18996. Bit by bit extending what
we have in t/db_dependent/SIP. I am not that comfortable with C4/SIP/t and
suspect that it does not create its own data too.

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-07-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

--- Comment #66 from Marcel de Rooy  ---
(In reply to Colin Campbell from comment #62)
> Suspect that the reason there is no
> compile time warning is because ILS::Item is using autoloading so that the
> routine gets resolved at runtime.

Yes, nice effects of autoloading of course. We could improve that some day ;)

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-07-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

Jonathan Druart  changed:

   What|Removed |Added

 Status|Passed QA   |Pushed to Master

--- Comment #65 from Jonathan Druart  
---
Last patch pushed to master for 17.11. Thanks Marcel and Colin!

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-07-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

--- Comment #64 from Jonathan Druart  
---
Would be great to have the SIP tests moved to t

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-07-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

Colin Campbell  changed:

   What|Removed |Added

  Attachment #65302|0   |1
is obsolete||

--- Comment #63 from Colin Campbell  ---
Created attachment 65310
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=65310=edit
Bug 17680 [QA Follow-up] dt_from_string failing silently

Added independent sign off to last 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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-07-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

Colin Campbell  changed:

   What|Removed |Added

 CC||colin.campbell@ptfs-europe.
   ||com

--- Comment #62 from Colin Campbell  ---
(In reply to Marcel de Rooy from comment #61)
> Created attachment 65302 [details] [review]
> Bug 17680: [QA Follow-up] dt_from_string failing silently
> 
> This is a trivial fix, but finding the cause for a failing checkin in
> SIPServer surely was not.
> Without this simple change, I could not checkin an item while the SIP server
> just closed the connection and syslog contained nothing useful.
> 
> The error can be easily reproduced without this patch by:
> use Modern::Perl;
> use C4::SIP::ILS::Item;
> my $item = C4::SIP::ILS::Item->new('some_barcode');
> where some_barcode should refer to an item checked out.
> You should trigger the error (with your due date):
> 2017-07-28 23:59:00 is not an object at line 3.
> 
> Why the ILS/Item.pm module still compiles without a warning, is not clear
> though.
> 
> Signed-off-by: Marcel de Rooy 

Nice find - these are painful to locate. Suspect that the reason there is no
compile time warning is because ILS::Item is using autoloading so that the
routine gets resolved at runtime.

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-07-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

Marcel de Rooy  changed:

   What|Removed |Added

 Blocks||18996


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18996
[Bug 18996] SIP sets ok flag to true for refused checkin for data corruption
-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-07-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

Marcel de Rooy  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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-07-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

Marcel de Rooy  changed:

   What|Removed |Added

 Status|REOPENED|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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-07-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

Marcel de Rooy  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-07-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

Marcel de Rooy  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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-07-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

--- Comment #61 from Marcel de Rooy  ---
Created attachment 65302
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=65302=edit
Bug 17680: [QA Follow-up] dt_from_string failing silently

This is a trivial fix, but finding the cause for a failing checkin in
SIPServer surely was not.
Without this simple change, I could not checkin an item while the SIP server
just closed the connection and syslog contained nothing useful.

The error can be easily reproduced without this patch by:
use Modern::Perl;
use C4::SIP::ILS::Item;
my $item = C4::SIP::ILS::Item->new('some_barcode');
where some_barcode should refer to an item checked out.
You should trigger the error (with your due date):
2017-07-28 23:59:00 is not an object at line 3.

Why the ILS/Item.pm module still compiles without a warning, is not clear
though.

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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-07-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

Marcel de Rooy  changed:

   What|Removed |Added

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

--- Comment #60 from Marcel de Rooy  ---
(In reply to Tomás Cohen Arazi from comment #57)
> I tested this patchset on the UI. It looks trivial in most of the cases. I
> haven't tested ILS-DI and SIP beyond the included unit tests, but the
> changes seems pretty straight-forward, and tests pass of course.

I think I found a problem in SIP/ILS/Item.
It fails silently on dt_from_string when checking in an item.

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-07-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

Fridolin SOMERS  changed:

   What|Removed |Added

 Status|Pushed to Master|RESOLVED
 Resolution|--- |FIXED
 CC||fridolin.som...@biblibre.co
   ||m

--- Comment #59 from Fridolin SOMERS  ---
Enhancement not pushed to 17.05.x

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-07-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

Jonathan Druart  changed:

   What|Removed |Added

 Status|Passed QA   |Pushed to Master

--- Comment #58 from Jonathan Druart  
---
Pushed to master for 17.11, thanks to everybody involved!

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-07-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Status|Signed Off  |Passed QA
Version|unspecified |master

--- Comment #57 from Tomás Cohen Arazi  ---
I tested this patchset on the UI. It looks trivial in most of the cases. I
haven't tested ILS-DI and SIP beyond the included unit tests, but the changes
seems pretty straight-forward, and tests pass of course.

The QA script is happy too.

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-07-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

--- Comment #56 from Tomás Cohen Arazi  ---
Created attachment 64931
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64931=edit
Bug 17680: Remove Koha::Upload use incorrectly added

Signed-off-by: Tomas Cohen Arazi 

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-07-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

Tomás Cohen Arazi  changed:

   What|Removed |Added

  Attachment #64870|0   |1
is obsolete||

--- Comment #54 from Tomás Cohen Arazi  ---
Created attachment 64929
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64929=edit
Bug 17680: Add few tests for AddReturn when overdue

To make sure the last patch fixes the issue

Signed-off-by: Tomas Cohen Arazi 

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-07-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

Tomás Cohen Arazi  changed:

   What|Removed |Added

  Attachment #64869|0   |1
is obsolete||

--- Comment #53 from Tomás Cohen Arazi  ---
Created attachment 64928
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64928=edit
Bug 17680: Fix regression - is_overdue must be called

is_overdue must be called even if there is not dropbox date (!)

Signed-off-by: Tomas Cohen Arazi 

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-07-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

Tomás Cohen Arazi  changed:

   What|Removed |Added

  Attachment #64871|0   |1
is obsolete||

--- Comment #55 from Tomás Cohen Arazi  ---
Created attachment 64930
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64930=edit
Bug 17680: Fix conflict with bug 18651

$issue is now a Koha::Checkout, not a hashref

Signed-off-by: Tomas Cohen Arazi 

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-07-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

Tomás Cohen Arazi  changed:

   What|Removed |Added

  Attachment #64868|0   |1
is obsolete||

--- Comment #52 from Tomás Cohen Arazi  ---
Created attachment 64927
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64927=edit
Bug 17680: C4::Circulation - Remove GetItemIssue, complex calls

There are a few calls to GetItemIssue where it's not as easy to make
sure everything will be fine just replacing the calls with a
Koha::Issues->find
- In AddReturn the overdue flag is used (that's why this patch depends
on bug 17689)
- In CanBookBeRenewed, as well as the overdue flag the dates converted
to DateTime were used. It's now our job to convert them when we need
them.
- Same in AddRenewal but we also call _CalculateAndUpdateFine, so we
need to update the variables in this subroutine.

Note that, prior to this patch, AddReturn returned the GetItemIssue
hashref in the $iteminformation. Most of the time this variable is not
used, I have found only 1 place where it's used: circ/returns.pl
TODO: In this script we should call ->is_overdue instead of the
DateTime->compare calls

Test plan:
All the circulation tests must pass (it's how I have caught the specific
cases).
Do some checkins/checkouts/renewal and focus on the due date

Signed-off-by: Marc Véron 
Signed-off-by: Tomas Cohen Arazi 

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-07-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

Tomás Cohen Arazi  changed:

   What|Removed |Added

  Attachment #64867|0   |1
is obsolete||

--- Comment #51 from Tomás Cohen Arazi  ---
Created attachment 64926
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64926=edit
Bug 17680: C4::Circulation - Remove GetItemIssue

This patch simply removes the C4::Circulation::GetItemIssue subroutine

Test plan:
At this point, `git grep GetItemIssue` should not return any occurrence
in the codebase

Signed-off-by: Alex Buckley 

Signed-off-by: Marc Véron 
Signed-off-by: Tomas Cohen Arazi 

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-07-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

Tomás Cohen Arazi  changed:

   What|Removed |Added

  Attachment #64866|0   |1
is obsolete||

--- Comment #50 from Tomás Cohen Arazi  ---
Created attachment 64925
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64925=edit
Bug 17680: C4::Circulation - Remove GetItemIssue, simple calls

C4::Circulation::GetItemIssue returned all the issue and item
informations for a given issue. Moveover it also did some date
manipulations. Most of the time this subroutine was called, there
additional information were useless as the caller usually just needed
the basic issue's infos 'from the issue table).

This first patch updates the simple calls, ie. the ones that just need
the issue's infomations.

Test plan:
The following operations should success:
- transfer a book
- create a rule for on-site checkouts and confirm that a patron cannot
check more items out that it's defined in the rule.
- Renew an issue using ILSDI
- Using SIP confirm that you are able to see your issues

Followed test plan, works as expected
Signed-off-by: Marc Véron 
Signed-off-by: Tomas Cohen Arazi 

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-07-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

Jonathan Druart  changed:

   What|Removed |Added

  Attachment #64257|0   |1
is obsolete||
  Attachment #64258|0   |1
is obsolete||
  Attachment #64805|0   |1
is obsolete||
  Attachment #64806|0   |1
is obsolete||
  Attachment #64807|0   |1
is obsolete||
  Attachment #64833|0   |1
is obsolete||

--- Comment #44 from Jonathan Druart  
---
Created attachment 64866
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64866=edit
Bug 17680: C4::Circulation - Remove GetItemIssue, simple calls

C4::Circulation::GetItemIssue returned all the issue and item
informations for a given issue. Moveover it also did some date
manipulations. Most of the time this subroutine was called, there
additional information were useless as the caller usually just needed
the basic issue's infos 'from the issue table).

This first patch updates the simple calls, ie. the ones that just need
the issue's infomations.

Test plan:
The following operations should success:
- transfer a book
- create a rule for on-site checkouts and confirm that a patron cannot
check more items out that it's defined in the rule.
- Renew an issue using ILSDI
- Using SIP confirm that you are able to see your issues

Followed test plan, works as expected
Signed-off-by: Marc Véron 

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-07-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

--- Comment #47 from Jonathan Druart  
---
Created attachment 64869
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64869=edit
Bug 17680: Fix regression - is_overdue must be called

is_overdue must be called even if there is not dropbox date (!)

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-07-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

--- Comment #49 from Jonathan Druart  
---
Created attachment 64871
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64871=edit
Bug 17680: Fix conflict with bug 18651

$issue is now a Koha::Checkout, not a hashref

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-07-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

--- Comment #48 from Jonathan Druart  
---
Created attachment 64870
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64870=edit
Bug 17680: Add few tests for AddReturn when overdue

To make sure the last patch fixes the issue

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-07-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

--- Comment #46 from Jonathan Druart  
---
Created attachment 64868
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64868=edit
Bug 17680: C4::Circulation - Remove GetItemIssue, complex calls

There are a few calls to GetItemIssue where it's not as easy to make
sure everything will be fine just replacing the calls with a
Koha::Issues->find
- In AddReturn the overdue flag is used (that's why this patch depends
on bug 17689)
- In CanBookBeRenewed, as well as the overdue flag the dates converted
to DateTime were used. It's now our job to convert them when we need
them.
- Same in AddRenewal but we also call _CalculateAndUpdateFine, so we
need to update the variables in this subroutine.

Note that, prior to this patch, AddReturn returned the GetItemIssue
hashref in the $iteminformation. Most of the time this variable is not
used, I have found only 1 place where it's used: circ/returns.pl
TODO: In this script we should call ->is_overdue instead of the
DateTime->compare calls

Test plan:
All the circulation tests must pass (it's how I have caught the specific
cases).
Do some checkins/checkouts/renewal and focus on the due date

Signed-off-by: Marc Véron 

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-07-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

--- Comment #45 from Jonathan Druart  
---
Created attachment 64867
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64867=edit
Bug 17680: C4::Circulation - Remove GetItemIssue

This patch simply removes the C4::Circulation::GetItemIssue subroutine

Test plan:
At this point, `git grep GetItemIssue` should not return any occurrence
in the codebase

Signed-off-by: Alex Buckley 

Signed-off-by: Marc Véron 

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-07-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

Jonathan Druart  changed:

   What|Removed |Added

 Status|Failed QA   |Signed Off

--- Comment #43 from Jonathan Druart  
---
(In reply to Tomás Cohen Arazi from comment #41)

Thanks for catching that, fixed!

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-07-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

--- Comment #42 from Jonathan Druart  
---
Created attachment 64833
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64833=edit
Bug 17680: Fix conflict with bug 18651

$issue is now a Koha::Checkout, not a hashref

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-07-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Status|Signed Off  |Failed QA

--- Comment #41 from Tomás Cohen Arazi  ---
wihtout the patches:

kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ prove
t/db_dependent/Circulation/Returns.t 
t/db_dependent/Circulation/Returns.t .. ok   
All tests successful.
Files=1, Tests=4,  2 wallclock secs ( 0.02 usr  0.01 sys +  2.09 cusr  0.35
csys =  2.47 CPU)
Result: PASS

with the patches:

kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ prove
t/db_dependent/Circulation/Returns.t 
t/db_dependent/Circulation/Returns.t .. 1/4 
#   Failed test 'No account lines should exist on old issue_id'
#   at t/db_dependent/Circulation/Returns.t line 311.
#  got: '1'
# expected: '0'

#   Failed test 'Two account lines should exist on new issue_id'
#   at t/db_dependent/Circulation/Returns.t line 314.
#  got: '1'
# expected: '2'
# Looks like you failed 2 tests of 4.
t/db_dependent/Circulation/Returns.t .. 4/4 
#   Failed test 'Handle ids duplication'
#   at t/db_dependent/Circulation/Returns.t line 318.
# Looks like you failed 1 test of 4.
t/db_dependent/Circulation/Returns.t .. Dubious, test returned 1 (wstat 256,
0x100)
Failed 1/4 subtests 

Test Summary Report
---
t/db_dependent/Circulation/Returns.t (Wstat: 256 Tests: 4 Failed: 1)
  Failed test:  4
  Non-zero exit status: 1
Files=1, Tests=4,  3 wallclock secs ( 0.02 usr  0.01 sys +  2.14 cusr  0.33
csys =  2.50 CPU)
Result: FAIL
kohadev-koha@kohadevbox:/home/vagrant/kohaclone$

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-07-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

Jonathan Druart  changed:

   What|Removed |Added

  Attachment #64259|0   |1
is obsolete||
  Attachment #64284|0   |1
is obsolete||
  Attachment #64337|0   |1
is obsolete||

--- Comment #38 from Jonathan Druart  
---
Created attachment 64805
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64805=edit
Bug 17680: C4::Circulation - Remove GetItemIssue, complex calls

There are a few calls to GetItemIssue where it's not as easy to make
sure everything will be fine just replacing the calls with a
Koha::Issues->find
- In AddReturn the overdue flag is used (that's why this patch depends
on bug 17689)
- In CanBookBeRenewed, as well as the overdue flag the dates converted
to DateTime were used. It's now our job to convert them when we need
them.
- Same in AddRenewal but we also call _CalculateAndUpdateFine, so we
need to update the variables in this subroutine.

Note that, prior to this patch, AddReturn returned the GetItemIssue
hashref in the $iteminformation. Most of the time this variable is not
used, I have found only 1 place where it's used: circ/returns.pl
TODO: In this script we should call ->is_overdue instead of the
DateTime->compare calls

Test plan:
All the circulation tests must pass (it's how I have caught the specific
cases).
Do some checkins/checkouts/renewal and focus on the due date

Signed-off-by: Marc Véron 

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-07-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

--- Comment #39 from Jonathan Druart  
---
Created attachment 64806
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64806=edit
Bug 17680: Fix regression - is_overdue must be called

is_overdue must be called even if there is not dropbox date (!)

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-07-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-07-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

--- Comment #40 from Jonathan Druart  
---
Created attachment 64807
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64807=edit
Bug 17680: Add few tests for AddReturn when overdue

To make sure the last patch fixes the issue

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-06-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

Jonathan Druart  changed:

   What|Removed |Added

 Status|Signed Off  |ASSIGNED
 Status|ASSIGNED|Needs Signoff
 Status|Needs Signoff   |Signed Off

Tomás Cohen Arazi  changed:

   What|Removed |Added

 CC||tomasco...@gmail.com
 Status|Signed Off  |Patch doesn't apply

--- Comment #36 from Jonathan Druart  
---
Created attachment 64337
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64337=edit
Bug 17680: Add few tests for AddReturn when overdue

To make sure the last patch fixes the issue

--- Comment #37 from Tomás Cohen Arazi  ---
Code looks ok, but I cannot apply the 'complex calls' 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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-06-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

Jonathan Druart  changed:

   What|Removed |Added

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

--- Comment #35 from Jonathan Druart  
---
(In reply to Jonathan Druart from comment #34)
> > Test fails: 
> > t/db_dependent/Circulation.t .. 44/95 
> > #   Failed test 'Can auto renew, OPACFineNoRenewals=10, patron has 10'
> > #   at t/db_dependent/Circulation.t line 671.
> > #  got: 'auto_too_much_oweing'
> > # expected: 'auto_renew'
> > # Looks like you failed 1 test of 6.
> 
> I manage to recreate that with prove t/db_dependent/Circulation*
> but then the test failed on master too. Sounds like a master bug, depending
> on data.

It depends on the value of finesMode. I have opened bug 18802.

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-06-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

Jonathan Druart  changed:

   What|Removed |Added

 Status|Failed QA   |Signed Off

--- Comment #34 from Jonathan Druart  
---
(In reply to Nick Clemens from comment #32)
> SIP fails on the date, this needs to be converted to a string for returning

Any chances you could try to fix this one?

> Checking in an overdue item fails to calculate the fine

Ha, terrible! Will be fixed with the last patch, thanks for catching that.

> Test fails: 
> t/db_dependent/Circulation.t .. 44/95 
> #   Failed test 'Can auto renew, OPACFineNoRenewals=10, patron has 10'
> #   at t/db_dependent/Circulation.t line 671.
> #  got: 'auto_too_much_oweing'
> # expected: 'auto_renew'
> # Looks like you failed 1 test of 6.

I manage to recreate that with prove t/db_dependent/Circulation*
but then the test failed on master too. Sounds like a master bug, depending on
data.

> I think there are spots where the date isn't being converted from a DateTime
> object when needed

Did you spot where?

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-06-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

--- Comment #33 from Jonathan Druart  
---
Created attachment 64284
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64284=edit
Bug 17680: Fix regression - is_overdue must be called

is_overdue must be called even if there is not dropbox date (!)

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-06-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

Nick Clemens  changed:

   What|Removed |Added

 Status|Signed Off  |Failed QA

--- Comment #32 from Nick Clemens  ---
SIP fails on the date, this needs to be converted to a string for returning

Checking in an overdue item fails to calculate the fine

Test fails: 
t/db_dependent/Circulation.t .. 44/95 
#   Failed test 'Can auto renew, OPACFineNoRenewals=10, patron has 10'
#   at t/db_dependent/Circulation.t line 671.
#  got: 'auto_too_much_oweing'
# expected: 'auto_renew'
# Looks like you failed 1 test of 6.

I think there are spots where the date isn't being converted from a DateTime
object when needed

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-06-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

--- Comment #31 from Nick Clemens  ---
looking here - SIP item_information request failed for me in testing (worked on
master) - will try again tomorrow

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-06-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

--- Comment #30 from Jonathan Druart  
---
Created attachment 64259
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64259=edit
Bug 17680: C4::Circulation - Remove GetItemIssue, complex calls

There are a few calls to GetItemIssue where it's not as easy to make
sure everything will be fine just replacing the calls with a
Koha::Issues->find
- In AddReturn the overdue flag is used (that's why this patch depends
on bug 17689)
- In CanBookBeRenewed, as well as the overdue flag the dates converted
to DateTime were used. It's now our job to convert them when we need
them.
- Same in AddRenewal but we also call _CalculateAndUpdateFine, so we
need to update the variables in this subroutine.

Note that, prior to this patch, AddReturn returned the GetItemIssue
hashref in the $iteminformation. Most of the time this variable is not
used, I have found only 1 place where it's used: circ/returns.pl
TODO: In this script we should call ->is_overdue instead of the
DateTime->compare calls

Test plan:
All the circulation tests must pass (it's how I have caught the specific
cases).
Do some checkins/checkouts/renewal and focus on the due date

Signed-off-by: Marc Véron 

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-06-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

Jonathan Druart  changed:

   What|Removed |Added

  Attachment #62102|0   |1
is obsolete||
  Attachment #62103|0   |1
is obsolete||
  Attachment #62104|0   |1
is obsolete||

--- Comment #28 from Jonathan Druart  
---
Created attachment 64257
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64257=edit
Bug 17680: C4::Circulation - Remove GetItemIssue, simple calls

C4::Circulation::GetItemIssue returned all the issue and item
informations for a given issue. Moveover it also did some date
manipulations. Most of the time this subroutine was called, there
additional information were useless as the caller usually just needed
the basic issue's infos 'from the issue table).

This first patch updates the simple calls, ie. the ones that just need
the issue's infomations.

Test plan:
The following operations should success:
- transfer a book
- create a rule for on-site checkouts and confirm that a patron cannot
check more items out that it's defined in the rule.
- Renew an issue using ILSDI
- Using SIP confirm that you are able to see your issues

Followed test plan, works as expected
Signed-off-by: Marc Véron 

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-06-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

--- Comment #29 from Jonathan Druart  
---
Created attachment 64258
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64258=edit
Bug 17680: C4::Circulation - Remove GetItemIssue

This patch simply removes the C4::Circulation::GetItemIssue subroutine

Test plan:
At this point, `git grep GetItemIssue` should not return any occurrence
in the codebase

Signed-off-by: Alex Buckley 

Signed-off-by: Marc Véron 

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-06-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

Nick Clemens  changed:

   What|Removed |Added

 CC||n...@bywatersolutions.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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

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

Marc Véron  changed:

   What|Removed |Added

   Patch complexity|--- |Medium patch
 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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

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

Marc Véron  changed:

   What|Removed |Added

  Attachment #62086|0   |1
is obsolete||

--- Comment #27 from Marc Véron  ---
Created attachment 62104
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62104=edit
Bug 17680: C4::Circulation - Remove GetItemIssue, complex calls

There are a few calls to GetItemIssue where it's not as easy to make
sure everything will be fine just replacing the calls with a
Koha::Issues->find
- In AddReturn the overdue flag is used (that's why this patch depends
on bug 17689)
- In CanBookBeRenewed, as well as the overdue flag the dates converted
to DateTime were used. It's now our job to convert them when we need
them.
- Same in AddRenewal but we also call _CalculateAndUpdateFine, so we
need to update the variables in this subroutine.

Note that, prior to this patch, AddReturn returned the GetItemIssue
hashref in the $iteminformation. Most of the time this variable is not
used, I have found only 1 place where it's used: circ/returns.pl
TODO: In this script we should call ->is_overdue instead of the
DateTime->compare calls

Test plan:
All the circulation tests must pass (it's how I have caught the specific
cases).
Do some checkins/checkouts/renewal and focus on the due date

Signed-off-by: Marc Véron 

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

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

Marc Véron  changed:

   What|Removed |Added

  Attachment #61762|0   |1
is obsolete||

--- Comment #26 from Marc Véron  ---
Created attachment 62103
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62103=edit
Bug 17680: C4::Circulation - Remove GetItemIssue

This patch simply removes the C4::Circulation::GetItemIssue subroutine

Test plan:
At this point, `git grep GetItemIssue` should not return any occurrence
in the codebase

Signed-off-by: Alex Buckley 

Signed-off-by: Marc Véron 

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

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

Marc Véron  changed:

   What|Removed |Added

  Attachment #61761|0   |1
is obsolete||

--- Comment #25 from Marc Véron  ---
Created attachment 62102
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62102=edit
Bug 17680: C4::Circulation - Remove GetItemIssue, simple calls

C4::Circulation::GetItemIssue returned all the issue and item
informations for a given issue. Moveover it also did some date
manipulations. Most of the time this subroutine was called, there
additional information were useless as the caller usually just needed
the basic issue's infos 'from the issue table).

This first patch updates the simple calls, ie. the ones that just need
the issue's infomations.

Test plan:
The following operations should success:
- transfer a book
- create a rule for on-site checkouts and confirm that a patron cannot
check more items out that it's defined in the rule.
- Renew an issue using ILSDI
- Using SIP confirm that you are able to see your issues

Followed test plan, works as expected
Signed-off-by: Marc Véron 

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

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

--- Comment #24 from Marc Véron  ---
Worked through test plans from comments #1 - #3, everything OK, will sign 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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

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

Jonathan Druart  changed:

   What|Removed |Added

  Attachment #62034|0   |1
is obsolete||

--- Comment #23 from Jonathan Druart  
---
Created attachment 62086
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62086=edit
Bug 17680: C4::Circulation - Remove GetItemIssue, complex calls

There are a few calls to GetItemIssue where it's not as easy to make
sure everything will be fine just replacing the calls with a
Koha::Issues->find
- In AddReturn the overdue flag is used (that's why this patch depends
on bug 17689)
- In CanBookBeRenewed, as well as the overdue flag the dates converted
to DateTime were used. It's now our job to convert them when we need
them.
- Same in AddRenewal but we also call _CalculateAndUpdateFine, so we
need to update the variables in this subroutine.

Note that, prior to this patch, AddReturn returned the GetItemIssue
hashref in the $iteminformation. Most of the time this variable is not
used, I have found only 1 place where it's used: circ/returns.pl
TODO: In this script we should call ->is_overdue instead of the
DateTime->compare calls

Test plan:
All the circulation tests must pass (it's how I have caught the specific
cases).
Do some checkins/checkouts/renewal and focus on the due date

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

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

--- Comment #22 from Marc Véron  ---
Typo in 3rd patch, circ/returns.pl , line 314:

my $date_due_dt = dt_strom_string( $issue->date_due, 'sql' );

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-04-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

Jonathan Druart  changed:

   What|Removed |Added

  Attachment #61763|0   |1
is obsolete||

--- Comment #21 from Jonathan Druart  
---
Created attachment 62034
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62034=edit
Bug 17680: C4::Circulation - Remove GetItemIssue, complex calls

There are a few calls to GetItemIssue where it's not as easy to make
sure everything will be fine just replacing the calls with a
Koha::Issues->find
- In AddReturn the overdue flag is used (that's why this patch depends
on bug 17689)
- In CanBookBeRenewed, as well as the overdue flag the dates converted
to DateTime were used. It's now our job to convert them when we need
them.
- Same in AddRenewal but we also call _CalculateAndUpdateFine, so we
need to update the variables in this subroutine.

Note that, prior to this patch, AddReturn returned the GetItemIssue
hashref in the $iteminformation. Most of the time this variable is not
used, I have found only 1 place where it's used: circ/returns.pl
TODO: In this script we should call ->is_overdue instead of the
DateTime->compare calls

Test plan:
All the circulation tests must pass (it's how I have caught the specific
cases).
Do some checkins/checkouts/renewal and focus on the due date

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-04-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

Marc Véron  changed:

   What|Removed |Added

 CC||ve...@veron.ch

--- Comment #20 from Marc Véron  ---
First two patches apply cleanly, with 3rd patch (complex calls) I get:
fatal: sha1 information is lacking or useless (C4/Circulation.pm).

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-04-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

Jonathan Druart  changed:

   What|Removed |Added

 Blocks||17829


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17829
[Bug 17829] Move GetMember to Koha::Patron
-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

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

--- Comment #17 from Jonathan Druart  
---
Created attachment 61762
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61762=edit
Bug 17680: C4::Circulation - Remove GetItemIssue

This patch simply removes the C4::Circulation::GetItemIssue subroutine

Test plan:
At this point, `git grep GetItemIssue` should not return any occurrence
in the codebase

Signed-off-by: Alex Buckley 

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

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

--- Comment #19 from Jonathan Druart  
---
Just a rebase.

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

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

--- Comment #18 from Jonathan Druart  
---
Created attachment 61763
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61763=edit
Bug 17680: C4::Circulation - Remove GetItemIssue, complex calls

There are a few calls to GetItemIssue where it's not as easy to make
sure everything will be fine just replacing the calls with a
Koha::Issues->find
- In AddReturn the overdue flag is used (that's why this patch depends
on bug 17689)
- In CanBookBeRenewed, as well as the overdue flag the dates converted
to DateTime were used. It's now our job to convert them when we need
them.
- Same in AddRenewal but we also call _CalculateAndUpdateFine, so we
need to update the variables in this subroutine.

Note that, prior to this patch, AddReturn returned the GetItemIssue
hashref in the $iteminformation. Most of the time this variable is not
used, I have found only 1 place where it's used: circ/returns.pl
TODO: In this script we should call ->is_overdue instead of the
DateTime->compare calls

Test plan:
All the circulation tests must pass (it's how I have caught the specific
cases).
Do some checkins/checkouts/renewal and focus on the due date

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

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

Jonathan Druart  changed:

   What|Removed |Added

  Attachment #58918|0   |1
is obsolete||
  Attachment #58919|0   |1
is obsolete||
  Attachment #58920|0   |1
is obsolete||

--- Comment #16 from Jonathan Druart  
---
Created attachment 61761
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61761=edit
Bug 17680: C4::Circulation - Remove GetItemIssue, simple calls

C4::Circulation::GetItemIssue returned all the issue and item
informations for a given issue. Moveover it also did some date
manipulations. Most of the time this subroutine was called, there
additional information were useless as the caller usually just needed
the basic issue's infos 'from the issue table).

This first patch updates the simple calls, ie. the ones that just need
the issue's infomations.

Test plan:
The following operations should success:
- transfer a book
- create a rule for on-site checkouts and confirm that a patron cannot
check more items out that it's defined in the rule.
- Renew an issue using ILSDI
- Using SIP confirm that you are able to see your issues

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-01-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

--- Comment #14 from Jonathan Druart  
---
Created attachment 58919
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58919=edit
Bug 17680: C4::Circulation - Remove GetItemIssue

This patch simply removes the C4::Circulation::GetItemIssue subroutine

Test plan:
At this point, `git grep GetItemIssue` should not return any occurrence
in the codebase

Signed-off-by: Alex Buckley 

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-01-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

--- Comment #15 from Jonathan Druart  
---
Created attachment 58920
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58920=edit
Bug 17680: C4::Circulation - Remove GetItemIssue, complex calls

There are a few calls to GetItemIssue where it's not as easy to make
sure everything will be fine just replacing the calls with a
Koha::Issues->find
- In AddReturn the overdue flag is used (that's why this patch depends
on bug 17689)
- In CanBookBeRenewed, as well as the overdue flag the dates converted
to DateTime were used. It's now our job to convert them when we need
them.
- Same in AddRenewal but we also call _CalculateAndUpdateFine, so we
need to update the variables in this subroutine.

Note that, prior to this patch, AddReturn returned the GetItemIssue
hashref in the $iteminformation. Most of the time this variable is not
used, I have found only 1 place where it's used: circ/returns.pl
TODO: In this script we should call ->is_overdue instead of the
DateTime->compare calls

Test plan:
All the circulation tests must pass (it's how I have caught the specific
cases).
Do some checkins/checkouts/renewal and focus on the due date

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-01-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

Jonathan Druart  changed:

   What|Removed |Added

 Status|Patch doesn't apply |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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-01-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

Jonathan Druart  changed:

   What|Removed |Added

  Attachment #58431|0   |1
is obsolete||
  Attachment #58433|0   |1
is obsolete||
  Attachment #58501|0   |1
is obsolete||

--- Comment #13 from Jonathan Druart  
---
Created attachment 58918
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58918=edit
Bug 17680: C4::Circulation - Remove GetItemIssue, simple calls

C4::Circulation::GetItemIssue returned all the issue and item
informations for a given issue. Moveover it also did some date
manipulations. Most of the time this subroutine was called, there
additional information were useless as the caller usually just needed
the basic issue's infos 'from the issue table).

This first patch updates the simple calls, ie. the ones that just need
the issue's infomations.

Test plan:
The following operations should success:
- transfer a book
- create a rule for on-site checkouts and confirm that a patron cannot
check more items out that it's defined in the rule.
- Renew an issue using ILSDI
- Using SIP confirm that you are able to see your issues

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-01-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

Josef Moravec  changed:

   What|Removed |Added

 Status|Needs Signoff   |Patch doesn't apply

--- Comment #12 from Josef Moravec  ---
could you rebase please?

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2017-01-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680
Bug 17680 depends on bug 17679, which changed state.

Bug 17679 Summary: C4::Circulation - Remove unused GetItemIssues
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17679

   What|Removed |Added

 Status|Pushed to Master|RESOLVED
 Resolution|--- |FIXED

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

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

Jonathan Druart  changed:

   What|Removed |Added

  Attachment #58432|0   |1
is obsolete||

--- Comment #11 from Jonathan Druart  
---
Created attachment 58501
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58501=edit
Bug 17680: C4::Circulation - Remove GetItemIssue, complex calls

There are a few calls to GetItemIssue where it's not as easy to make
sure everything will be fine just replacing the calls with a
Koha::Issues->find
- In AddReturn the overdue flag is used (that's why this patch depends
on bug 17689)
- In CanBookBeRenewed, as well as the overdue flag the dates converted
to DateTime were used. It's now our job to convert them when we need
them.
- Same in AddRenewal but we also call _CalculateAndUpdateFine, so we
need to update the variables in this subroutine.

Note that, prior to this patch, AddReturn returned the GetItemIssue
hashref in the $iteminformation. Most of the time this variable is not
used, I have found only 1 place where it's used: circ/returns.pl
TODO: In this script we should call ->is_overdue instead of the
DateTime->compare calls

Test plan:
All the circulation tests must pass (it's how I have caught the specific
cases).
Do some checkins/checkouts/renewal and focus on the due date

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

2016-12-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680
Bug 17680 depends on bug 17689, which changed state.

Bug 17689 Summary: Add the Koha::Issue->is_overdue method
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17689

   What|Removed |Added

 Status|Pushed to Master|RESOLVED
 Resolution|--- |FIXED

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

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

Jonathan Druart  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
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

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

--- Comment #10 from Jonathan Druart  
---
Created attachment 58433
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58433=edit
Bug 17680: C4::Circulation - Remove GetItemIssue

This patch simply removes the C4::Circulation::GetItemIssue subroutine

Test plan:
At this point, `git grep GetItemIssue` should not return any occurrence
in the codebase

Signed-off-by: Alex Buckley 

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

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

Jonathan Druart  changed:

   What|Removed |Added

  Attachment #57787|0   |1
is obsolete||
  Attachment #57788|0   |1
is obsolete||
  Attachment #57847|0   |1
is obsolete||

--- Comment #8 from Jonathan Druart  
---
Created attachment 58431
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58431=edit
Bug 17680: C4::Circulation - Remove GetItemIssue, simple calls

C4::Circulation::GetItemIssue returned all the issue and item
informations for a given issue. Moveover it also did some date
manipulations. Most of the time this subroutine was called, there
additional information were useless as the caller usually just needed
the basic issue's infos 'from the issue table).

This first patch updates the simple calls, ie. the ones that just need
the issue's infomations.

Test plan:
The following operations should success:
- transfer a book
- create a rule for on-site checkouts and confirm that a patron cannot
check more items out that it's defined in the rule.
- Renew an issue using ILSDI
- Using SIP confirm that you are able to see your issues

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

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

--- Comment #9 from Jonathan Druart  
---
Created attachment 58432
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58432=edit
Bug 17680: C4::Circulation - Remove GetItemIssue, complex calls

There are a few calls to GetItemIssue where it's not as easy to make
sure everything will be fine just replacing the calls with a
Koha::Issues->find
- In AddReturn the overdue flag is used (that's why this patch depends
on bug 17689)
- In CanBookBeRenewed, as well as the overdue flag the dates converted
to DateTime were used. It's now our job to convert them when we need
them.
- Same in AddRenewal but we also call _CalculateAndUpdateFine, so we
need to update the variables in this subroutine.

Note that, prior to this patch, AddReturn returned the GetItemIssue
hashref in the $iteminformation. Most of the time this variable is not
used, I have found only 1 place where it's used: circ/returns.pl
TODO: In this script we should call ->is_overdue instead of the
DateTime->compare calls

Test plan:
All the circulation tests must pass (it's how I have caught the specific
cases).
Do some checkins/checkouts/renewal and focus on the due date

-- 
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 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

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

Jonathan Druart  changed:

   What|Removed |Added

Summary|C4::Circulation - Replace   |C4::Circulation - Replace
   |GetItemIssue with   |GetItemIssue with
   |Koha::Issues|Koha::Checkouts

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