Bug 17853 - MARC21: Don't remove () from link text for 780/785
Summary: MARC21: Don't remove () from link text for 780/785
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Katrin Fischer
QA Contact: Marcel de Rooy
URL:
Keywords: Academy
Depends on:
Blocks:
 
Reported: 2017-01-05 15:52 UTC by Katrin Fischer
Modified: 2020-05-15 22:19 UTC (History)
7 users (show)

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


Attachments
Bug 17853 - Don't remove () from link text (3.20 KB, patch)
2017-01-18 22:58 UTC, Gracie
Details | Diff | Splinter Review
Bug 17853 - Don't remove () from link text (3.20 KB, patch)
2017-01-19 01:04 UTC, Gracie
Details | Diff | Splinter Review
Bug 17853 - Don't remove () from link text (3.26 KB, patch)
2017-04-05 10:31 UTC, sandboxes@biblibre.com
Details | Diff | Splinter Review
Bug 17853 - Don't remove () from link text (3.47 KB, patch)
2017-04-12 11:18 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 17853 - Don't remove () from field 785 link text (3.36 KB, patch)
2017-04-12 11:18 UTC, Nick Clemens
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 17853 - Don't remove () from link text (3.53 KB, patch)
2017-05-10 09:29 UTC, Josef Moravec
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 17853 - Don't remove () from field 785 link text (3.43 KB, patch)
2017-05-10 09:29 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 17853 - Don't remove () from 780 link text (3.64 KB, patch)
2020-04-15 23:47 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 17853: Don't remove () from 785 link text and restore link value of 780 (5.50 KB, patch)
2020-04-15 23:47 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 17853 - Don't remove () from 780 link text (3.69 KB, patch)
2020-04-19 18:46 UTC, David Nind
Details | Diff | Splinter Review
Bug 17853: Don't remove () from 785 link text and restore link value of 780 (5.55 KB, patch)
2020-04-19 18:46 UTC, David Nind
Details | Diff | Splinter Review
Bug 17853 - Don't remove () from 780 link text (6.27 KB, patch)
2020-05-08 09:56 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2017-01-05 15:52:28 UTC
To test: 
- Catalogue a record with 780, Indicators 00 and $a some text including parentheses.
- Verify that the () are not shown in the link text and are not part of the URL.

Problem: It's correct to remove () from the link, but the link text should still include them. Problem exists in staff and OPAC.

From the detail page XSLT, problem is in lines 1149 and 1154:

1146             <xsl:choose>
1147                 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1148                     <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Control-number:<xsl:call-template name="extractControlNumber"><xsl:with-param name="subfieldW" select="marc:subfield[@code='w']"/></xsl:call-template></xsl:attribute>
1149                         <xsl:value-of select="translate($f780, '()', '')"/>
1150                     </a>
1151                 </xsl:when>
1152                 <xsl:otherwise>
1153                     <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate($f780, '()', '')"/></xsl:attribute>
1154                         <xsl:value-of select="translate($f780, '()', '')"/>
1155                     </a>
1156                 </xsl:otherwise>
1157             </xsl:choose>
Comment 1 Katrin Fischer 2017-01-05 15:56:03 UTC
Ah, same problem appears to exist for 785.
Comment 2 Gracie 2017-01-18 22:58:52 UTC Comment hidden (obsolete)
Comment 3 Gracie 2017-01-19 01:04:04 UTC Comment hidden (obsolete)
Comment 4 Mirko Tietgen 2017-01-20 14:09:19 UTC
Gracie: Yes, they should be around the link text, but not part of the URL. If that is what you see you should sign off. :)
Comment 5 Andreas Hedström Mace 2017-03-22 16:17:34 UTC
I've tested this and get the same result with or without this patch - no parenthesis is displayed in the link text (or url for that matter, but it should not display there?).
Comment 6 sandboxes@biblibre.com 2017-04-05 10:31:12 UTC
Patch tested with a sandbox, by Felix Hemme <felix.hemme@thulb.uni-jena.de>
Comment 7 sandboxes@biblibre.com 2017-04-05 10:31:34 UTC Comment hidden (obsolete)
Comment 8 Nick Clemens 2017-04-12 11:18:30 UTC
Created attachment 62078 [details] [review]
Bug 17853 - Don't remove () from link text

To test:
- Catalogue a record with 780, Indicators 00 and $a some text including parentheses.
    e.g. Hospitals (Chicago, Ill. : 1936)
- Verify that the () are not shown in the link text and are not part of the URL.
- Apply patch
- Verify that the () are shown in the link text and are not part of the URL.

Signed-off-by: Felix Hemme <felix.hemme@thulb.uni-jena.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 9 Nick Clemens 2017-04-12 11:18:36 UTC
Created attachment 62079 [details] [review]
Bug 17853 - Don't remove () from field 785 link text

To test:
- Catalogue a record with 780, Indicators 00 and $a some text including parentheses.
  e.g. Hospitals (Chicago, Ill. : 1936)
- Verify that the () are not shown in the link text and are not part of the URL.
- Apply patch
- Verify that the () are shown in the link text and are not part of the URL.
Comment 10 Nick Clemens 2017-04-12 11:19:12 UTC
Fixed commit messages - added new patch for 785 field
Comment 11 Josef Moravec 2017-05-10 09:29:30 UTC
Created attachment 63325 [details] [review]
[SIGNED-OFF] Bug 17853 - Don't remove () from link text

To test:
- Catalogue a record with 780, Indicators 00 and $a some text including parentheses.
    e.g. Hospitals (Chicago, Ill. : 1936)
- Verify that the () are not shown in the link text and are not part of the URL.
- Apply patch
- Verify that the () are shown in the link text and are not part of the URL.

Signed-off-by: Felix Hemme <felix.hemme@thulb.uni-jena.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 12 Josef Moravec 2017-05-10 09:29:38 UTC
Created attachment 63326 [details] [review]
[SIGNED-OFF] Bug 17853 - Don't remove () from field 785 link text

To test:
- Catalogue a record with 780, Indicators 00 and $a some text including parentheses.
  e.g. Hospitals (Chicago, Ill. : 1936)
- Verify that the () are not shown in the link text and are not part of the URL.
- Apply patch
- Verify that the () are shown in the link text and are not part of the URL.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 13 Marcel de Rooy 2017-05-12 09:17:41 UTC
QA: Looking here now
Comment 14 Marcel de Rooy 2017-05-12 09:29:14 UTC
For both 780 and 785 fields a and t are put into variable f780/5.
Since you replace this variable by subfield a, we loose information.
Comment 15 Katrin Fischer 2020-04-15 23:47:11 UTC
Created attachment 103044 [details] [review]
Bug 17853 - Don't remove () from 780 link text

To test:
- Catalogue a record with 780, Indicators 00 and $a some text including parentheses.
    e.g. Hospitals (Chicago, Ill. : 1936)
- Verify that the () are not shown in the link text and are not part of the URL.
- Apply patch
- Verify that the () are shown in the link text and are not part of the URL.

Signed-off-by: Felix Hemme <felix.hemme@thulb.uni-jena.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 16 Katrin Fischer 2020-04-15 23:47:15 UTC
Created attachment 103045 [details] [review]
Bug 17853: Don't remove () from 785 link text and restore link value of 780

The only thing we change for 780 and 785 is, that if the display
text contains (), they are no longer removed.

To test:
- Catalogue a record with 785$a some text (including) parenthesis
    e.g. Hospitals (Chicago, Ill. : 1936)
- Verify that the () are not shown in the link text and are not part of the URL.
- Apply patch
- Verify that the () are shown in the link text and are not part of the URL.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 17 David Nind 2020-04-19 18:46:02 UTC
Created attachment 103219 [details] [review]
Bug 17853 - Don't remove () from 780 link text

To test:
- Catalogue a record with 780, Indicators 00 and $a some text including parentheses.
    e.g. Hospitals (Chicago, Ill. : 1936)
- Verify that the () are not shown in the link text and are not part of the URL.
- Apply patch
- Verify that the () are shown in the link text and are not part of the URL.

Signed-off-by: Felix Hemme <felix.hemme@thulb.uni-jena.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: David Nind <david@davidnind.com>
Comment 18 David Nind 2020-04-19 18:46:06 UTC
Created attachment 103220 [details] [review]
Bug 17853: Don't remove () from 785 link text and restore link value of 780

The only thing we change for 780 and 785 is, that if the display
text contains (), they are no longer removed.

To test:
- Catalogue a record with 785$a some text (including) parenthesis
    e.g. Hospitals (Chicago, Ill. : 1936)
- Verify that the () are not shown in the link text and are not part of the URL.
- Apply patch
- Verify that the () are shown in the link text and are not part of the URL.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: David Nind <david@davidnind.com>
Comment 19 Marcel de Rooy 2020-05-08 09:56:11 UTC
Created attachment 104573 [details] [review]
Bug 17853 - Don't remove () from 780 link text

To test:
- Catalogue a record with 780, Indicators 00 and $a some text including parentheses.
    e.g. Hospitals (Chicago, Ill. : 1936)
- Verify that the () are not shown in the link text and are not part of the URL.
- Apply patch
- Verify that the () are shown in the link text and are not part of the URL.

Signed-off-by: Felix Hemme <felix.hemme@thulb.uni-jena.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: David Nind <david@davidnind.com>

Bug 17853: Don't remove () from 785 link text and restore link value of 780

The only thing we change for 780 and 785 is, that if the display
text contains (), they are no longer removed.

To test:
- Catalogue a record with 785$a some text (including) parenthesis
    e.g. Hospitals (Chicago, Ill. : 1936)
- Verify that the () are not shown in the link text and are not part of the URL.
- Apply patch
- Verify that the () are shown in the link text and are not part of the URL.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 20 Marcel de Rooy 2020-05-08 09:57:24 UTC
Patches are squashed. Makes changes more clear.
Comment 21 Katrin Fischer 2020-05-08 10:33:11 UTC
Yes, and we lose authorship - I intentionally saved the authorship of the Academy student to keep her contribution.
Comment 22 Katrin Fischer 2020-05-08 10:38:31 UTC
I'd prefer if the separate patches could be restored - seeing the diff is easy with git, 2 patches or 1.
Comment 23 Marcel de Rooy 2020-05-08 12:23:57 UTC
(In reply to Katrin Fischer from comment #21)
> Yes, and we lose authorship - I intentionally saved the authorship of the
> Academy student to keep her contribution.

I still see her name?
Comment 24 Katrin Fischer 2020-05-08 12:30:45 UTC
But it's no longer what she wrote.
Comment 25 Martin Renvoize 2020-05-11 09:00:57 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 26 Joy Nelson 2020-05-11 22:41:29 UTC
Backported to 19.11.x for 19.11.06
Comment 27 Lucas Gass 2020-05-15 22:19:12 UTC
backported to 19.05.x for 19.05.11