Bug 31198

Summary: Enhance results table options in authorities module
Product: Koha Reporter: Julie Emond-Collecto <julie.emond>
Component: MARC Authority data supportAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: new feature    
Priority: P5 - low CC: angela.berrett, jheltibridle, koha
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Authority display example

Description Julie Emond-Collecto 2022-07-20 13:35:39 UTC
Created attachment 137925 [details]
Authority display example

Hi, 

We would like to show the authority number in the search results. Currently you have to click on the authorized to display the number.

It would therefore be interesting if we could choose the display options for the authority results.
Comment 1 Juliet Heltibridle 2023-05-30 19:22:22 UTC
Displaying the authority number on the Authority Search Results page would be very helpful and save a lot of time. Currently you have to click into an authority, or hover over the link to see the number in the link.
Comment 2 Katrin Fischer 2023-06-17 12:45:17 UTC
Can you explain why the authority number would be helpful? I am interested in the use case/learning how the number is used.
Comment 3 Koha collecto 2025-02-10 21:40:23 UTC
Hi Katrin,

I don't remember specificly why we proposed that but I would love to propose a more complete enhencement, but I believe one of the use of having the auth_id in the search results table would be to copy them into the batch record deletion tool. 

But more than that, I think we could benefit from being able to export the search results table from the authority module.

Since 22.05 the unused authority check plugin doesn't work properly (we've filed an issue for that here : https://github.com/bywatersolutions/koha-plugin-unused-authority-check/issues/13) and I believe enhancing the search results table in the auth module would probably resolve the need for the plugin.

If the search results table had a column for the auth_id and that the table could be export, we could simply filter from the CSV file the authorities that are used in 0 record and copy their auth_id to delete them in batch.

In my head it would replace the plugin entirely ? :)
Comment 4 Angela Berrett 2025-02-14 19:47:26 UTC
We would love to see the auth_id in the search results.  We often need to use them to run reports or do batch edits but have to look up the individual numbers and either hover over each to get the URL or open each to get that list.  And exporting and filtering would be useful as well. 

(In reply to Koha collecto from comment #3)
> Hi Katrin,
> 
> I don't remember specificly why we proposed that but I would love to propose
> a more complete enhencement, but I believe one of the use of having the
> auth_id in the search results table would be to copy them into the batch
> record deletion tool. 
> 
> But more than that, I think we could benefit from being able to export the
> search results table from the authority module.
> 
> Since 22.05 the unused authority check plugin doesn't work properly (we've
> filed an issue for that here :
> https://github.com/bywatersolutions/koha-plugin-unused-authority-check/
> issues/13) and I believe enhancing the search results table in the auth
> module would probably resolve the need for the plugin.
> 
> If the search results table had a column for the auth_id and that the table
> could be export, we could simply filter from the CSV file the authorities
> that are used in 0 record and copy their auth_id to delete them in batch.
> 
> In my head it would replace the plugin entirely ? :)
Comment 5 Juliet Heltibridle 2025-03-10 21:47:38 UTC
I would love to see additional enhancements to the search results for authority records. This would include showing the authority number in a column, allowing the number of results to be increased from a drop-down (maybe not show all, but show more than 20 at a time), and allowing exports of the results. This would bring it into alignment with other results tables in the staff interface, and make it more useful for those working with the results.

In the meantime, I've added the following jquery to my system to show the Auth ID:

$(document).ready(function() {
    if($('#authorities_searchresultlist_results').length) {
    	$('#authorities_searchresultlist_results tr:first').prepend('<th>Auth ID</th>');
  
    	$('#authorities_searchresultlist_results tr[data-authid]').each(function() {
      		var authid = $(this).attr('data-authid');
      		$(this).find('td:first').before('<td>' + authid + '</td>');
    	});
    }
});
Comment 6 Katrin Fischer 2025-03-22 18:16:38 UTC
(In reply to Koha collecto from comment #3)
> Hi Katrin,
> 
> I don't remember specificly why we proposed that but I would love to propose
> a more complete enhencement, but I believe one of the use of having the
> auth_id in the search results table would be to copy them into the batch
> record deletion tool. 

The batch edit tool is a very good use case, thanks!