Bug 10825 - detail.tt displays duplicated enumchron values for serial items
Summary: detail.tt displays duplicated enumchron values for serial items
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Mason James
QA Contact: Testopia
URL:
Keywords:
: 5768 (view as bug list)
Depends on:
Blocks: 10823
  Show dependency treegraph
 
Reported: 2013-09-05 05:35 UTC by Mason James
Modified: 2015-06-04 23:30 UTC (History)
8 users (show)

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


Attachments
pic (89.80 KB, image/png)
2013-09-05 05:39 UTC, Mason James
Details
Bug 10825 - detail.tt displays duplicated enumchron values for serial items (4.30 KB, patch)
2013-09-05 05:51 UTC, Mason James
Details | Diff | Splinter Review
pic, after applied patch (19.40 KB, image/png)
2013-09-05 05:54 UTC, Mason James
Details
Bug 10825 - detail.tt displays duplicated enumchron values for serial items (1.80 KB, patch)
2013-09-16 03:22 UTC, Mason James
Details | Diff | Splinter Review
Bug 10825 - detail.tt displays duplicated enumchron values for serial items (1.81 KB, patch)
2013-09-16 14:57 UTC, Paola Rossi
Details | Diff | Splinter Review
[SIGNED OFF] Bug 10825 - detail.tt displays duplicated enumchron values for serial items (2.25 KB, patch)
2014-03-13 03:01 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 10825 - detail.tt displays duplicated enumchron values for serial items (2.23 KB, patch)
2014-03-13 03:20 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 10825 - detail.tt displays duplicated enumchron values for serial items (2.33 KB, patch)
2014-04-14 12:18 UTC, Mason James
Details | Diff | Splinter Review
Bug 10825 - detail.tt displays duplicated enumchron values for serial items (2.49 KB, patch)
2014-04-14 16:27 UTC, Mark Tompsett
Details | Diff | Splinter Review
[SIGNED OFF] Bug 10825 - detail.tt displays duplicated enumchron values for serial items (2.55 KB, patch)
2014-04-14 16:33 UTC, Mark Tompsett
Details | Diff | Splinter Review
[PASSED QA] Bug 10825 - detail.tt displays duplicated enumchron values for serial items (2.68 KB, patch)
2014-04-15 09:07 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Mason James 2013-09-05 05:35:24 UTC
when a serial is received, its serialseq info is automatically copied into it's item.enumchron field

when that newly created item is displayed in the staff details page both its enumchron and serialseq values are displayed together.


the bug is - both values are identical creating a duplication of info 
(pic attached)

the solution is to only display one of the two fields
Comment 1 Mason James 2013-09-05 05:39:31 UTC
Created attachment 20792 [details]
pic
Comment 2 Mason James 2013-09-05 05:51:40 UTC Comment hidden (obsolete)
Comment 3 Mason James 2013-09-05 05:54:23 UTC
Created attachment 20794 [details]
pic, after applied patch
Comment 4 Mason James 2013-09-13 10:34:35 UTC
Comment on attachment 20793 [details] [review]
Bug 10825 - detail.tt displays duplicated enumchron values for serial items

hmm, this patch looks buggy - i will test and resumbit...
Comment 5 Mason James 2013-09-16 03:22:20 UTC Comment hidden (obsolete)
Comment 6 Paola Rossi 2013-09-16 14:57:43 UTC Comment hidden (obsolete)
Comment 7 Katrin Fischer 2013-09-22 09:28:02 UTC
Hi Mason,

I am sorry, but I can't reproduce the wrong display. I am wondering where the date and serialseq should be pulled from? Can you please clarify?
Comment 8 Bob Birchall 2013-10-07 10:28:55 UTC
(In reply to Katrin Fischer from comment #7)
> Hi Mason,
> 
> I am sorry, but I can't reproduce the wrong display. I am wondering where
> the date and serialseq should be pulled from? Can you please clarify?


Hi Cait, as far as I understand, the problem arises only for serials items received through the Serials module.  Mason tells me that both items.enumchron and serial.serialseq are displayed, hence the duplication.  I hope this helps.
Comment 9 Katrin Fischer 2013-10-07 10:32:30 UTC
Hi Bob,

thx for the comment :) I had tested with items created in serials, but I just couldn't make both fields show up :(
Comment 10 Liz Rea 2013-11-10 23:15:38 UTC
I am actually seeing this bug - will get test data that can replicate to test the patch.

Liz
Comment 11 Liz Rea 2013-11-13 22:27:07 UTC
I suspect there is a combination of system preferences that makes this bug manifest. Among the possibilities are XSLT vs Normal display, Separate holdings vs unified holdings, and possibly others. This patch only addresses one of the possibilities - will submit follow up for second case.

Cheers,
Liz
Comment 12 Nicole C. Engard 2014-01-08 20:28:25 UTC
I have seen this, but I would like to note that not always are items.enumchron and serial.serialseq the same thing - I think we actually had someone make it show both a little while back because of just that.  I thought I had a bug suggestion a way to break this in to two columns or style it so we can hide one if want but I can't find that bug.  

I do not vote to removing one altogether though.

Nicole
Comment 13 Mark Tompsett 2014-03-13 03:01:59 UTC Comment hidden (obsolete)
Comment 14 Mark Tompsett 2014-03-13 03:20:38 UTC Comment hidden (obsolete)
Comment 15 Magnus Enger 2014-03-13 13:59:23 UTC
Hm, I'm a bit confused. This bug has two patches, both with Mason as the author. Both batches are uploaded by Mark, but one has a signed off line from Mark and one does not. 

Mark: Did you mean to sign off both of these, but forgot to add the signoff to the second one? Should it be marked "Signed off"?
Comment 16 Mark Tompsett 2014-03-14 04:08:46 UTC
Magnus, the first one does not account for Nicole's comment #12. However, since I do not know the validity of the suggestion, I coded a counter-patch which does account for it as noted in comment #14.

You apply one or the other -- not both.

The first patch will only put out enumchron if enumchron is defined, and if it is not defined, then it will consider putting out serialseq.

The second patch will put out both enumchron and serialseq if they are different. And it will only put them out if they are defined.

Hope this clears that up.
Comment 17 Mark Tompsett 2014-03-18 00:54:52 UTC
In order to find one try select biblionumber,serialseq from serial and then use one of those biblionumbers in the http://STAFF/cgi-bin/koha/catalogue/detail.pl?biblionumber=### URL.

select serial.biblionumber as bibno,biblioitems.biblioitemnumber as bibino,items.itemnumber as itemno,items.dateaccessioned,items.enumchron,serialseq from serial,biblioitems,items,serialitems where serial.serialid=serialitems.serialid and serialitems.itemnumber=items.itemnumber and serial.biblionumber=biblioitems.biblionumber and biblioitems.biblioitemnumber=items.biblioitemnumber order by biblioitems.biblionumber;
Comment 18 Mark Tompsett 2014-03-18 01:38:27 UTC
Useful information for testing

1) Log into staff client, note library branch.
2) Change branch to one that has serials.
3) Click 'Serials'.
4) Click 'Submit' button for lots of results.
5) Choose one that has received items, click the title.
6) Click 'Serial collection' in the left panel.
7) Check an edit box, and click the 'Edit serials' button.
8) Manually edit the "Numbered" as needed.
9) Click 'Home'
10) Click 'Serials'
11) Click 'Submit' button for lots of results.
12) For the item modified (or just viewed), note the ISSN number.
    Use it to find the biblio number.
Comment 19 Mark Tompsett 2014-04-14 06:27:00 UTC
This will solve the duplicate problem after the styling issue is dealt with. Hence, I have made this depend on 10823.
Comment 20 Mason James 2014-04-14 11:28:50 UTC
(In reply to M. Tompsett from comment #16)
> Magnus, the first one does not account for Nicole's comment #12. However,
> since I do not know the validity of the suggestion, I coded a counter-patch
> which does account for it as noted in comment #14.
> 
> You apply one or the other -- not both.
> 
> The first patch will only put out enumchron if enumchron is defined, and if
> it is not defined, then it will consider putting out serialseq.
> 
> The second patch will put out both enumchron and serialseq if they are
> different. And it will only put them out if they are defined.
> 
> Hope this clears that up.

Mark's patch sounds better than my patch, lets use that one...

i will mark my patch 'obsolete'
Comment 21 Mason James 2014-04-14 12:18:15 UTC Comment hidden (obsolete)
Comment 22 Mason James 2014-04-14 12:20:35 UTC
Mark you might need to update the 'author' of your patch..

you patch still has my name on it
Comment 23 Mason James 2014-04-14 12:32:08 UTC
(In reply to Mason James from comment #22)
> Mark you might need to update the 'author' of your patch..
> 
> you patch still has my name on it

i've tested Mark's patch, it looks good and works as expected

thanks Mark! :)
Comment 24 Mark Tompsett 2014-04-14 16:27:45 UTC Comment hidden (obsolete)
Comment 25 Mark Tompsett 2014-04-14 16:33:04 UTC Comment hidden (obsolete)
Comment 26 Mark Tompsett 2014-04-14 16:35:40 UTC
Considering that both you and I tested it, Mason, and it was initially your patch. I'm not concerned about the author. I'm concerned about getting patches into Koha to improve it. We have two independent folk saying the patch is good. QA'ing seems the next logical step.
Comment 27 Katrin Fischer 2014-04-15 09:07:00 UTC
I am not totally sure why we'd want to display both there or why they might be different, but the patch just ensures that only one shows when both are the same - so this seems a harmless improvement.
Comment 28 Katrin Fischer 2014-04-15 09:07:57 UTC
Created attachment 27119 [details] [review]
[PASSED QA] Bug 10825 - detail.tt displays duplicated enumchron values for serial items

TEST PLAN
---------
1) Find a data point that displays like the picture on this
    bug report.
   -- in MySQL:
      SELECT items.biblionumber,items.enumchron,serial.serialseq
      FROM items,serial,serialitems
      WHERE items.itemnumber=serilaitems.itemnumber
        AND serialitems.serialid=serial.serialid;
2) Apply the patch
3) Refresh the screen
4) Does it look like the second picture now with the duplication
    removed?
5) Run koha qa test tools

I did attempt with default and blank for the XSLT system
preferences for the staff client.

This accounts for Nicole's comment #12.

Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes tests and QA script.
Template change only.
Comment 29 Galen Charlton 2014-04-15 16:23:25 UTC
Pushed to master.  Thanks, Mason and Mark!
Comment 30 Mark Tompsett 2014-05-06 02:11:31 UTC
*** Bug 5768 has been marked as a duplicate of this bug. ***
Comment 31 Fridolin Somers 2014-08-06 09:35:48 UTC
Pushed to 3.14.x, will be in 3.14.10
Comment 32 Kyle M Hall (khall) 2014-08-13 14:24:37 UTC
Picked for 3.12.15!