[Bug 20660] New: AddReturn should use return date override for debarments

classic Classic list List threaded Threaded
25 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 20660] New: AddReturn should use return date override for debarments

bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20660

            Bug ID: 20660
           Summary: AddReturn should use return date override for
                    debarments
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: ASSIGNED
          Severity: minor
          Priority: P5 - low
         Component: Circulation
          Assignee: [hidden email]
          Reporter: [hidden email]
        QA Contact: [hidden email]
                CC: [hidden email], [hidden email]

C4::Circulation::AddReturn does not use the return_date override when
calculating new debarments. This causes issues when trying to test functions
with return dates in the future.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20660] AddReturn should use return date override for debarments

bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20660

David Bourgault <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Patch complexity|---                         |Trivial patch
             Status|ASSIGNED                    |Needs Signoff

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20660] AddReturn should use return date override for debarments

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20660

--- Comment #1 from David Bourgault <[hidden email]> ---
Created attachment 74857
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=74857&action=edit
Bug 20660: AddReturn uses return_date override for new debarments

This patches is a minor tweak (single line) to C4::Circulation to use the
return_date value as $today when calculating new debarments in AddReturn.

I've also added a test in t/db_dependent/Circulation.t

TEST PLAN

1) comment out line 1988 in Circulation.pm ("$today = $return_date if
$return_date")
2) prove t/db_dependent/Circulation.t (Fail)
3) uncomment the line
4) prove t/db_dependent/Circulation.t (Pass)

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20660] AddReturn should use return date override for debarments

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20660

David Bourgault <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |17015


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17015
[Bug 17015] New Koha Calendar
--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20660] AddReturn should use return date override for debarments

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20660

M. Tompsett <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]
             Status|Needs Signoff               |In Discussion

--- Comment #2 from M. Tompsett <[hidden email]> ---
(In reply to David Bourgault from comment #1)

> Created attachment 74857 [details] [review]
> Bug 20660: AddReturn uses return_date override for new debarments
>
> This patches is a minor tweak (single line) to C4::Circulation to use the
> return_date value as $today when calculating new debarments in AddReturn.
>
> I've also added a test in t/db_dependent/Circulation.t
>
> TEST PLAN
>
> 1) comment out line 1988 in Circulation.pm ("$today = $return_date if
> $return_date")
> 2) prove t/db_dependent/Circulation.t (Fail)
> 3) uncomment the line
> 4) prove t/db_dependent/Circulation.t (Pass)

It is better to split the test from the change, so that when you want to prove
the problem you just apply the test. Then if you wish to prove the solution
also apply the second patch, and have the tests pass.

Should dropbox override the return date logic being added?

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20660] AddReturn should use return date override for debarments

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20660

David Bourgault <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|In Discussion               |Needs Signoff

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20660] AddReturn should use return date override for debarments

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20660

David Bourgault <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #74857|0                           |1
        is obsolete|                            |

--- Comment #3 from David Bourgault <[hidden email]> ---
Created attachment 74955
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=74955&action=edit
Bug 20660: Test AddReturn with $return_date override

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20660] AddReturn should use return date override for debarments

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20660

--- Comment #4 from David Bourgault <[hidden email]> ---
Created attachment 74956
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=74956&action=edit
Bug 20660: Return date override affects debarments in AddReturn

Re-did the patch to follow best practices.

TEST PLAN:
0. Apply first patch only
1. prove t/db_dependent/Circulation.t
2. Apply second patch
3. prove t/db_dependent/Circulation.t

prove should fail the first time and pass the second time.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20660] AddReturn should use return date override for debarments

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20660

--- Comment #5 from David Bourgault <[hidden email]> ---
(In reply to M. Tompsett from comment #2)
> Should dropbox override the return date logic being added?

It was already present in the code:

$today = $return_date if $return_date;
$today = $dropboxdate if $dropbox;

first line is my addition, second line is from existing code. So if $dropbox is
set, it will override any return_date overrides.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20660] AddReturn should use return date override for debarments

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20660

Josef Moravec <[hidden email]> 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
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20660] AddReturn should use return date override for debarments

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20660

Josef Moravec <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #74955|0                           |1
        is obsolete|                            |
  Attachment #74956|0                           |1
        is obsolete|                            |

--- Comment #6 from Josef Moravec <[hidden email]> ---
Created attachment 77426
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77426&action=edit
Bug 20660: Test AddReturn with $return_date override

Signed-off-by: Josef Moravec <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20660] AddReturn should use return date override for debarments

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20660

--- Comment #7 from Josef Moravec <[hidden email]> ---
Created attachment 77427
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77427&action=edit
Bug 20660: Return date override affects debarments in AddReturn

Re-did the patch to follow best practices.

TEST PLAN:
0. Apply first patch only
1. prove t/db_dependent/Circulation.t
2. Apply second patch
3. prove t/db_dependent/Circulation.t

prove should fail the first time and pass the second time.

Signed-off-by: Josef Moravec <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20660] AddReturn should use return date override for debarments

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20660

Katrin Fischer <[hidden email]> 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
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20660] AddReturn should use return date override for debarments

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20660

Katrin Fischer <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #77426|0                           |1
        is obsolete|                            |
  Attachment #77427|0                           |1
        is obsolete|                            |

--- Comment #8 from Katrin Fischer <[hidden email]> ---
Created attachment 77448
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77448&action=edit
Bug 20660: Test AddReturn with $return_date override

Signed-off-by: Josef Moravec <[hidden email]>

Signed-off-by: Katrin Fischer <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20660] AddReturn should use return date override for debarments

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20660

--- Comment #9 from Katrin Fischer <[hidden email]> ---
Created attachment 77449
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77449&action=edit
Bug 20660: Return date override affects debarments in AddReturn

Re-did the patch to follow best practices.

TEST PLAN:
0. Apply first patch only
1. prove t/db_dependent/Circulation.t
2. Apply second patch
3. prove t/db_dependent/Circulation.t

prove should fail the first time and pass the second time.

Signed-off-by: Josef Moravec <[hidden email]>

Signed-off-by: Katrin Fischer <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20660] AddReturn should use return date override for debarments

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20660

Nick Clemens <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Passed QA                   |Pushed to Master
                 CC|                            |[hidden email]

--- Comment #10 from Nick Clemens <[hidden email]> ---
Awesome work all!

Pushed to master for 18.11

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20660] AddReturn should use return date override for debarments

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20660

Nick Clemens <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |21188


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21188
[Bug 21188] t/db_dependent/Circulation/issue.t is failing
--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20660] AddReturn should use return date override for debarments

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20660

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]-c
                   |                            |ommunity.org

--- Comment #11 from Jonathan Druart <[hidden email]> ---
It broke a test:

t/db_dependent/Circulation/issue.t .. 1/32 Argument "2014-04-01 23:42" isn't
numeric in numeric eq (==) at /usr/lib/x86_64-linux-gnu/perl5/5.20/DateTime.pm
line 1863.
A DateTime object can only be compared to another DateTime object
(DateTime=HASH(0x8b9dd28), 2014-04-01 23:42). at
/home/vagrant/kohaclone/C4/Overdues.pm line 290.
# Looks like your test exited with 255 just after 26.

https://jenkins.koha-community.org/job/Koha_Master_D9/lastCompletedBuild/testReport/

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20660] AddReturn should use return date override for debarments

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20660

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |additional_work_needed

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20660] AddReturn should use return date override for debarments

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20660

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|additional_work_needed      |

--- Comment #12 from Jonathan Druart <[hidden email]> ---
See bug 21188.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20660] AddReturn should use return date override for debarments

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20660

--- Comment #13 from Jonathan Druart <[hidden email]> ---
The description of this bug report and what the patch does are a bit different.
There is a change in the behavior that should have been adverted in the commit
message, and tested on the UI.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20660] AddReturn should use return date override for debarments

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20660

Martin Renvoize <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |martin.renvoize@ptfs-europe
                   |                            |.com
             Status|Pushed to Master            |Pushed to Stable

--- Comment #14 from Martin Renvoize <[hidden email]> ---
Pushed to 18.05.x for 18.05.03

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20660] AddReturn should use return date override for debarments

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20660

--- Comment #15 from Martin Renvoize <[hidden email]> ---
Can we have a short summary of the behavioural change and ui effects for the
release notes, please.. I'm happy it's a bugfix, but would like the release
notes to be clear there's a change.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20660] AddReturn should use return date override for debarments

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20660

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |release-notes-needed

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/
Reply | Threaded
Open this post in threaded view
|

[Bug 20660] AddReturn should use return date override for debarments

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20660

Fridolin SOMERS <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]
                   |                            |m

--- Comment #16 from Fridolin SOMERS <[hidden email]> ---
I prefer not to push to 17.11.x because of th change in the behavior

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
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/