Bug 15851 - "Analytics: Show analytics" showing regardless of whether they have analytics.
Summary: "Analytics: Show analytics" showing regardless of whether they have analytics.
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Galen Charlton
QA Contact: Testopia
URL:
Keywords:
Depends on: 5959
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-17 20:29 UTC by Ed Veal
Modified: 2019-02-27 06:49 UTC (History)
9 users (show)

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


Attachments
Bug 15851: Only display 'show analytics' link if there are (3.42 KB, patch)
2017-08-29 16:36 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Veal 2016-02-17 20:29:37 UTC
All of records where position 7 of the leader indicates serial automatically display "Analytics: Show analytics" -- regardless of whether they have analytics. To confirm, we linked numerous items to host records in the case where monographic volumes were bound together via the "Link to Host Item" feature, automatically creating 773s. These are not in question and we do not want to make any changes that would affect them. The request is to remove the display "Analytics: Show analytics" for periodical records that do not have analytics.
Comment 1 Katrin Fischer 2016-02-17 20:45:47 UTC
There are 2 ways in Koha to manage analytical records - one is EasyAnalytics, which I think you are referring to. The other is using the "New child record" option and is based on the bibliographic record only, without involving the items. If you are using EasyAnalytics you could probably just hide the link with CSS as it should not be needed. 

The basic problem is, that the parent record doesn't know in the MARC if it has children... so we can't solve that only with XSLT, we need another way of checking for children.
Comment 2 Zeno Tajoli 2016-02-18 10:09:23 UTC
In unumarc is possible to use Leader pos. 8 [Hierarchical code].
The value '1' means 'highest level record', so it is sure it has children.
In MARC21 I think we need a proprietary subfield.
I suggest one from tag 942.
Comment 3 Katrin Fischer 2016-02-18 10:15:50 UTC
The 942 won't work in our use case for the same reason that we can't use EasyAnalatics. For libraries, where the bibliographic record is created outside of Koha and automatically kept in sync with the external master record, there is no way to have 'local' fields, because they will always be overwritten/deleted with an update.
Comment 4 Zeno Tajoli 2016-02-18 10:29:50 UTC
We can change the wording.
From "Analytics: Show analytics" to "Analytics: Search if present".
Comment 5 Hugo Agud 2017-08-18 08:35:53 UTC
We're doing a silly change in xslt in order to fix this

we use local marc tag to indicate koha that this record has analytics and then modifiy the xlst according to this.

There is two ways of fixing this.

1st --> manual one, using one tag to indicate koha that this record has analytics and show the link

2nd --> some kind of indexes that looks for 773$0 or 773$9 and activate it for the selected records
Comment 6 Hugo Agud 2017-08-18 08:55:21 UTC
3rd. move to the OPAC the current functionality that indicates that some items includes analytics like the intranet does .
Comment 7 Jonathan Druart 2017-08-29 16:36:51 UTC
Created attachment 66593 [details] [review]
Bug 15851: Only display 'show analytics' link if there are
Comment 8 Jonathan Druart 2017-08-29 16:39:37 UTC
As I am not sure to understand the need correctly, I have provided a quick (and dirty) patch. Let me know if it fixes the needs and I will improve it later if it is what you are waiting for.
Comment 9 Katrin Fischer 2017-08-29 16:45:19 UTC
Hi Jonathan, I don't see how the flag would be added, can you explain?

We have a lot of libraries with analytics which is why we added the featuer in the first place. The unsolved problem was and is that the MARC parent record doesn't know about it's children. And it's not easy to find out if there is one. If the library uses UseControlNumber for linking, you can check if the 001 of the parent appears in a 773$w with the rcn-Index. If the library doesn't link using numbers, you'd have to do a phrase search for 773$t(?) and Title.

A purely manual solution where you have to add a flag to the record would not work for us as we don't catlaog in Koha but in a cooperative catalouging environment (union catalog). So this should be optional then. 

Having a clean soluton that works without manual interference would be really nice as a lot of libraries have asked for the link to be smarter.
Comment 10 Jonathan Druart 2017-08-29 16:57:51 UTC
The flag ($analytics_flag) is set from detail.pl:289

286     #count if item is used in analytical bibliorecords
287     my $countanalytics= GetAnalyticsCount($item->{itemnumber});
288     if ($countanalytics > 0){
289         $analytics_flag=1;
290         $item->{countanalytics} = $countanalytics;
291     }
Comment 11 Katrin Fischer 2017-08-29 19:17:24 UTC
It looks like this could work for EasyAnalytics - but it would break the workflow for people using UseControlNumber - linking without any items involved on bibliographic record level (MARC21 standard)
Comment 12 Zeno Tajoli 2017-08-30 08:31:57 UTC
Hi,

in fact Katrin underline the problematic point: in MARC21 standard catalouging nothing in parent biblio record of a serial  says if it has analitics.
Probably a good option is:
1)A new Sys pref "AnaliticsWithControlNumbers" and say: "Set it 'ON' only if you use control numbers in 77x$w and don't use  EasyAnalytics".
2)A new function like "GetAnalyticsCount" but based on controlnumber and rcn-Index.
Comment 13 Hugo Agud 2017-08-30 08:57:03 UTC
At the what we need is to know if a bib record has analytics, we do not need silly xslt links based on bib-leve:s (journals) and on the other hand we have forgotten about chapters not only serial (bib-level:b)

The link between bib and analytics is 773 field... here the big issue is most of fields are text 773$t and the one to one link are 773$0 773$9 or even 773$x(issn (journals) or 773$w(controlnumber) depends on every library, how they have created the analytics...they will have more or less filled tags

If you're using koha and have created the analytics with koha you will have a nice 773 to work create links ;)

Now in the staff cients, in the analytics tab you have info about if that item has anaytics attached and how many... because the 773$9 (one to one link and it works fine)

I think there is not a 100% solution, because there will be plenty of different situations and one solution won't match all possible situations

I like the idea of the syspref 'GetAnalyticsCount' but we must be clear enought with the customers explaining how the links works

The idea it should be, that the library must  check their current 773 tags and fix it. (they have a nice batch record modification tool)

There is 3 potential ways:
for current biblionumber --> appear the link if there is any 773$0 that matchs the biblio
or

for current itemnumbers --> appear a link if there is any 773$9 that matchs the itemnumber

or
for current issn --> apprear a link if there is any 773$x that matches 022$a

I don not like the control-number:
the use of control number I dislike because koha is not using 001 control-number
Comment 14 Katrin Fischer 2017-08-30 09:34:08 UTC
(In reply to Hugo Agud from comment #13)
> At the what we need is to know if a bib record has analytics, we do not need
> silly xslt links based on bib-leve:s (journals) and on the other hand we
> have forgotten about chapters not only serial (bib-level:b)

The links have been created so you can hide them very easily with CSS if you don't want or need them.

> The link between bib and analytics is 773 field... here the big issue is
> most of fields are text 773$t and the one to one link are 773$0 773$9 or
> even 773$x(issn (journals) or 773$w(controlnumber) depends on every library,
> how they have created the analytics...they will have more or less filled tags
> 
> If you're using koha and have created the analytics with koha you will have
> a nice 773 to work create links ;)

Not all libraries catalog solely in Koha. But: you can create analytics within Koha in 2 different ways already. One is EasyAnalytics which is tied to the items, the other is from the detail view available as well and supports Controlnumber linking: New > New child record. If a 001 exists, it will be used.

The different linking methods/options are the reson that there is a fallback from $w to a Title search. More logic could be added there to include other possible good search parameters like ISBN/ISSN.

> Now in the staff cients, in the analytics tab you have info about if that
> item has anaytics attached and how many... because the 773$9 (one to one
> link and it works fine)

Please keep in mind that this is only available for libraries using EasyAnalytics.

> I think there is not a 100% solution, because there will be plenty of
> different situations and one solution won't match all possible situations
> 
> I like the idea of the syspref 'GetAnalyticsCount' but we must be clear
> enought with the customers explaining how the links works
> 
> The idea it should be, that the library must  check their current 773 tags
> and fix it. (they have a nice batch record modification tool)

> 
> There is 3 potential ways:
> for current biblionumber --> appear the link if there is any 773$0 that
> matchs the biblio
> or

There is no $0 defined for 773 in MARC standard?

> 
> for current itemnumbers --> appear a link if there is any 773$9 that matchs
> the itemnumber
> 
> or
> for current issn --> apprear a link if there is any 773$x that matches 022$a

Please don't forget $w here - it's actually one of the best possible links, as the matching should be exact based on ID.


> I don not like the control-number:
> the use of control number I dislike because koha is not using 001
> control-number

Please keep other workflows in mind. Our records are linked outside of Koha by ID in an external cataloguing environment, everything is held together by 001. One central cataloguing environment, data delivered to lots of different ILS. Also: 001/$w IS MARC standard.
Comment 15 Joy Nelson 2018-02-01 21:59:07 UTC
Cait-
I can appreciate that your libraries have workflows related to analytics here.  However, the vast majority of other libraries using MARC21 standard do not intend the Leader position 7 to indicate that there are analytics present.  I believe that Koha should be displaying the bibliographic data in a way that is accurate to the data that is entered.  In this case not display an analytic tag just because leader position 7 =s.  

I have a number of libraries who would love to see this 'feature' removed and have Koha catalog and display in the correct fashion (according to marc21 standards).

joy
Comment 16 Katrin Fischer 2018-02-01 22:15:30 UTC
(In reply to Joy Nelson from comment #15)
> Cait-
> I can appreciate that your libraries have workflows related to analytics
> here.  However, the vast majority of other libraries using MARC21 standard
> do not intend the Leader position 7 to indicate that there are analytics
> present.  I believe that Koha should be displaying the bibliographic data in
> a way that is accurate to the data that is entered.  In this case not
> display an analytic tag just because leader position 7 =s.  
> 
> I have a number of libraries who would love to see this 'feature' removed
> and have Koha catalog and display in the correct fashion (according to
> marc21 standards).
> 
> joy

I am not sure how to hide it by default and make it display on demand. At the moment you can hide it with one line of CSS. Would hiding it in the default CSS and unhiding in OpacUserCSS work?

We also hide it for a lot of libraries as most don't have analytics - and then they don't have analytics on all records. I just wanted to say: don't kill it by assuming everyone uses EasyAnalytics. I am open to suggestions on how to make this work better - Ideally it should only display when there are linked records.
Comment 17 Joy Nelson 2018-02-01 23:31:05 UTC
Cait-
I agree that this could be a responsive feature in Koha.  However, to most librarians it appears that Koha is 'doing something' (displaying analytic links) that is not supported by the correct cataloging of records.  Catalogers put a lot of effort into correctly cataloging their collections.  And when this cataloging results in behavior that is not related to the industry standards, it causes frustration, confusion and some lack of confidence in the tool.  

Yes, it could be hidden, but by doing so we are expecting the bulk of Marc21 libraries to hide something that should never be there in the first place.
Comment 18 Katrin Fischer 2018-02-02 06:15:37 UTC
Joy, I understand. Let's try to figure out something that works for us both. What about my suggestion to turn the CSS around from the last comment? (hide by default, make it possible to unhide)
Comment 19 Katrin Fischer 2018-02-02 06:23:29 UTC
I'd be happiest with a solution where we fixed the idea from Jonathan so that it works for both use cases - EasyAnalytics and simple 773 linking. Looking at the patch it seems to be missing the code to actually calculate the $analytics_flag?

I think we could all agree that this would be a nice enhancement, showing a link only when there are analytics. Or just never show a link if EasyAnalytics is used?

I am just not sure how to do it, which is the whole reason it was not implemented like that from the beginning :( With some guidance I would be happy to give it a try.
Comment 20 Marcel de Rooy 2018-02-02 06:43:10 UTC
(In reply to Joy Nelson from comment #17)
> Cait-
> I agree that this could be a responsive feature in Koha.  However, to most
> librarians it appears that Koha is 'doing something' (displaying analytic
> links) that is not supported by the correct cataloging of records. 
> Catalogers put a lot of effort into correctly cataloging their collections. 
> And when this cataloging results in behavior that is not related to the
> industry standards, it causes frustration, confusion and some lack of
> confidence in the tool.  
> 
> Yes, it could be hidden, but by doing so we are expecting the bulk of Marc21
> libraries to hide something that should never be there in the first place.

Sounds reasonable to me. 'Can you hide it' should not be the approach imo..
Comment 21 Katrin Fischer 2018-02-02 06:48:26 UTC
Can we all start working on a solution instead of chiming in that a feature added 2006 is bad? ;)
Comment 22 Katrin Fischer 2018-02-02 06:49:43 UTC
Sorry, 2011.
Comment 23 Brian 2018-12-18 01:42:56 UTC
Has any more progress been made on Bug 15851?

Carnegie Staff
Comment 24 Joy Nelson 2018-12-26 17:52:39 UTC
Katrin,
Currently this analytic feature only works where the leader7=s.  I'd like to propose the following changes to this feature to allow it be used by your library and others in a more standard method.

1. Allow the link to appear when leader7 =s or leader7=m.  Both monographs and serial records can have component parts and as such have children that should be displayed by this feature.  The Show analytics link is searching for bib-level:a (Monographic component part) and bib-level:b (Serial component part).

2. Add a search function to this display page that checks the index (Host-item) to see if any children are present. If so, then display the "Show Analytics Link".  This search would search for control number or title depending on the value of usecontrolnumber sys pref.  

3. Add a syspref for this method of analytic cataloging, much like we have for Easy Analytics and 'use control number'.  Allow libraries the ability to turn off the analytic cataloging if they don't use it.  Call it "ShowLinktoChildfromParent"?  

Your thoughts?
joy
Comment 25 Katrin Fischer 2019-02-27 06:49:11 UTC
Hi Joy, 

sorry, I missed getting back to this :(

(In reply to Joy Nelson from comment #24)
> Katrin,
> Currently this analytic feature only works where the leader7=s.  I'd like to
> propose the following changes to this feature to allow it be used by your
> library and others in a more standard method.
> 
> 1. Allow the link to appear when leader7 =s or leader7=m.  Both monographs
> and serial records can have component parts and as such have children that
> should be displayed by this feature.  The Show analytics link is searching
> for bib-level:a (Monographic component part) and bib-level:b (Serial
> component part).

Yes, that makes sense. Actually we have that link in some custom XSLT, but use a different class to allow changing visibility independently for m and s.

> 
> 2. Add a search function to this display page that checks the index
> (Host-item) to see if any children are present. If so, then display the
> "Show Analytics Link".  This search would search for control number or title
> depending on the value of usecontrolnumber sys pref.  

I would be totally ok with that. I just never figured out how to do this myself. Some help here would be great. I am not sure Host-item will work as an index or if a new index for $w in 773 would be needed for the controlnumber part.

> 3. Add a syspref for this method of analytic cataloging, much like we have
> for Easy Analytics and 'use control number'.  Allow libraries the ability to
> turn off the analytic cataloging if they don't use it.  Call it
> "ShowLinktoChildfromParent"?  

I am not sure about adding more and more prefs when CSS would work, but if we add the function in 2) it makes sense to have a real switch to avoid unnecessary processing.

I had some hope that [Bug 11175] Show the parent record's component parts in the detailed views would help resolve the issues or replace the current way, but it hasn't worked out.