Bug 12178 - Serial claims: exporting late issues with the CSV profile doesn't set the issue claimed
Summary: Serial claims: exporting late issues with the CSV profile doesn't set the iss...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Serials (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 16808
  Show dependency treegraph
 
Reported: 2014-05-04 10:02 UTC by Katrin Fischer
Modified: 2017-12-07 22:17 UTC (History)
11 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 12178: Update serial status to "claimed" when exporting to CSV (6.58 KB, patch)
2015-04-28 15:06 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12178: Update serial status to "claimed" when exporting to CSV (6.80 KB, patch)
2015-12-26 11:28 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12178: Update serial status to "claimed" when exporting to CSV (6.81 KB, patch)
2016-03-24 21:24 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12178: Tests for changes to claimed serial status (4.13 KB, patch)
2016-05-24 02:13 UTC, Florent Mara
Details | Diff | Splinter Review
Bug 12178: Update serial status to "claimed" when exporting to CSV (6.81 KB, patch)
2016-06-21 11:33 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12178: Tests for changes to claimed serial status (4.19 KB, patch)
2016-06-21 11:34 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12178: Fix tests not to depend on dateformat syspref (3.51 KB, patch)
2016-06-21 11:34 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12178: Update serial status to "claimed" when exporting to CSV (6.87 KB, patch)
2016-06-24 14:17 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 12178: Tests for changes to claimed serial status (4.24 KB, patch)
2016-06-24 14:17 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 12178: Fix tests not to depend on dateformat syspref (3.57 KB, patch)
2016-06-24 14:17 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2014-05-04 10:02:36 UTC
When using the CSV export option for late serial issues, the claim date is set, but the claimed status for the issue  isn't. The issue remains as late.
Comment 1 Jonathan Druart 2014-05-21 14:28:21 UTC
Please test bug 5342.
I can provide a fix for serial claims, but on top of bug 5342.
Comment 2 Jonathan Druart 2015-04-28 15:06:41 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2015-04-28 15:09:32 UTC
A promise is a promise 
Comment 4 Chris Cormack 2015-12-23 19:42:51 UTC
I tried to fix the conflict, but I wasn't sure of the changes in C4::Serials

I will try to sign off again if you fix the conflicts.
Comment 5 Jonathan Druart 2015-12-26 11:28:56 UTC Comment hidden (obsolete)
Comment 6 Laurence Rault 2016-03-24 11:32:57 UTC
Tested on sandbox test14

No changes on claim status, claim date nor claim count after exporting csv.

In koha error logs : lateissues-export.pl: DBD::mysql::db do failed: Unknown column 'CLAIMED' in 'field list'
Comment 7 Jonathan Druart 2016-03-24 21:24:47 UTC Comment hidden (obsolete)
Comment 8 Florent Mara 2016-05-24 02:13:15 UTC Comment hidden (obsolete)
Comment 9 Florent Mara 2016-05-24 03:37:26 UTC
Added and attached tests for the method C4::Serial->updateClaim(). 

Serials/claims.pl now updates the serial status and claim count similarly when exporting to csv or sending a notification - as described in the test plan.
Comment 10 Katrin Fischer 2016-06-19 15:15:50 UTC
The second patch includes patches that depend on the setting of the dateformat system preference - it has to be set to dd/mm/yyyy to work. It would be better to fix this.
Comment 11 Katrin Fischer 2016-06-19 15:23:58 UTC
See last comment (fix required)

But also a question: Would it be possible to reload the page? I accidentally ended up with 2 claims, where I was not sure it had worked before. I think this could be a trap a lot of libraries fall into.
Comment 12 Jonathan Druart 2016-06-21 11:33:56 UTC Comment hidden (obsolete)
Comment 13 Jonathan Druart 2016-06-21 11:34:00 UTC Comment hidden (obsolete)
Comment 14 Jonathan Druart 2016-06-21 11:34:04 UTC Comment hidden (obsolete)
Comment 15 Jonathan Druart 2016-06-21 11:35:42 UTC
(In reply to Katrin Fischer from comment #11)
> But also a question: Would it be possible to reload the page? I accidentally
> ended up with 2 claims, where I was not sure it had worked before. I think
> this could be a trap a lot of libraries fall into.

It should be possible yes.
Comment 16 Kyle M Hall 2016-06-24 14:17:43 UTC
Created attachment 52801 [details] [review]
Bug 12178: Update serial status to "claimed" when exporting to CSV

On the same way as late issues, the serial status should be updated to
'claimed' when the issues as exported as csv.

QA note: The updateClaim and UpdateClaimdateIssues subroutine did almost the
same thing, I kick the second on off to centralize the code.

Test plan:
1/ Export some late issues as CSV (serials/claims.pl).
2/ Refresh the page (the export does not do it) and confirm that the
status, the claim date and the claim count have been updated.
3/ Select some others issues, select a notice and send the notification.
Confirm that the behavior is the same.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 17 Kyle M Hall 2016-06-24 14:17:51 UTC
Created attachment 52802 [details] [review]
Bug 12178: Tests for changes to claimed serial status

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amended patch: Remove trailing spaces

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 18 Kyle M Hall 2016-06-24 14:17:54 UTC
Created attachment 52803 [details] [review]
Bug 12178: Fix tests not to depend on dateformat syspref

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 19 Katrin Fischer 2016-06-24 14:22:28 UTC
(In reply to Jonathan Druart from comment #15)
> (In reply to Katrin Fischer from comment #11)
> > But also a question: Would it be possible to reload the page? I accidentally
> > ended up with 2 claims, where I was not sure it had worked before. I think
> > this could be a trap a lot of libraries fall into.
> 
> It should be possible yes.

Is it done?
Comment 20 Kyle M Hall 2016-06-24 15:08:46 UTC
I think this can go back to passed qa
Comment 21 Kyle M Hall 2016-07-15 14:08:12 UTC
Pushed to master for 16.11, thanks Jonathan!
Comment 22 Frédéric Demians 2016-08-01 13:37:35 UTC
Pushed in 16.05. Will be in 16.05.02.
Comment 23 Julian Maurice 2016-08-17 09:53:31 UTC
Patches pushed to 3.22.x, will be in 3.22.10