Bug 15931

Summary: If Authority is not used by any records, remove link to cataloguing search
Product: Koha Reporter: Aleisha Amohia <aleisha>
Component: MARC Authority data supportAssignee: Aleisha Amohia <aleisha>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: brendan, jonathan.druart, oleonard, veron
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: Sponsored Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 15931: Removing link to records if authority is not used by any records
Bug 15931: Removing link to records if authority is not used by any records
[SIGNED-OFF] Bug 15931: Removing link to records if authority is not used by any records
Bug 15931: Removing link to records if authority is not used by any records
Bug 15931: Removing link to records if authority is not used by any records
Bug 15931: Removing link to records if authority is not used by any records
Bug 15931: Replace relative path with /cgi-bin/koha/

Description Aleisha Amohia 2016-02-28 23:39:06 UTC
If an authority is not used in any records, the link that says 'Used in: X records' should no longer be a link because it just takes the user to a search with no results.
Comment 1 Aleisha Amohia 2016-02-29 00:47:46 UTC Comment hidden (obsolete)
Comment 2 Nick Clemens (kidclamp) 2016-02-29 13:34:48 UTC Comment hidden (obsolete)
Comment 3 Aleisha Amohia 2016-03-01 22:14:11 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2016-03-16 11:25:17 UTC
"0 records" => "0 record", isn't it?

Should not we display something more friendly ("This auth record is not used" or similar)?
Comment 5 Aleisha Amohia 2016-03-17 21:36:28 UTC Comment hidden (obsolete)
Comment 6 Aleisha Amohia 2016-03-17 21:38:00 UTC
(In reply to Jonathan Druart from comment #4)
> "0 records" => "0 record", isn't it?

It will only say 'record' if there is one individual record we are referring to, otherwise the 's' on the end is appropriate. I did have a typo in my patch though (there were too many s') and have fixed this.

> 
> Should not we display something more friendly ("This auth record is not
> used" or similar)?

Updated for detail.tt page. I think in the table form, it is okay to say '0 records'.
Comment 7 Marc Véron 2016-03-24 16:12:05 UTC Comment hidden (obsolete)
Comment 8 Jonathan Druart 2016-03-24 22:09:52 UTC
Created attachment 49569 [details] [review]
Bug 15931: Removing link to records if authority is not used by any records

EDIT:
Fixing typo: records(s) -> record(s)
On details page, if authority is not used in any records, the page will display a more used friendly message: "This authority is not used in any records."

To test:
1) Do an authority search on authorities-home.pl. Notice that authorities not used in any records have a clickable link (under 'Used in:' column) which redirects to a catalog search with no results
2) Go back to your authority search results on authorities-home.pl and click 'Details'. Notice that under the auth name, there is a 'Used in X records' link that again returns a catalog search with no results.
3) Apply patch
4) Repeat steps 1, 2. Authorities not used in any records should no longer have clickable links and links to authorities which are used in records should work as expected.
5) Confirm it now says record(s) instead of records(s)
6) Confirm that on detail page for an authority which is not used by any records, it now says more friendly message.

Sponsored-by: Catalyst IT

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 9 Jonathan Druart 2016-03-24 22:09:55 UTC
Created attachment 49570 [details] [review]
Bug 15931: Replace relative path with /cgi-bin/koha/

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 10 Brendan Gallagher 2016-03-31 20:21:28 UTC
Pushed to Master - Should be in the May 2016 release.  Thanks!