Hi, in the authorities module, when we consult a record there is a line at the top of the page indicating the number of records for which this authority is being usaed in. But this line disappears when you go into edit mode of the record. It would be convenient to keep this information on edit mode too. Thanks, Patrick.
Hi Patrick, That you asked as a bug it seems that on the latest version of Koha has already be done.
Created attachment 129207 [details] The screenshot shows that on edit mode it has the number of records are connected to the authority record
Hello, My need is to see this information in the edit mode page also not just in the authority details page. Thanks, Patrick.
Hi Patrick, On edit mode of an authority as you can check also at the attached screenshot already exist . Can you please provide me more explanation , or maybe a screenshot , where you expect to have that info that you need ?
Hi, In the screenshot you added, you are at the authority details page. Here you can see the number of notices attached. What I would like is that when we click on 'Edit' and switch to the authority's edit page to also have this information that shows the number of records attached on that page. Is it clearer to you? I added a screenshot to this task Thanks, Patrick.
Created attachment 129294 [details] Authority edit page
Yes, now is more clear , sorry to not understand it earlier !
Created attachment 131065 [details] [review] Bug 20615: Add the link of number of times the authority are used in edit mode Currently when show an authority record you can see the count of records linked with that authority, but when edit that authority record the that detail is dissapeared. Applying this patch will have that information also on edit mode of authority. Test plan: 1) Search for an authority that is already connected with at least one record 2) On detail view of an authority you can check that authority is linked with x records. 3) Edit that authority and the information about in how many records that authority is linked is missing. 4) Apply this patch 5) Edit again that authrity and you can find now the count in how many records is used that authority
Created attachment 131171 [details] [review] Bug 20615: Add the link of number of times the authority are used in edit mode Currently when show an authority record you can see the count of records linked with that authority, but when edit that authority record the that detail is dissapeared. Applying this patch will have that information also on edit mode of authority. Test plan: 1) Search for an authority that is already connected with at least one record 2) On detail view of an authority you can check that authority is linked with x records. 3) Edit that authority and the information about in how many records that authority is linked is missing. 4) Apply this patch 5) Edit again that authrity and you can find now the count in how many records is used that authority Signed-off-by: Marjorie Barry-Vila <marjorie.barry-vila@collecto.ca>
Looks like this was signed off so adjusting bug status.
(In reply to Aleisha Amohia from comment #10) > Looks like this was signed off so adjusting bug status. Thanks, Aleisha!
I've changed the patch author for root <root@vmi538303.contaboserver.net> to George Veranis <gveranis@dataly.gr> and reattached the patch. The problem here is bug 30641 which I think makes this require another follow-up. The code was taken from the detail page, which shows the wrong number of linked authorities. I wonder if Koha::Authorities->find($authid); doesn't do an exact search?
Created attachment 134226 [details] [review] Bug 20615: Add the link of number of times the authority are used in edit mode Currently when show an authority record you can see the count of records linked with that authority, but when edit that authority record the that detail is dissapeared. Applying this patch will have that information also on edit mode of authority. Test plan: 1) Search for an authority that is already connected with at least one record 2) On detail view of an authority you can check that authority is linked with x records. 3) Edit that authority and the information about in how many records that authority is linked is missing. 4) Apply this patch 5) Edit again that authrity and you can find now the count in how many records is used that authority Signed-off-by: Marjorie Barry-Vila <marjorie.barry-vila@collecto.ca>
> I wonder if Koha::Authorities->find($authid); doesn't do an exact search? That's wrong. It's using: get_usage_count So we'd need to look there.
Ok, I have investigated a bit more. The wrong count is due to how we handle things in get_usage_count and it only happens when Elasticsearch is used in combination with QueryAutoTruncate = ON. We will need to fix get_usage_count, but we should do this separately. Willing to pass this as is.
Created attachment 134249 [details] [review] Bug 20615: Add the link of number of times the authority are used in edit mode Currently when show an authority record you can see the count of records linked with that authority, but when edit that authority record the that detail is dissapeared. Applying this patch will have that information also on edit mode of authority. Test plan: 1) Search for an authority that is already connected with at least one record 2) On detail view of an authority you can check that authority is linked with x records. 3) Edit that authority and the information about in how many records that authority is linked is missing. 4) Apply this patch 5) Edit again that authrity and you can find now the count in how many records is used that authority Signed-off-by: Marjorie Barry-Vila <marjorie.barry-vila@collecto.ca>
Pushed to master for 22.05, thanks to everybody involved [U+1F984]