[Koha-bugs] [Bug 17135] Fine for the previous overdue may get overwritten by the next one

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

Jonathan Druart  changed:

   What|Removed |Added

 Blocks||18666


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18666
[Bug 18666] Update 16.06.00.028 failing because of missing
no_auto_renewal_after
-- 
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 17135] Fine for the previous overdue may get overwritten by the next one

2016-09-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17135

Frédéric Demians  changed:

   What|Removed |Added

 Status|Pushed to Master|Pushed to Stable

--- Comment #57 from Frédéric Demians  ---
Pushed in 16.05. Will be in 16.05.04.

-- 
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 17135] Fine for the previous overdue may get overwritten by the next one

2016-09-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17135

--- Comment #56 from Liz Rea  ---
Created attachment 55671
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55671&action=edit
[Follow up] Bug 17135 - Cleaner message for updatedatabase

To test:

Read the patch and check the message seems accurate and ok
Make sure the database updates when it is supposed to with this patch applied.

-- 
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 17135] Fine for the previous overdue may get overwritten by the next one

2016-09-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17135

--- Comment #55 from Katrin Fischer  ---
Currently it reads:
+print "WARNING: There is a possibility (= just a possibility, it's
configuration dependent etc.) that - due to regression introduced by Bug 15675
- some old fine records for overdued items (items which got renewed 1+ time
while being overdue) may have been overwritten in your production 16.05+
database. See Bugzilla reports for Bug 14390 and Bug 17135 for more
details.\n";
+print "WARNING: Please note that this upgrade does not try to
recover such overwitten old fine records (if any) - it's just an follow-up for
Bug 14390, it's sole purpose is preventing eventuall further-on overwrites from
happening in the future. Optional recovery of the overwritten fines (again, if
any) is like, totally outside of the scope of this particular upgrade!\n";

-- 
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 17135] Fine for the previous overdue may get overwritten by the next one

2016-09-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17135

--- Comment #54 from Katrin Fischer  ---
I'd like to propose rewriting the database update message a bit before release
- it's not really easy to understand and would require reading through longish
bugs to be reassured about how much damage or not there may be.

-- 
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 17135] Fine for the previous overdue may get overwritten by the next one

2016-09-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17135

--- Comment #53 from Katrin Fischer  ---
Hm, I think it was my fault not running the web installer from koha-shell.
Running the script with the right path in the koha-shell works fine:
perl
/home/vagrant/kohaclone/installer/data/mysql/fix_unclosed_nonaccruing_fines_bug17135.pl
 
Sorry!

-- 
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 17135] Fine for the previous overdue may get overwritten by the next one

2016-09-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17135

--- Comment #52 from Jacek Ablewicz  ---
(In reply to Katrin Fischer from comment #51)
> I just ran the db update from command line and got:
> Can't open perl script
> "/home/katrin/kohaclone/installer/data/mysql/
> fix_unclosed_nonaccruing_fines_bug17135.pl": No such file or directory

Can't fully retest it at the moment in fresh/clean install, but if I trick this
database update to run again by decreasing DB version preference, it seems to
work fine for me, despite the change of the script location to
installer/data/mysql/.

Does this file
(/home/katrin/kohaclone/installer/data/mysql/fix_unclosed_nonaccruing_fines_bug17135.pl)
exists and what are its permissions?

What happens it you try to run it from CLI like this

   perl
/home/katrin/kohaclone/installer/data/mysql/fix_unclosed_nonaccruing_fines_bug17135.pl
--verbose

?

-- 
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 17135] Fine for the previous overdue may get overwritten by the next one

2016-09-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17135

--- Comment #51 from Katrin Fischer  ---
I just ran the db update from command line and got:
Can't open perl script
"/home/katrin/kohaclone/installer/data/mysql/fix_unclosed_nonaccruing_fines_bug17135.pl":
No such file or directory

-- 
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 17135] Fine for the previous overdue may get overwritten by the next one

2016-09-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17135

Kyle M Hall  changed:

   What|Removed |Added

 Status|Passed QA   |Pushed to Master

--- Comment #50 from Kyle M Hall  ---
Pushed to master for 16.11, thanks Jacek, Marcel!

-- 
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 17135] Fine for the previous overdue may get overwritten by the next one

2016-09-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17135

Marcel de Rooy  changed:

   What|Removed |Added

 Status|Signed Off  |Passed QA

--- Comment #49 from Marcel de Rooy  ---
Final QA comment:
With reference to earlier comments and replies:
Looks good to me. This correction is done very carefully.

Now also tested:
Tested FU non accruing, not due OK
Tested FU non accruing, due (with grace period) OK 

The warnings on the db rev are (imvho) little bit intimidating(?), especially
since they are even printed when no fines records were closed. But even then it
could still be true that some fines went wrong in the past. No blocker (at
all).

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 17135] Fine for the previous overdue may get overwritten by the next one

2016-09-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17135

Marcel de Rooy  changed:

   What|Removed |Added

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

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


[Koha-bugs] [Bug 17135] Fine for the previous overdue may get overwritten by the next one

2016-09-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17135

Marcel de Rooy  changed:

   What|Removed |Added

  Attachment #55413|0   |1
is obsolete||

--- Comment #47 from Marcel de Rooy  ---
Created attachment 55598
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55598&action=edit
Bug 17135: [QA Follow-up] Change location of new script to fix fines

The location of the script in misc/maintenance would be fine for
running it from the command line. But it will be a problem for several
install types when running it from the web installer.
Files from misc/maintenance go to bin/maintenance in a package install,
not to mention other installs than a dev install.

This patch moves the script to installer/data/mysql. Already there are two
other scripts run by upgradedatabase. I would rather move these three
scripts somewhere else, but we c/should do that on another report.

Fixed a small typo in a message too.

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 17135] Fine for the previous overdue may get overwritten by the next one

2016-09-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17135

Marcel de Rooy  changed:

   What|Removed |Added

  Attachment #55082|0   |1
is obsolete||

--- Comment #46 from Marcel de Rooy  ---
Created attachment 55597
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55597&action=edit
Bug 17135 - Maintenance script execution added as part of an atomic DB upgrade

(plus warnings for 16.05+ production setups possibly already affected)

Signed-off-by: Chris Cormack 

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 17135] Fine for the previous overdue may get overwritten by the next one

2016-09-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17135

Marcel de Rooy  changed:

   What|Removed |Added

  Attachment #55081|0   |1
is obsolete||

--- Comment #45 from Marcel de Rooy  ---
Created attachment 55596
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55596&action=edit
Bug 17135 - Some minor changes & fixes in the script

- all non-fatal output redirected to STDOUT (as there is an intention
to run this script from updatedatabase.pl)

- added borrowernumber and itemnumber equality checks to the SELECT
statement in getFinesForChecking() - accountlines.issue_id alone is not
entirely trustworthy (because InnoDB forgets it's highest auto_increment
after server restart), in some rare cases it may point to some random
issue for different patron and different item

Signed-off-by: Chris Cormack 

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 17135] Fine for the previous overdue may get overwritten by the next one

2016-09-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17135

Marcel de Rooy  changed:

   What|Removed |Added

  Attachment #55414|0   |1
is obsolete||

--- Comment #48 from Marcel de Rooy  ---
Created attachment 55599
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55599&action=edit
Bug 17135: [QA Follow-up] Changes as to reporting

We should at least report some grand totals when fixing fine records.
This patch also includes some cosmetic whitespace swapping.
Turned one last into an if statement.

Added a copyright statement too.

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 17135] Fine for the previous overdue may get overwritten by the next one

2016-09-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17135

Marcel de Rooy  changed:

   What|Removed |Added

  Attachment #55080|0   |1
is obsolete||

--- Comment #44 from Marcel de Rooy  ---
Created attachment 55595
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55595&action=edit
Bug 17135 - Fine for the previous overdue may get overwritten by the next one

External maintenace script for fixing unclosed (FU), non accruing fine
records which may still need FU -> F correction post-Bug 15675.

Signed-off-by: Chris Cormack 

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 17135] Fine for the previous overdue may get overwritten by the next one

2016-09-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17135

--- Comment #43 from Marcel de Rooy  ---
(In reply to Jacek Ablewicz from comment #42)
> (In reply to Marcel de Rooy from comment #35)
> 
> > running it from the command line. But it will be a problem for several
> > install types when running it from the web installer.
> 
> Running this script from web installer may be problematic in some setups
> BTW, due to possible timeouts (300 seconds in apache, AFAIRC ?). CalcFine()
> can be deadly slow sometimes, when it takes calendar/library closed dates
> into account (finesCalendar syspref set to 'noFinesWhenClosed').

I would not consider that as a problem for this script specifically. Some
upgrades will timeout in the web installer. If needed, we should solve that on
its own.

-- 
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 17135] Fine for the previous overdue may get overwritten by the next one

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

--- Comment #42 from Jacek Ablewicz  ---
(In reply to Marcel de Rooy from comment #35)

> running it from the command line. But it will be a problem for several
> install types when running it from the web installer.

Running this script from web installer may be problematic in some setups BTW,
due to possible timeouts (300 seconds in apache, AFAIRC ?). CalcFine() can be
deadly slow sometimes, when it takes calendar/library closed dates into account
(finesCalendar syspref set to 'noFinesWhenClosed').

-- 
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 17135] Fine for the previous overdue may get overwritten by the next one

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

--- Comment #41 from Jacek Ablewicz  ---
(In reply to Marcel de Rooy from comment #37)

> Constructions with blocks and last statements are not really nice imo. If
> possible, prevent them? Remembers some goto's :) Adjusted one.

Yeah, I don't expect this script to win any beauty pageants anytime soon ;), it
is a bit ugly. Those statements etc. are leftovers from the earlier
evolutionary stage of this script (when I was considering pasting this code
directly to the updatedatabase as one giant { } block with no helper
subroutines).

-- 
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 17135] Fine for the previous overdue may get overwritten by the next one

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

--- Comment #40 from Jacek Ablewicz  ---
(In reply to Marcel de Rooy from comment #37)

> You use sub BorType in Overdues. It should actually not be there anymore
> (imho) with the new series of Koha Objects.

> Why do you use DateTime directly here: my $today = DateTime->now( time_zone
> => C4::Context->tz() );

Mostly because half of this script is essentially dumbed-down code copied from
fines.pl (parts which are needed for calling CalcFine()), and tinkering with it
too much / trying to modernize it here could be kinda counterproductive IMO
(especially as it needs to be backported for 16.05 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 17135] Fine for the previous overdue may get overwritten by the next one

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

--- Comment #39 from Jacek Ablewicz  ---
(In reply to Marcel de Rooy from comment #37)

> You select all accountlines with FU with an corresponding issue record, but
> what about hypothetical records FU that have an issue_id that does not have
> a record in issues anymore? Or does have issue_id NULL ? Should we do
> something about those two groups?

To be honest, I haven't given too much thought to those 2 kinds of
hypothetically still unclosed FU records (because - if any - they are not
vulnerable to this particular overwriting issue in any case). But IMHO they are
most likely purely hypothetical anyway:

- Sql script in Bug 15675 closes all FU fines sans the most recent ones still
associated (by itemnumber & borrowernumber) with some existing issue records

- After that, the only way (?) to effectively unlink the fine record from the
issue record (effectively == from the UpdateFine() POV, with Bug 14390
included) would be the return/check in of an item. An item return / check-in
will (hopefully) always result in closing the fine (FU -> F) as well?

-- 
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 17135] Fine for the previous overdue may get overwritten by the next one

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

--- Comment #38 from Jacek Ablewicz  ---
(In reply to Marcel de Rooy from comment #35)

> The location of the script in misc/maintenance would be fine for
> running it from the command line. But it will be a problem for several
> install types when running it from the web installer.
> Files from misc/maintenance go to bin/maintenance in a package install,
> not to mention other installs than a dev install.

Ouch, I was completely unaware of that ("monkey see monkey do" kind of approach
is known to be prone to some unexpected disadvantages occasionally ;), thanks
for the follow-up.

> This patch moves the script to installer/data/mysql. Already there are two
> other scripts run by upgradedatabase. I would rather move these three
> scripts somewhere else, but we c/should do that on another report.

-- 
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 17135] Fine for the previous overdue may get overwritten by the next one

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

--- Comment #37 from Marcel de Rooy  ---
Sorry, cannot finish this today. So some preliminary remarks here apart from
the follow-ups: 

Tested regular overdue OK
Tested changing a description OK 
Since my testing was not yet complete, I am not convinced yet :)

Just thinking out loud:
You select all accountlines with FU with an corresponding issue record, but
what about hypothetical records FU that have an issue_id that does not have a
record in issues anymore? Or does have issue_id NULL ? Should we do something
about those two groups?
What if the update reports 10/20 closed successfully? What should I do now as
sysadmin with that result?

General
You use sub BorType in Overdues. It should actually not be there anymore (imho)
with the new series of Koha Objects.
Constructions with blocks and last statements are not really nice imo. If
possible, prevent them? Remembers some goto's :) Adjusted one.
Why do you use DateTime directly here: my $today = DateTime->now( time_zone =>
C4::Context->tz() );
accrune/ing should be accrue/accruing :)

@Chris: Could you confirm that the script actually executed in your test? Did
you check its results (xx records changed etc.) ?

-- 
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 17135] Fine for the previous overdue may get overwritten by the next one

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

--- Comment #35 from Marcel de Rooy  ---
Created attachment 55413
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55413&action=edit
Bug 17135: [QA Follow-up] Change location of new script to fix fines

The location of the script in misc/maintenance would be fine for
running it from the command line. But it will be a problem for several
install types when running it from the web installer.
Files from misc/maintenance go to bin/maintenance in a package install,
not to mention other installs than a dev install.

This patch moves the script to installer/data/mysql. Already there are two
other scripts run by upgradedatabase. I would rather move these three
scripts somewhere else, but we c/should do that on another report.

Fixed a small typo in a message too.

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 17135] Fine for the previous overdue may get overwritten by the next one

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

--- Comment #36 from Marcel de Rooy  ---
Created attachment 55414
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55414&action=edit
Bug 17135: [QA Follow-up] Changes as to reporting

We should at least report some grand totals when fixing fine records.
This patch also includes some cosmetic whitespace swapping.
Turned one last into an if statement.

-- 
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 17135] Fine for the previous overdue may get overwritten by the next one

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

--- Comment #34 from Marcel de Rooy  ---
QA: Looking here now

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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 17135] Fine for the previous overdue may get overwritten by the next one

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

Chris Cormack  changed:

   What|Removed |Added

  Attachment #55077|0   |1
is obsolete||

--- Comment #33 from Chris Cormack  ---
Created attachment 55082
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55082&action=edit
Bug 17135 - Maintenance script execution added as part of an atomic DB upgrade

(plus warnings for 16.05+ production setups possibly already affected)

Signed-off-by: Chris Cormack 

-- 
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 17135] Fine for the previous overdue may get overwritten by the next one

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

Chris Cormack  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 17135] Fine for the previous overdue may get overwritten by the next one

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

Chris Cormack  changed:

   What|Removed |Added

  Attachment #55075|0   |1
is obsolete||

--- Comment #32 from Chris Cormack  ---
Created attachment 55081
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55081&action=edit
Bug 17135 - Some minor changes & fixes in the script

- all non-fatal output redirected to STDOUT (as there is an intention
to run this script from updatedatabase.pl)

- added borrowernumber and itemnumber equality checks to the SELECT
statement in getFinesForChecking() - accountlines.issue_id alone is not
entirely trustworthy (because InnoDB forgets it's highest auto_increment
after server restart), in some rare cases it may point to some random
issue for different patron and different item

Signed-off-by: Chris Cormack 

-- 
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 17135] Fine for the previous overdue may get overwritten by the next one

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

Chris Cormack  changed:

   What|Removed |Added

  Attachment #54972|0   |1
is obsolete||

--- Comment #31 from Chris Cormack  ---
Created attachment 55080
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55080&action=edit
Bug 17135 - Fine for the previous overdue may get overwritten by the next one

External maintenace script for fixing unclosed (FU), non accruing fine
records which may still need FU -> F correction post-Bug 15675.

Signed-off-by: Chris Cormack 

-- 
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 17135] Fine for the previous overdue may get overwritten by the next one

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

--- Comment #30 from Jacek Ablewicz  ---
Created attachment 55077
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55077&action=edit
Bug 17135 - Maintenance script execution added as part of an atomic DB upgrade

(plus warnings for 16.05+ production setups possibly already affected)

-- 
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 17135] Fine for the previous overdue may get overwritten by the next one

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

--- Comment #29 from Jacek Ablewicz  ---
(In reply to Marcel de Rooy from comment #26)

> You could also think of running the script via updatedatabase?

Sounds like a good idea, and there are some precedences for that in
updatedatabase (3.01.00.053, 3.01.00.107). I'll give it a try.

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


[Koha-bugs] [Bug 17135] Fine for the previous overdue may get overwritten by the next one

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

Jacek Ablewicz  changed:

   What|Removed |Added

  Attachment #55074|0   |1
is obsolete||

--- Comment #28 from Jacek Ablewicz  ---
Created attachment 55075
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55075&action=edit
Bug 17135 - Some minor changes & fixes in the script

- all non-fatal output redirected to STDOUT (as there is an intention
to run this script from updatedatabase.pl)

- added borrowernumber and itemnumber equality checks to the SELECT
statement in getFinesForChecking() - accountlines.issue_id alone is not
entirely trustworthy (because InnoDB forgets it's highest auto_increment
after server restart), in some rare cases it may point to some random
issue for different patron and different 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 17135] Fine for the previous overdue may get overwritten by the next one

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

--- Comment #27 from Jacek Ablewicz  ---
Created attachment 55074
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55074&action=edit
Bug 17135 - Some minor changes & fixes in the script

- all non-fatal output redirected to STDOUT (as there is an intention
to run this script from updatedatabase.pl)
- added borrowernumber and itemnumber equality checks to the SELECT
statement in getFinesForChecking() - accountlines.issue_id alone is not
entirely trustworthy (because InnoDB forgets it's highest auto_increment
after server restart), in some rare cases it may point to some random
issue for different patron and different 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 17135] Fine for the previous overdue may get overwritten by the next one

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

--- Comment #26 from Marcel de Rooy  ---
(In reply to Jacek Ablewicz from comment #25)
> > Add a dbrev that at least prints a NOTE: <> that tells the
> > sysadmin to optionally run your script when upgrading.
> 
> Should this go to STDERR or to the STDOUT (warn, print - I see both in
> updatedatabase used for such purposes, print seems to be more popular
> lately)?

At least, we need a print statement in an atomicupdate to alert people.
You could also think of running the script via updatedatabase?

-- 
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 17135] Fine for the previous overdue may get overwritten by the next one

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

--- Comment #25 from Jacek Ablewicz  ---
(In reply to Marcel de Rooy from comment #21)
> Jacek, Just a quick glance:
> Why Warn ? We always just warn.

Just a copy & paste from some random local script (warn adds a line number
etc).

> Add a dbrev that at least prints a NOTE: <> that tells the
> sysadmin to optionally run your script when upgrading.

Should this go to STDERR or to the STDOUT (warn, print - I see both in
updatedatabase used for such purposes, print seems to be more popular lately)?

-- 
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 17135] Fine for the previous overdue may get overwritten by the next one

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

--- Comment #24 from Jacek Ablewicz  ---
(In reply to Katrin Fischer from comment #17)
> If we don't do 3) - would the fines still be calculated correctly?

You mean 3.b part (correcting the dates in description)? IMO after Bug 15675
this shouldn't affect further fines calculation (no matter if this date stays
as is or is optionally corrected). Post-Bug 15675, date in the description is
not used in UpdateFine() for anything important any more. It still gets
inserted to the description when new FU fine is created though, and because
it's not modified on the possible overwrite, it may by useful for two goals:

- pre-selecting the accountlines which may be non-accruing and still in a need
of closing,
- recovering the possibly overwritten fines (if any).

If someone is inclined to do so (I'm not - we are not using 16.05 in production
yet), automatic or semi-automatic recovery of the overwritten fines is quite
possible IMO, with some extra time and effort (a lot of it, probably). If
FinesLog is enabled: in ~100% of cases (?), if not - I guess this date can
still be used at least to recreate the most recent overwrite of the given fine. 

The trouble with the optional 3.b part / date corrections is: it may make such
theoretical recovery process more complicated or even (if the logs are absent)
no longer possible.

-- 
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 17135] Fine for the previous overdue may get overwritten by the next one

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

Marcel de Rooy  changed:

   What|Removed |Added

   Patch complexity|--- |Small patch

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


[Koha-bugs] [Bug 17135] Fine for the previous overdue may get overwritten by the next one

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

Marcel de Rooy  changed:

   What|Removed |Added

   Severity|blocker |major

--- Comment #23 from Marcel de Rooy  ---
Severity to major ?

-- 
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 17135] Fine for the previous overdue may get overwritten by the next one

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

Marcel de Rooy  changed:

   What|Removed |Added

   Assignee|koha-b...@lists.koha-commun |a...@biblos.pk.edu.pl
   |ity.org |

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


[Koha-bugs] [Bug 17135] Fine for the previous overdue may get overwritten by the next one

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

--- Comment #22 from Marcel de Rooy  ---
Change title of this report ?

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


[Koha-bugs] [Bug 17135] Fine for the previous overdue may get overwritten by the next one

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

--- Comment #21 from Marcel de Rooy  ---
Jacek, Just a quick glance:
Why Warn ? We always just warn.
Add a dbrev that at least prints a NOTE: <> that tells the
sysadmin to optionally run your script when upgrading.

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


[Koha-bugs] [Bug 17135] Fine for the previous overdue may get overwritten by the next one

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

--- Comment #20 from Jacek Ablewicz  ---
Created attachment 54972
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54972&action=edit
Bug 17135 - Fine for the previous overdue may get overwritten by the next one

External maintenace script for fixing unclosed (FU), non accruing fine
records which may still need FU -> F correction post-Bug 15675.

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


[Koha-bugs] [Bug 17135] Fine for the previous overdue may get overwritten by the next one

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

Jacek Ablewicz  changed:

   What|Removed |Added

 Status|NEW |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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 17135] Fine for the previous overdue may get overwritten by the next one

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

--- Comment #19 from Marcel de Rooy  ---
What about:

Go thru all FU records.
Look up issue record.

If no issue record or CalcFine==0, consider as old fine. Move FU to F.
If CalcFine < accountlines.amount, new fine: move FU to F too. 
Otherwise: consider fine to be correct. Will be updated next run.

There will be some data loss. Left or right..

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


[Koha-bugs] [Bug 17135] Fine for the previous overdue may get overwritten by the next one

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

--- Comment #18 from Marcel de Rooy  ---
(In reply to Jacek Ablewicz from comment #16)
> (In reply to Jacek Ablewicz from comment #15)
> > Would be a simple sql statement like 
> > 
> > issues.due_date > NOW()
> > 
> > good enough for selecting old FU fines which need to be closed (+ the
> 
> I guess not good enough after all: item may be due but the fine not accruing
> yet: if overdue is in the grace period, or eg. in the middle of the 1st
> charge period, (when charge period > 1 day). With just 'issues.due_date >
> NOW()' there is a possibility that some unclosed old FU fines may still get
> left behind.
> 
> I don't see any way to fix this without involving CalcFine() and a good part
> of Getoverdues(), but in that case it's starting to look more like some kind
> of external script instead of simple DB update. Or at least I don't see that
> kinds of things in updatedatabase.pl - what are the community guidelines in
> such case?

Look at e.g. fix_accountlines_rmdupfines_bug8253.pl in misc/maintenance..

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


[Koha-bugs] [Bug 17135] Fine for the previous overdue may get overwritten by the next one

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

--- Comment #17 from Katrin Fischer  ---
If we don't do 3) - would the fines still be calculated correctly? I got lost a
bit at some point :) But if that's the case, maybe 3) is not worth the trouble
of correcting the date as long as we can manage to close all fines not
accrueing.

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


[Koha-bugs] [Bug 17135] Fine for the previous overdue may get overwritten by the next one

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

--- Comment #16 from Jacek Ablewicz  ---
(In reply to Jacek Ablewicz from comment #15)
> Would be a simple sql statement like 
> 
> issues.due_date > NOW()
> 
> good enough for selecting old FU fines which need to be closed (+ the

I guess not good enough after all: item may be due but the fine not accruing
yet: if overdue is in the grace period, or eg. in the middle of the 1st charge
period, (when charge period > 1 day). With just 'issues.due_date > NOW()' there
is a possibility that some unclosed old FU fines may still get left behind.

I don't see any way to fix this without involving CalcFine() and a good part of
Getoverdues(), but in that case it's starting to look more like some kind of
external script instead of simple DB update. Or at least I don't see that kinds
of things in updatedatabase.pl - what are the community guidelines in such
case?

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


[Koha-bugs] [Bug 17135] Fine for the previous overdue may get overwritten by the next one

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

--- Comment #15 from Jacek Ablewicz  ---
(In reply to Jacek Ablewicz from comment #13)

This part

> 3.a) if the fine is not accruing / item is not currently due:

giving me a big headache. Would be a simple sql statement like 

issues.due_date > NOW()

good enough for selecting old FU fines which need to be closed (+ the unmatched
due date in fine description), or do we need some more elaborate way for
determining that? And we can't just close all old FU fines with unmatched
dates, not taking into account their current status (due / not due, accruing /
not accruing). Any opinions?

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


[Koha-bugs] [Bug 17135] Fine for the previous overdue may get overwritten by the next one

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

--- Comment #14 from Jacek Ablewicz  ---
This part

> 3.b) if the fine is accruing (item is due / CalcFine() returns a positive
> value): this is an old record which got overwritten: leave it as FU, but
> correct a due date in fine description.

is optional, not that much important - arguably it may be even better to leave
such records as is. If due date in description gets corrected, there wouldn't
be a way to tell that this fine got overwritten in the past. Usefulness of such
information (if it got overwritten or not) IMO is rather limited in most
practical circumstances, but still this may be considered as a data loss by
some users.

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


[Koha-bugs] [Bug 17135] Fine for the previous overdue may get overwritten by the next one

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

--- Comment #13 from Jacek Ablewicz  ---
Proposed solution for the issues still remaining (moved from Bug 14390):

1) select the FU fine records that may need correction: for that we may need to
compare a due date from issue record and the date on the end of the fine
description - if the dates are the same, this is a correct FU record, no need
to change anything in it

2) if the dates are different, there are two possibilities:

3.a) if the fine is not accruing / item is not currently due: it's an old fine
record (either left unclosed by Bug 15675 or maybe patron renewed this item
after Bug 15675 was applied in the production database; maybe it got
overwritten in the meantime or maybe not, there is no easy way to tell): it
needs to be closed (FU -> F)

3.b) if the fine is accruing (item is due / CalcFine() returns a positive
value): this is an old record which got overwritten: leave it as FU, but
correct a due date in fine description.

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


[Koha-bugs] [Bug 17135] Fine for the previous overdue may get overwritten by the next one

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

--- Comment #12 from Jacek Ablewicz  ---
Bug 14390 moved forward, now thanks to it if there is a clear distinction
between F and FU fines in a given production database, it will stay that way in
the future - for such databases problem is effectively solved.

But if F / FU distinction initially is not entirely clear - if there are some
non-accruing FU fines still left in the DB - Bug 14390 is only half the
solution, IMO such fine records may still get overwritten even with Bug 14390
applied.

This is not all that awfully clear - but after thinking for a while about it,
I'm pretty sure that some DB clean up (at least closing the non-accruing FU
fines left behind by Bug 15675) is still required for fixing an issue described
by this report. Consider the following scenario (starting in some pre-Bug 15675
setup, e.g. in 3.22.x)

1) Item gets overdued, 'FU' fine record gets created, fine starts accruing
2) Patron renews this item, fine record created in step 1) stops accruing
(because date due in fine description doesn't match with due date in issue
record any more), fine type is still 'FU'
3) Upgrade: ... Bug 15675 gets applied ... Bug 14390 gets applied
4) Fine record from 1) is still FU and it's now linked to the issue record by
issue_id
5) This item gets overdued again: instead of creating a new one, UpdateFine()
will pick the same old fine record for updating (it's FU and it's linked to the
existing issue), amount from the previous overdue gets overwritten.

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


[Koha-bugs] [Bug 17135] Fine for the previous overdue may get overwritten by the next one

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

--- Comment #11 from Marcel de Rooy  ---
(In reply to Jacek Ablewicz from comment #10)
> Side note: clean up of the 'F' / 'FU' fine types in existing accountlines
> records is already done (in Bug 15675), most likely there shouldn't be any
> real concerns remaining about that part any more.
> 
> Not sure if 'O' and 'M' (what is 'sundry' BTW, miscellaneous ?) may need
> some extra attention or not - probably a non-iussue, there are some
> references to those fine types remaining in the code base, but they are
> there from the dawn of time (pre 3.0 ?), and I don't see anything relevant
> in updatedatabase.

Sundry is small expenses (no issue id involved)
I think O is unused (by default at least)
If 14390 gets in, can we close this one?

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


[Koha-bugs] [Bug 17135] Fine for the previous overdue may get overwritten by the next one

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

Frédéric Demians  changed:

   What|Removed |Added

 CC||frede...@tamil.fr

-- 
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 17135] Fine for the previous overdue may get overwritten by the next one

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

--- Comment #10 from Jacek Ablewicz  ---
Side note: clean up of the 'F' / 'FU' fine types in existing accountlines
records is already done (in Bug 15675), most likely there shouldn't be any real
concerns remaining about that part any more.

Not sure if 'O' and 'M' (what is 'sundry' BTW, miscellaneous ?) may need some
extra attention or not - probably a non-iussue, there are some references to
those fine types remaining in the code base, but they are there from the dawn
of time (pre 3.0 ?), and I don't see anything relevant in updatedatabase.

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


[Koha-bugs] [Bug 17135] Fine for the previous overdue may get overwritten by the next one

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

--- Comment #9 from Jacek Ablewicz  ---
(In reply to Kyle M Hall from comment #8)

> The solution is pretty simple, we should never update closed out fines (
> account type 'F' ). My latest followup on bug 14390 implements this.

Looks like that should solve the problem sufficiently (followup in Bug 14390
needs only a small correction so MaxFine behaviour remains unchanged). Also an
idea from comment #7 turns out to be not that good after all, it would just add
an unnecessary redundancy.

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


[Koha-bugs] [Bug 17135] Fine for the previous overdue may get overwritten by the next one

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

--- Comment #8 from Kyle M Hall  ---
We should never remove the issue_id from an accountline. It's not a foreign key
because of the way we move issues to the old_issues table. It is necessary in
order to know which checkout a fine is related to.

The solution is pretty simple, we should never update closed out fines (
account type 'F' ). My latest followup on bug 14390 implements this.

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


[Koha-bugs] [Bug 17135] Fine for the previous overdue may get overwritten by the next one

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

Kyle M Hall  changed:

   What|Removed |Added

 Depends on|15675   |14390
 CC||k...@bywatersolutions.com


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14390
[Bug 14390] Fine not updated from 'FU' to 'F' on renewal
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15675
[Bug 15675] Add issue_id column to accountlines and use it for updating fines
-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 17135] Fine for the previous overdue may get overwritten by the next one

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

Kyle M Hall  changed:

   What|Removed |Added

 Depends on||15675


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15675
[Bug 15675] Add issue_id column to accountlines and use it for updating fines
-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 17135] Fine for the previous overdue may get overwritten by the next one

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

Barton Chittenden  changed:

   What|Removed |Added

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

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


[Koha-bugs] [Bug 17135] Fine for the previous overdue may get overwritten by the next one

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

Josef Moravec  changed:

   What|Removed |Added

 CC||josef.mora...@gmail.com

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


[Koha-bugs] [Bug 17135] Fine for the previous overdue may get overwritten by the next one

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

--- Comment #7 from Jacek Ablewicz  ---
Yet another way to fix this would be an extra column in issues table to keep an
accountlines_id of the currently accruing overdue fine for this issue (to be
set NULL on renewal). Good for performance, and probably for other things too
in the future..

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


[Koha-bugs] [Bug 17135] Fine for the previous overdue may get overwritten by the next one

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

--- Comment #6 from Jacek Ablewicz  ---
(In reply to Katrin Fischer from comment #5)
> issue_id ... Hm, I think you could probably use it for statistics... finding
> out about... not sure. Might be I just like things linked :)

Hm, issue_id is not a foreign key, it stays in fine record after check-in. I
agree that it may be useful after all - for statistics, or e.g. for displaying
more accurate info regarding what the given fine was for, in staff and OPAC.

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


[Koha-bugs] [Bug 17135] Fine for the previous overdue may get overwritten by the next one

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

--- Comment #5 from Katrin Fischer  ---
issue_id ... Hm, I think you could probably use it for statistics... finding
out about... not sure. Might be I just like things linked :)

I seem to remember that we talked about a clean-up script on some other bug
report that I can't locate right now. I'd love if we could clean this up once
and for all.

I think if we have F and FU and issue_id or no issue_id (what's with old issues
before the patch?) then we will have multiple ways to say the same thing
(accruing or not) and that could get quite confusing.

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


[Koha-bugs] [Bug 17135] Fine for the previous overdue may get overwritten by the next one

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

--- Comment #4 from Jacek Ablewicz  ---
(In reply to Katrin Fischer from comment #3)
> I think the cleanest way without losing information (issue_id) would be your
> third option:
> 
> > - set fine type to 'F' on renewal, and ignore records of such type in the 
> > matching code in UpdateFine()

That would work OK for the newly created fine records, but the ones existing in
the database may need some cleaning up. This F/FU/O/.. is a long standing
problem, and I'm a bit worried what kind of fine 'types' people may have in
their databases (probably all kinds imaginable); not sure if this approach
alone would be safe enough.

Removing issue_id on renewal would be a simplest way, question is if it's even
all that useful for closed fines? I wonder what happens with this field on
returns (when issue record is moved to old_issues).

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


[Koha-bugs] [Bug 17135] Fine for the previous overdue may get overwritten by the next one

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

Katrin Fischer  changed:

   What|Removed |Added

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

--- Comment #3 from Katrin Fischer  ---
I think the cleanest way without losing information (issue_id) would be your
third option:

> - set fine type to 'F' on renewal, and ignore records of such type in the 
> matching code in UpdateFine()

As Marcel points out, Kyle had a go on fixing this on bug 14390, but it needs
more work now.

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


[Koha-bugs] [Bug 17135] Fine for the previous overdue may get overwritten by the next one

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

--- Comment #2 from Marcel de Rooy  ---
A fix on bug 14390 might address this too.

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


[Koha-bugs] [Bug 17135] Fine for the previous overdue may get overwritten by the next one

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

Marcel de Rooy  changed:

   What|Removed |Added

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

-- 
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 17135] Fine for the previous overdue may get overwritten by the next one

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

Jacek Ablewicz  changed:

   What|Removed |Added

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

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


[Koha-bugs] [Bug 17135] Fine for the previous overdue may get overwritten by the next one

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

--- Comment #1 from Jacek Ablewicz  ---
Dunno how to resolve this problem properly

- reintroduce due date to the issue record <-> fine record matching in
UpdateFine()
- unlink fine record from the issue record on renewal (set issue_id to NULL in
fine record)
- set fine type to 'F' on renewal, and ignore records of such type in the
matching code in UpdateFine()

or maybe some combination of the above? I think this problem can happen only
when there is at least 1 renewal of due item involved (any kind of renewal),
but I'm not entirely sure. All that legacy fine calculation code works in truly
mysterious ways.

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


[Koha-bugs] [Bug 17135] Fine for the previous overdue may get overwritten by the next one

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

Jacek Ablewicz  changed:

   What|Removed |Added

 Depends on||15675


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15675
[Bug 15675] Add issue_id column to accountlines and use it for updating fines
-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/