Bug 33037

Summary: [Bugs 32555 and 31313 follow-up] Koha does not display difference between enumchron and serialseq in record detail view (OPAC and intranet)
Product: Koha Reporter: Janusz Kaczmarek <januszop>
Component: SerialsAssignee: Janusz Kaczmarek <januszop>
Status: RESOLVED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P3 CC: dcook, fridolin.somers, jonathan.druart, katrin.fischer, lucas, tomascohen
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31313
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32555
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00,22.11.06
Bug Depends on:    
Bug Blocks: 33568    
Attachments: [PATCH] Bug 33037: [Bugs 32555 and 31313 follow-up] Koha does not display difference between enumchron and serialseq in record detail view (OPAC and intranet)
Bug 33037: Koha does not display difference between enumchron and serialseq in record detail view (OPAC and intranet)
Bug 33037: Koha does not display difference between enumchron and serialseq in record detail view (OPAC and intranet)
Bug 33037: Koha does not display difference between enumchron and serialseq in record detail view (OPAC and intranet)

Description Janusz Kaczmarek 2023-02-22 11:58:30 UTC
Patch 32555 tries to resolve the issue caused by bug 31313.  But the way it is fixed seems to be at least problematic.  With patch 32555 we will never see the difference between `serial`.`serialseq` and `items`.`enumchron` which is still intended in opac-detail.tt (line ~ 1332) and [intranet] catalogue/detail.tt (line ~ 446).  This is because ITEM_RESULT.serialitem (in opac-detail.tt) and item.itemserial.serial (in catalogue/detail.tt) refer to non-existing things.  (and therefor the problem described in 32555 no longer emerge).  The original problem is caused by mixing up serialitem with serial in [opac-]detail.pl and passing serialitem instead of serial to both templates.

A patch will follow.
Comment 1 Janusz Kaczmarek 2023-02-22 12:06:05 UTC
Created attachment 147131 [details] [review]
[PATCH] Bug 33037: [Bugs 32555 and 31313 follow-up] Koha does not display difference between enumchron and serialseq in record detail view (OPAC and intranet)

Patch 32555 tries to resolve the issue caused by bug 31313.  But the way it is fixed seems to be
at least problematic.  With patch 32555 we will never see the difference between
`serial`.`serialseq` and `items`.`enumchron` which is still intended in opac-detail.tt
(line ~ 1332) and [intranet] catalogue/detail.tt (line ~ 446).  This is because
ITEM_RESULT.serialitem (in opac-detail.tt) and item.itemserial.serial (in catalogue/detail.tt)
refer to non-existing things.  (and therefor the problem described in 32555 no longer emerge).
The original problem is caused by mixing up serialitem with serial in [opac-]detail.pl
and passing serialitem instead of serial to both templates.

To test:
1. Create a serial subscription
   1.1. Go to Serials
   1.2. Click on New subscription
   1.3. Fill out the first form
        - Vendor: leave empty
        - Record: enter a record number
        - Create an item record when receiving this serial
        - When there is an irregular issue: Keep issue number
        - Manual history: leave unchecked
        - Call number: leave empty
        - Library: Centerville
        - Public/nonpublic note: leave empty
        - Patron notification: None
        - Location: None
        - Collection: None
        - Item type: Continuing resources
        - Grace period: leave empty
        - Number of issues to display: leave both empty
   1.4. Click Next (and confirm you are not using a vendor)
   1.5. Fill out the second form
        - First issue publication date: 2023-01-01
        - Frequency: 1/month
        - Subscription length: issues 12
        - Subscription start date: 2023-01-01
        - Subscription end date: 2024-01-01
        - Numbering pattern: Number
        - Locale: leave empty
        - Begins with: 42
        - Inner counter: leave empty
   1.6. Click Test prediction pattern
   1.7. Click Save subscription
2. Click OPAC view: Open in new window.
3. Back in the staff interface tab, receive an issue
   3.1. Click Receive
   3.2. In Status, choose Arrived for No. 42
   3.3. IN ITEM DETAILS BELOW CHANGE h - Serial enumeration / chronology
        from No. 42 to some different string
   3.3. Click Save
4. Check the items in OPAC and Intranet – you will see only the value from the
   item $h subfield (enumchron) instead of desired "enumchron -- serialseq"
   in case of a difference between `serial`.`serialseq` and `items`.`enumchron`.
5. Apply this patch
6. Repeat 4
7. Check the items in OPAC and Intranet – you should now see the desired
   "enumchron -- serialseq" string.
8. Sign off
Comment 2 Lucas Gass 2023-04-14 16:23:25 UTC
Created attachment 149696 [details] [review]
Bug 33037: Koha does not display difference between enumchron and serialseq in record detail view (OPAC and intranet)

Patch 32555 tries to resolve the issue caused by bug 31313.  But the way it is fixed seems to be
at least problematic.  With patch 32555 we will never see the difference between
`serial`.`serialseq` and `items`.`enumchron` which is still intended in opac-detail.tt
(line ~ 1332) and [intranet] catalogue/detail.tt (line ~ 446).  This is because
ITEM_RESULT.serialitem (in opac-detail.tt) and item.itemserial.serial (in catalogue/detail.tt)
refer to non-existing things.  (and therefor the problem described in 32555 no longer emerge).
The original problem is caused by mixing up serialitem with serial in [opac-]detail.pl
and passing serialitem instead of serial to both templates.

To test:
1. Create a serial subscription
   1.1. Go to Serials
   1.2. Click on New subscription
   1.3. Fill out the first form
        - Vendor: leave empty
        - Record: enter a record number
        - Create an item record when receiving this serial
        - When there is an irregular issue: Keep issue number
        - Manual history: leave unchecked
        - Call number: leave empty
        - Library: Centerville
        - Public/nonpublic note: leave empty
        - Patron notification: None
        - Location: None
        - Collection: None
        - Item type: Continuing resources
        - Grace period: leave empty
        - Number of issues to display: leave both empty
   1.4. Click Next (and confirm you are not using a vendor)
   1.5. Fill out the second form
        - First issue publication date: 2023-01-01
        - Frequency: 1/month
        - Subscription length: issues 12
        - Subscription start date: 2023-01-01
        - Subscription end date: 2024-01-01
        - Numbering pattern: Number
        - Locale: leave empty
        - Begins with: 42
        - Inner counter: leave empty
   1.6. Click Test prediction pattern
   1.7. Click Save subscription
2. Click OPAC view: Open in new window.
3. Back in the staff interface tab, receive an issue
   3.1. Click Receive
   3.2. In Status, choose Arrived for No. 42
   3.3. IN ITEM DETAILS BELOW CHANGE h - Serial enumeration / chronology
        from No. 42 to some different string
   3.3. Click Save
4. Check the items in OPAC and Intranet – you will see only the value from the
   item $h subfield (enumchron) instead of desired "enumchron -- serialseq"
   in case of a difference between `serial`.`serialseq` and `items`.`enumchron`.
5. Apply this patch
6. Repeat 4
7. Check the items in OPAC and Intranet – you should now see the desired
   "enumchron -- serialseq" string.
8. Sign off
Comment 3 Lucas Gass 2023-04-14 16:24:14 UTC
Created attachment 149697 [details] [review]
Bug 33037: Koha does not display difference between enumchron and serialseq in record detail view (OPAC and intranet)

Patch 32555 tries to resolve the issue caused by bug 31313.  But the way it is fixed seems to be
at least problematic.  With patch 32555 we will never see the difference between
`serial`.`serialseq` and `items`.`enumchron` which is still intended in opac-detail.tt
(line ~ 1332) and [intranet] catalogue/detail.tt (line ~ 446).  This is because
ITEM_RESULT.serialitem (in opac-detail.tt) and item.itemserial.serial (in catalogue/detail.tt)
refer to non-existing things.  (and therefor the problem described in 32555 no longer emerge).
The original problem is caused by mixing up serialitem with serial in [opac-]detail.pl
and passing serialitem instead of serial to both templates.

To test:
1. Create a serial subscription
   1.1. Go to Serials
   1.2. Click on New subscription
   1.3. Fill out the first form
        - Vendor: leave empty
        - Record: enter a record number
        - Create an item record when receiving this serial
        - When there is an irregular issue: Keep issue number
        - Manual history: leave unchecked
        - Call number: leave empty
        - Library: Centerville
        - Public/nonpublic note: leave empty
        - Patron notification: None
        - Location: None
        - Collection: None
        - Item type: Continuing resources
        - Grace period: leave empty
        - Number of issues to display: leave both empty
   1.4. Click Next (and confirm you are not using a vendor)
   1.5. Fill out the second form
        - First issue publication date: 2023-01-01
        - Frequency: 1/month
        - Subscription length: issues 12
        - Subscription start date: 2023-01-01
        - Subscription end date: 2024-01-01
        - Numbering pattern: Number
        - Locale: leave empty
        - Begins with: 42
        - Inner counter: leave empty
   1.6. Click Test prediction pattern
   1.7. Click Save subscription
2. Click OPAC view: Open in new window.
3. Back in the staff interface tab, receive an issue
   3.1. Click Receive
   3.2. In Status, choose Arrived for No. 42
   3.3. IN ITEM DETAILS BELOW CHANGE h - Serial enumeration / chronology
        from No. 42 to some different string
   3.3. Click Save
4. Check the items in OPAC and Intranet – you will see only the value from the
   item $h subfield (enumchron) instead of desired "enumchron -- serialseq"
   in case of a difference between `serial`.`serialseq` and `items`.`enumchron`.
5. Apply this patch
6. Repeat 4
7. Check the items in OPAC and Intranet – you should now see the desired
   "enumchron -- serialseq" string.
8. Sign off

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 4 Lucas Gass 2023-04-14 16:24:51 UTC
This works as described so I am signing off. I did amend the commit message to please the QA scripts.
Comment 5 Nick Clemens 2023-04-17 18:35:24 UTC
Created attachment 149767 [details] [review]
Bug 33037: Koha does not display difference between enumchron and serialseq in record detail view (OPAC and intranet)

Patch 32555 tries to resolve the issue caused by bug 31313.  But the way it is fixed seems to be
at least problematic.  With patch 32555 we will never see the difference between
`serial`.`serialseq` and `items`.`enumchron` which is still intended in opac-detail.tt
(line ~ 1332) and [intranet] catalogue/detail.tt (line ~ 446).  This is because
ITEM_RESULT.serialitem (in opac-detail.tt) and item.itemserial.serial (in catalogue/detail.tt)
refer to non-existing things.  (and therefor the problem described in 32555 no longer emerge).
The original problem is caused by mixing up serialitem with serial in [opac-]detail.pl
and passing serialitem instead of serial to both templates.

To test:
1. Create a serial subscription
   1.1. Go to Serials
   1.2. Click on New subscription
   1.3. Fill out the first form
        - Vendor: leave empty
        - Record: enter a record number
        - Create an item record when receiving this serial
        - When there is an irregular issue: Keep issue number
        - Manual history: leave unchecked
        - Call number: leave empty
        - Library: Centerville
        - Public/nonpublic note: leave empty
        - Patron notification: None
        - Location: None
        - Collection: None
        - Item type: Continuing resources
        - Grace period: leave empty
        - Number of issues to display: leave both empty
   1.4. Click Next (and confirm you are not using a vendor)
   1.5. Fill out the second form
        - First issue publication date: 2023-01-01
        - Frequency: 1/month
        - Subscription length: issues 12
        - Subscription start date: 2023-01-01
        - Subscription end date: 2024-01-01
        - Numbering pattern: Number
        - Locale: leave empty
        - Begins with: 42
        - Inner counter: leave empty
   1.6. Click Test prediction pattern
   1.7. Click Save subscription
2. Click OPAC view: Open in new window.
3. Back in the staff interface tab, receive an issue
   3.1. Click Receive
   3.2. In Status, choose Arrived for No. 42
   3.3. IN ITEM DETAILS BELOW CHANGE h - Serial enumeration / chronology
        from No. 42 to some different string
   3.3. Click Save
4. Check the items in OPAC and Intranet – you will see only the value from the
   item $h subfield (enumchron) instead of desired "enumchron -- serialseq"
   in case of a difference between `serial`.`serialseq` and `items`.`enumchron`.
5. Apply this patch
6. Repeat 4
7. Check the items in OPAC and Intranet – you should now see the desired
   "enumchron -- serialseq" string.
8. Sign off

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Nick <nick@bywatersolutions.com>
Comment 6 Tomás Cohen Arazi 2023-05-09 14:47:57 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 7 Matt Blenkinsop 2023-05-15 12:21:19 UTC
Nice work everyone!

Pushed to stable for 22.11.x
Comment 8 Lucas Gass 2023-06-15 18:57:14 UTC
Not needed in 22.05.x, no backport.
Comment 9 David Cook 2024-04-23 03:43:07 UTC
This is an interesting one. I've had people thinking it's a bug since it's showing some duplicate information:

For example:
Vol. 47, No. 2 (Dec 2023) -- Vol. 47, No. 2 (01/12/2023)

I could maybe understand wanting to do that on the staff interface but not the OPAC... it just looks bad on the OPAC.
Comment 10 Janusz Kaczmarek 2024-04-23 14:06:22 UTC
This feature has been there for quite a long time.  I has disappeared only because of an obvious bug.  Please, cf. bug 18388.

I would not be against the idea of making it configurable by a syspref.  If need you could file another bug since it seems to be a different issue.