Bug 5354 - Partial duplication of a subscription
Summary: Partial duplication of a subscription
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Serials (show other bugs)
Version: 3.8
Hardware: All All
: P5 - low enhancement (vote)
Deadline: 2011-05-01
Assignee: Jonathan Druart
QA Contact: Marcel de Rooy
URL: http://wiki.koha-community.org/wiki/P...
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-02 03:43 UTC by Paul Poulain
Modified: 2013-12-05 20:04 UTC (History)
4 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 5354: Partial duplication of a subscription (4.13 KB, patch)
2012-03-08 10:04 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 5354: Partial duplication of a subscription (4.10 KB, patch)
2012-03-19 09:23 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 5354 Partial duplication of a subscription (4.94 KB, patch)
2012-03-20 15:16 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 5354 Partial duplication of a subscription (4.91 KB, patch)
2012-03-21 09:39 UTC, Jonathan Druart
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 5354 Partial duplication of a subscription (5.01 KB, patch)
2012-03-22 05:40 UTC, Kristina Hoeppner
Details | Diff | Splinter Review
Bug 5354 Followup Change separator (3.92 KB, patch)
2012-03-26 07:09 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 5354 Followup Change separator (3.79 KB, patch)
2012-03-26 15:03 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Poulain 2010-11-02 03:43:06 UTC
A syspref will be added that contains the list of fields to duplicate when duplicating a subscription. The library will be able to define that, for example, the internal note should not be duplicated
Comment 1 Jonathan Druart 2012-03-08 10:04:38 UTC Comment hidden (obsolete)
Comment 2 Kristina Hoeppner 2012-03-19 07:41:27 UTC
I tested this patch on the BibLibre sandbox http://pro.test8.biblibre.com/cgi-bin/koha/sandbox.pl

and received the following conflict message:

<h1>Something went wrong !</h1>Applying: Bug 5354: Partial duplication of a subscription<br/>
Using index info to reconstruct a base tree...<br/>
Falling back to patching base and 3-way merge...<br/>
Auto-merging installer/data/mysql/updatedatabase.pl<br/>
CONFLICT (content): Merge conflict in installer/data/mysql/updatedatabase.pl<br/>
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/serials.pref<br/>
Failed to merge in the changes.<br/>
Patch failed at 0001 Bug 5354: Partial duplication of a subscription<br/>
When you have resolved this problem run git am --resolved.<br/>
If you would prefer to skip this patch, instead run git am --skip.<br/>
To restore the original branch and stop patching run git am --abort.<br/>
Bug 5354 - Partial duplication of a subscription<br/>
Comment 3 Jonathan Druart 2012-03-19 09:23:36 UTC Comment hidden (obsolete)
Comment 4 Laurence Rault 2012-03-19 15:16:17 UTC
tested on biblibre sandbox

OK for fields : 
branchcode
notes
location
callnumber
internalnotes
periodicity
numberpattern
numberingmethod

Failed for firstacquidate;startdate;numberlength
Except if it is the expected comportment.
Comment 5 Jonathan Druart 2012-03-19 16:14:55 UTC
It's based on the 'id' in the html code.

firstacquidate is acqui_date
startdate is beginning_date
and numberlength is subtype

Perhaps I can change this id node but I don't known if to change this id does not break something
Comment 6 Laurence Rault 2012-03-20 13:32:13 UTC
not ok for subtype
Comment 7 Jonathan Druart 2012-03-20 15:16:20 UTC Comment hidden (obsolete)
Comment 8 Kristina Hoeppner 2012-03-21 09:33:38 UTC
Sorry, Jonathan. I had a merge conflict again. :-(

<h1>Something went wrong !</h1>Applying: Bug 5354: Partial duplication of a subscription<br/>
Using index info to reconstruct a base tree...<br/>
Falling back to patching base and 3-way merge...<br/>
Auto-merging installer/data/mysql/updatedatabase.pl<br/>
CONFLICT (content): Merge conflict in installer/data/mysql/updatedatabase.pl<br/>
Failed to merge in the changes.<br/>
Patch failed at 0001 Bug 5354: Partial duplication of a subscription<br/>
When you have resolved this problem run git am --resolved.<br/>
If you would prefer to skip this patch, instead run git am --skip.<br/>
To restore the original branch and stop patching run git am --abort.<br/>
Bug 5354 - Partial duplication of a subscription<br/>
<br/>
Comment 9 Jonathan Druart 2012-03-21 09:39:14 UTC Comment hidden (obsolete)
Comment 10 Kristina Hoeppner 2012-03-22 05:40:24 UTC
Created attachment 8461 [details] [review]
[SIGNED-OFF] Bug 5354 Partial duplication of a subscription

Tested the patch with the following fields (taken from the HTML code input field IDs):

branchcode
notes
location
callnumber
internalnotes
periodicity
numberpattern
numberingmethod
acqui_date
beginning_date
numberlength
aqbooksellerid
biblionumber
graceperiod
staffdisplaycount
opacdisplaycount
ending_date

For aqbooksellerid and aqbooksellerid, the old information is still visible in the greyed-out boxes, but it is not displayed when you attempt to save the record.

Left out serialsadditems-yes and serialsadditesm-no as you would always have to set this anyway.
Comment 11 Kristina Hoeppner 2012-03-22 06:43:45 UTC
I meant to write:

For aqbooksellerid and biblionumber, the old information is still visible in the greyed-out boxes, but it is not displayed when you attempt to save the record.
Comment 12 Marcel de Rooy 2012-03-23 15:29:02 UTC
QA Comment: Without testing the code itself, looks good. Externally tested by more than one individual. Few comments:

Name SubscriptionDuplicateDroppedInput confuses me, but no blocker. The description is clear though.

The pref should be added to sysprefs.sql. (I tend to forget that too.) If Paul pushes this one, could you add it, Paul?

You separate fields with semicolon. Please note that several new prefs separate with |. I do not mind, but we should go for consistency (at least try ;) No blocker, but a followup? 

Passed QA.
Comment 13 Jonathan Druart 2012-03-26 07:09:19 UTC Comment hidden (obsolete)
Comment 14 Paul Poulain 2012-03-26 14:31:37 UTC
Jonathan, for an unknown reason, when applying the follow-up, I get a:

Applying: Bug 5354: Followup. Change separator
fatal: sha1 information is lacking or useless (installer/data/mysql/updatedatabase.pl).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001 Bug 5354: Followup. Change separator
When you have resolved this problem run "git am --resolved".


anything unusual when formatting your patch ? could you resubmit the follow-up if you have an idea why this one don't work
Comment 15 Jonathan Druart 2012-03-26 15:03:27 UTC
Created attachment 8634 [details] [review]
Bug 5354 Followup Change separator

rebased patch
Comment 16 Paul Poulain 2012-03-28 14:19:13 UTC
There was a small bug introduced by the (tiny) follow-up to change the separator, as requested by marcel in comment 12.
I've fixed it when pushing
Comment 17 Jared Camins-Esakov 2012-12-31 00:49:14 UTC
There have been no further reports of problems so I am marking this bug resolved.