Bug 11843

Summary: Manual subscription history doesn't seem to work as expected
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: SerialsAssignee: Julian Maurice <julian.maurice>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: blocker    
Priority: P5 - low CC: colin.campbell, gmcharlt, julian.maurice, paola.rossi
Version: master   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12369
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 7688    
Bug Blocks:    
Attachments: Bug 11843: Reset the old code for updating manual subscription history
Bug 11843: Reset the old code for updating manual subscription history
Bug 11843: Fix unit test in t/db_dependent/Serials.t
Bug 11843: prevent manual history from being overwritten if subscription switched to automatic history
Bug 11843: prevent manual history from being overwritten if subscription switched to automatic history
Bug 11843: (follow-up) fix unit test in t/db_dependent/Serials.t
[PASSED QA] Bug 11843: prevent manual history from being overwritten if subscription switched to automatic history
[PASSED QA] Bug 11843: (follow-up) fix unit test in t/db_dependent/Serials.t

Description Katrin Fischer 2014-02-26 06:53:36 UTC
I noticed some things when testing another patch:

- When the manual history check box is set in the subscription, the summary tab is no longer updated manually.
- When you deactivate the manual history, the summary is partially recreated when you receive the next issue or mark the next issue missing. Your additions are lost.

But the manual history edit page states:

Hint : you can update the serial history manually. This can be useful for an old subscription or to clean the existing history. Modify those fields with care, as future serial recieve will continue to update them automatically.

I think it used to be, that the history was only amended for new issues, not recreated. So it kept your notes. Setting priority a bit higher on this one, as this can cause unwanted loss of information on your serials history.
Comment 1 Katrin Fischer 2014-02-26 07:07:12 UTC
I checked the manual, trying to find more about how this should be working, but we only have a short note there:

Checking the 'Manual history' box will allow you to enter serials outside the prediction pattern.
http://manual.koha-community.org/3.14/en/newsubscription.html
Comment 2 Katrin Fischer 2014-03-26 22:29:37 UTC
Thinking more about this, I think it's a blocker for the possibility of losing data by an unexpected change of behaviour.
Comment 3 Julian Maurice 2014-04-28 09:53:46 UTC Comment hidden (obsolete)
Comment 4 Julian Maurice 2014-04-28 09:54:39 UTC
I reset the old code so this should work exactly like before bug 7688
Comment 5 Julian Maurice 2014-04-28 10:22:20 UTC Comment hidden (obsolete)
Comment 6 Julian Maurice 2014-04-28 10:27:18 UTC
added test plan
Comment 7 Galen Charlton 2014-05-06 19:12:51 UTC
The patch causes a test failure in t/db_dependent/Serials.t:

not ok 44 - subscription missinglist is updated after ModSerialStatus

#   Failed test 'subscription missinglist is updated after ModSerialStatus'
#   at t/db_dependent/Serials.t line 242.
#          got: 'No.7; No.8; No.9; No.10; No.11; No.12; not issued No.13'
#     expected: 'not issued No.13; No.12; No.11; No.10; No.9; No.8; No.7'
# Looks like you failed 1 test of 44.
Comment 8 Julian Maurice 2014-05-07 08:41:36 UTC Comment hidden (obsolete)
Comment 9 Galen Charlton 2014-05-07 21:56:28 UTC Comment hidden (obsolete)
Comment 10 Galen Charlton 2014-05-07 21:57:06 UTC Comment hidden (obsolete)
Comment 11 Galen Charlton 2014-05-07 21:57:11 UTC Comment hidden (obsolete)
Comment 12 Paola Rossi 2014-05-08 13:00:02 UTC
I also test the patch [against master 3.15.00.051].
I agree about signing off the patch.

NB 1) At 3/, on receiving issues [by subscription-detail.pl], I see "Save" and "Multi receiving" buttons, but the first one only is selectable.
On the contrary, using serials-collection.pl, f.i. at "manage" tab, I see three buttons: "Edit serials", "Generate next" and "Multi receiving", and all the three buttons are selectable.
-------------------------------------
NB 2) At 3/, my expectation about the "Issues" tab of a subscription [on subscription-detail.pl] is the complete list of its issues.

At 3/, on receiving I set the n-th issue at "Late" status. 
Then I receive the (n+1)-th issue, and I set it at "Missing" status.
Soon after I multi-receive 2 issues. 
Then I look at the "Issues" tab of the subscription [on subscription-detail.pl]: the 2 "Arrived" issues I've just multi-received are not listed here!
Neither the "Missing" (n+1)-th issue is listed here!
[On the contrary, in the "Issues" tab the "Expected" (n+4)-th issue is correctly listed, and the "Late" n-th is correctly listed too.]
-------------------------------------
NB 3) At 6/, I change the issue's status, as the test plan requires.
The "Not available" status [on serials-edit.pl] is named "Not issued" in "manage" tab [on serials-collection.pl] and in "Missing issues:" of Summary [on subscription-detail.pl].
-------------------------------------
NB 4) At 6/: From "Edit serial" tab, on changing the issue status [on serials-edit.pl], the user is allowed to change the "Numbered" field of the issue too. If the user changes this field, the text already added in the "Summary" for that issue [at the two "Receiving issues:" and "Missing issues:" paragraphs] is aligned no more to a further updated status of that issue.
--------------------------------------------------------------------------
Comment 13 Kyle M Hall 2014-05-09 11:34:01 UTC
Created attachment 28127 [details] [review]
[PASSED QA] Bug 11843: prevent manual history from being overwritten if subscription switched to automatic history

Test plan:
1/ Create a new subscription, with manual history enabled
2/ Edit history by clicking on "Edit history" under Planning tab (add
   some text)
3/ Receive some serials, see that received and missing issues are not
   updated in Summary tab
4/ Edit subscription and disable manual history
5/ Receive some serials, see that received and missing issues are
   updated, but your notes have been kept.
6/ Edit serials and change status from/to missing or not available.
   Check that missing issues are updated correctly.
7/ Edit serials and change status from/to arrived. Check that received
   issues are updated correctly.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 14 Kyle M Hall 2014-05-09 11:34:17 UTC
Created attachment 28128 [details] [review]
[PASSED QA] Bug 11843: (follow-up) fix unit test in t/db_dependent/Serials.t

Signed-off-by: Galen Charlton <gmc@esilibrary.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 15 Galen Charlton 2014-05-09 14:49:36 UTC
Pushed to master.  Thanks, Julian!