Bug 16427

Summary: Direct link to authority records missing in staff detail view (MARC21 6xx)
Product: Koha Reporter: verolencinas <verolencinas>
Component: MARC Bibliographic data supportAssignee: Te Rauhina Jackson <terauhina.jackson>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: chris, gmcharlt, katrin.fischer, nick
Version: MainKeywords: Academy
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20362
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 16427 - Direct link to authority records missing staff detail view
Bug 16427 - Direct link to authority records missing staff detail view
Bug 16427: Direct link to authority records missing staff detail view
Bug 16427: Add direct link to authority records from staff detail view (MARC21 subjects)

Description verolencinas 2016-05-02 23:14:27 UTC
In previous versions of Koha you could see next to a controlled access point with link to an authority record a magnifying glass icon that linked to the authority record with or without the default XSLT enabled (XSLTDetailsDisplay). In the OPAC the icon is visible and usable.
Comment 1 Katrin Fischer 2016-05-03 06:24:58 UTC
I think this wasn't implemented for the staff side in the past - I have taken a look recently as one of our libraries has also asked for this (3.18). One problem is that there is no 'nice' authority view page in staff, so the link would have to go to the standard MARC view.
Comment 2 verolencinas 2016-05-03 16:26:12 UTC
Katrin, you are right. It was the OPAC that includes the magnifying glass icon. This improvement will be very useful to distinguish between access points linked to authority records and other without authority record. In my library for example we have a lot of records that include subjects linked to authority records and subjects without authority record.
Comment 3 Katrin Fischer 2016-05-03 16:45:32 UTC
Yes, I think it woudl be an useful enhancement. For the staff side I think it would not be a big problem to point to the MARC view, even if a prettier view would be nice :)
Comment 4 Te Rauhina Jackson 2018-01-18 02:50:24 UTC
Created attachment 70666 [details] [review]
Bug 16427 - Direct link to authority records missing staff detail view

I added a magnigying glass icon in the staff detail view that links to the authority records.

Test Plan:
1) On the Koha staff page, create a new authority. The type of authority will be: Topical Term.
2) When creating authority, in tab 1 under -HEADING--TOPICAL TERM enter the topical term or geographic name entry element and then save the new authority e.g. science.
3) In circulation, search the catalog for a random book. Click the title of the book and you will be taken to the book details.
4) Edit the record and in tab 6, scroll down the - SUBJECT ADDED
ENTRY--TOPICAL TERM and repeat this tag (the icon next to the title).
5) Edit the Topical term or geographic name entry element by clicking the button on the right of the bar.
6) In the Search main heading ($a only) enter your topical term e.g. science.
7) Press search, and then in the table that pops up, click 'choose'.
8) Save your edits and the new topical term will be in the 'Subject(s)' list of the book details.
9) Notice that there is no magnifying glass icon.
10) Apply this patch
11) Notice that there is now a magnifying glass icon next to the topical term.
12) Click on the magnifying glass and it will take you directly to the authorities records
Comment 5 Owen Leonard 2018-01-18 14:26:04 UTC
This looks good, but can I suggest one minor edit? I think a little space before the icon would improve readability:

             <xsl:if test="marc:subfield[@code=9]">
+                <xsl:text> </xsl:text>
                 <a class='authlink'>

The XSL usually ignores whitespace, so the <xsl:text> block can put a single space before the icon.
Comment 6 Te Rauhina Jackson 2018-01-18 20:24:18 UTC
Created attachment 70708 [details] [review]
Bug 16427 - Direct link to authority records missing staff detail view

Thanks Owen, I've just added the whitespace before the magnifying glass.
Comment 7 Owen Leonard 2018-01-19 13:07:14 UTC
Created attachment 70742 [details] [review]
Bug 16427: Direct link to authority records missing staff detail view

I added a magnigying glass icon in the staff detail view that links to
the authority records.

Test Plan:
1) On the Koha staff page, create a new authority. The type of authority
   will be: Topical Term.
2) When creating authority, in tab 1 under -HEADING--TOPICAL TERM enter
   the topical term or geographic name entry element and then save the
   new authority e.g. science.
3) In circulation, search the catalog for a random book. Click the title
   of the book and you will be taken to the book details.
4) Edit the record and in tab 6, scroll down the - SUBJECT ADDED
   ENTRY--TOPICAL TERM and repeat this tag (the icon next to the title).
5) Edit the Topical term or geographic name entry element by clicking
   the button on the right of the bar.
6) In the Search main heading ($a only) enter your topical term e.g.
   science.
7) Press search, and then in the table that pops up, click 'choose'.
8) Save your edits and the new topical term will be in the 'Subject(s)'
   list of the book details.
9) Notice that there is no magnifying glass icon.
10) Apply this patch
11) Notice that there is now a magnifying glass icon next to the topical
    term.
12) Click on the magnifying glass and it will take you directly to the
    authorities records

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 8 Owen Leonard 2018-01-19 13:08:12 UTC
Thanks for the follow-up! I squashed the two patches during sign-off for simplicity's sake.
Comment 9 Katrin Fischer 2018-03-09 07:16:19 UTC
This works perfectly for the subjects, but not for the authors and contributurs (1xx, 7xx), would it be possible to get another patch for the others to complete this? I have filed bug 20362 so this can move on.
Comment 10 Katrin Fischer 2018-03-09 07:17:32 UTC
Created attachment 72552 [details] [review]
Bug 16427: Add direct link to authority records from staff detail view (MARC21 subjects)

I added a magnigying glass icon in the staff detail view that links to
the authority records.

Test Plan:
1) On the Koha staff page, create a new authority. The type of authority
   will be: Topical Term.
2) When creating authority, in tab 1 under -HEADING--TOPICAL TERM enter
   the topical term or geographic name entry element and then save the
   new authority e.g. science.
3) In circulation, search the catalog for a random book. Click the title
   of the book and you will be taken to the book details.
4) Edit the record and in tab 6, scroll down the - SUBJECT ADDED
   ENTRY--TOPICAL TERM and repeat this tag (the icon next to the title).
5) Edit the Topical term or geographic name entry element by clicking
   the button on the right of the bar.
6) In the Search main heading ($a only) enter your topical term e.g.
   science.
7) Press search, and then in the table that pops up, click 'choose'.
8) Save your edits and the new topical term will be in the 'Subject(s)'
   list of the book details.
9) Notice that there is no magnifying glass icon.
10) Apply this patch
11) Notice that there is now a magnifying glass icon next to the topical
    term.
12) Click on the magnifying glass and it will take you directly to the
    authorities records

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 11 Jonathan Druart 2018-03-23 15:35:23 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 12 Nick Clemens 2018-03-26 12:09:14 UTC
Enhancement, not backported for 17.11