Bug 24530 - Show the number of title notes in the tab label on the OPAC detail page
Summary: Show the number of title notes in the tab label on the OPAC detail page
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Marcel de Rooy
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 24617
  Show dependency treegraph
 
Reported: 2020-01-29 13:56 UTC by Marcel de Rooy
Modified: 2020-05-16 18:39 UTC (History)
5 users (show)

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


Attachments
Bug 24530: Show a number for title notes on opac-detail (1.71 KB, patch)
2020-01-29 14:45 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 24530: Show a number for title notes on opac-detail (1.71 KB, patch)
2020-02-03 19:01 UTC, David Nind
Details | Diff | Splinter Review
Bug 24530: (QA follow-up) Include Syndetics in notes count (1.96 KB, patch)
2020-02-10 08:10 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 24530: Show a number for title notes on opac-detail (1.77 KB, patch)
2020-02-14 17:45 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 24530: (QA follow-up) Include Syndetics in notes count (1.98 KB, patch)
2020-02-14 17:45 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 24530: (QA follow-up) Add missing filter (1.57 KB, patch)
2020-02-17 14:07 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2020-01-29 13:56:02 UTC
Although we do not show an empty title notes tab [see bug 10349], the number of notes might still be interesting just as we do for other tabs on the detail page like holdings, subscriptions, comments, etc. Intuitively, you are also inclined to think that there are no notes when you see a number after holdings and no number after descriptions etc.
Comment 1 Marcel de Rooy 2020-01-29 14:12:49 UTC
Just wondering about this line in the opac-detail template:

                        [% IF ( MARCNOTES || notes || ( SyndeticsEnabled && SyndeticsSummary && SYNDETICS_SUMMARY )) %]

Where do we fill notes? Cant find that at first.
Comment 2 Marcel de Rooy 2020-01-29 14:45:21 UTC
Created attachment 98084 [details] [review]
Bug 24530: Show a number for title notes on opac-detail

A number (just as on most other tabs) tells more than a boolean (i.e. the
tab does not appear for zero marc notes). Intuitively, you might be misled
by "Holdings (1), Descriptions" and think there are none.

Test plan:
Verify that the number of title notes on opac detail page matches your
expectations.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 3 David Nind 2020-02-03 19:01:48 UTC
Created attachment 98356 [details] [review]
Bug 24530: Show a number for title notes on opac-detail

A number (just as on most other tabs) tells more than a boolean (i.e. the
tab does not appear for zero marc notes). Intuitively, you might be misled
by "Holdings (1), Descriptions" and think there are none.

Test plan:
Verify that the number of title notes on opac detail page matches your
expectations.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 David Nind 2020-02-03 19:03:14 UTC
I have no particular view on whether to display the number of title notes or not.
Comment 5 Marcel de Rooy 2020-02-04 07:03:27 UTC
(In reply to David Nind from comment #3)
> Signed-off-by: David Nind <david@davidnind.com>

Thanks
Comment 6 Katrin Fischer 2020-02-09 13:04:16 UTC
I have some worries about this one:

- Changes only OPAC, not staff
- Might show a false 0 in some context:

[% IF ( MARCNOTES || notes || ( SyndeticsEnabled && SyndeticsSummary && SYNDETICS_SUMMARY )) %]
<li id="tab_descriptions"> <a href="#descriptions">Title notes ( [% MARCNOTES.size %] )</a></li>

If there are notes and/or Syndetics content, but no MARCNOTES, the tab will display 0, looking 'empty' to the patrons.
Comment 7 Katrin Fischer 2020-02-09 13:06:25 UTC
I think the nicest way might be to include the Syndetics and note content in the number. If we can't tell for syndetics, maybe we could do something like: 1+

5 5xx displaying + Syndetics content available = 5+ ?

Or only show the number if Syndetics is not active.
Comment 8 Marcel de Rooy 2020-02-10 08:04:03 UTC
(In reply to Marcel de Rooy from comment #1)
> Just wondering about this line in the opac-detail template:
> 
>                         [% IF ( MARCNOTES || notes || ( SyndeticsEnabled &&
> SyndeticsSummary && SYNDETICS_SUMMARY )) %]
> 
> Where do we fill notes? Cant find that at first.

notes is coming from biblio.notes; but still cant find the place where it is passed into the template
Comment 9 Marcel de Rooy 2020-02-10 08:04:56 UTC
(In reply to Katrin Fischer from comment #7)
> I think the nicest way might be to include the Syndetics and note content in
> the number. If we can't tell for syndetics, maybe we could do something
> like: 1+
> 
> 5 5xx displaying + Syndetics content available = 5+ ?
> 
> Or only show the number if Syndetics is not active.

If there is a Syndetics summary, I will add +1. It is a html blob.
Comment 10 Marcel de Rooy 2020-02-10 08:10:32 UTC
Created attachment 98635 [details] [review]
Bug 24530: (QA follow-up) Include Syndetics in notes count

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested by enabling the prefs and passing contents to the template var.
Comment 11 Marcel de Rooy 2020-02-10 08:11:55 UTC
(In reply to Katrin Fischer from comment #6)

Thanks for QAing.

> - Changes only OPAC, not staff

Will open a new report for that.


> - Might show a false 0 in some context:
> 
> [% IF ( MARCNOTES || notes || ( SyndeticsEnabled && SyndeticsSummary &&
> SYNDETICS_SUMMARY )) %]
> <li id="tab_descriptions"> <a href="#descriptions">Title notes ( [%
> MARCNOTES.size %] )</a></li>
> 
> If there are notes and/or Syndetics content, but no MARCNOTES, the tab will
> display 0, looking 'empty' to the patrons.

Good point. Adjusted in follow-up.
Comment 12 Katrin Fischer 2020-02-14 17:45:03 UTC
Created attachment 98992 [details] [review]
Bug 24530: Show a number for title notes on opac-detail

A number (just as on most other tabs) tells more than a boolean (i.e. the
tab does not appear for zero marc notes). Intuitively, you might be misled
by "Holdings (1), Descriptions" and think there are none.

Test plan:
Verify that the number of title notes on opac detail page matches your
expectations.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 13 Katrin Fischer 2020-02-14 17:45:06 UTC
Created attachment 98993 [details] [review]
Bug 24530: (QA follow-up) Include Syndetics in notes count

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested by enabling the prefs and passing contents to the template var.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 14 Katrin Fischer 2020-02-14 17:45:30 UTC
Hope to see a patch for bug 24617 soon too :)
Comment 15 Marcel de Rooy 2020-02-17 07:34:42 UTC
(In reply to Katrin Fischer from comment #12)
> Signed-off-by: David Nind <david@davidnind.com>
> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Thx David and Katrin
Comment 16 Martin Renvoize 2020-02-17 11:32:08 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 17 Jonathan Druart 2020-02-17 13:46:02 UTC
Jenkins is complaining about a missing filter:
xt/find-missing-filters.t, koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt line 573
Comment 18 Marcel de Rooy 2020-02-17 14:07:20 UTC
Created attachment 99091 [details] [review]
Bug 24530: (QA follow-up) Add missing filter

Jenkins is complaining about a missing filter:
xt/find-missing-filters.t, koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt line 573

The variable is just filled in the template but lets make Jenkins happy.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 19 Martin Renvoize 2020-02-17 14:52:52 UTC
Followup pushed, thanks Marcel.. you beat me to it :)
Comment 20 Joy Nelson 2020-03-05 01:31:04 UTC
Enhancement not pushed to 19.11.x