Bug 13547 - Item field 'Materials specified' would be useful to see in OPAC
Summary: Item field 'Materials specified' would be useful to see in OPAC
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Devinim
QA Contact: Testopia
URL:
Keywords: release-notes-needed
Depends on:
Blocks:
 
Reported: 2015-01-09 17:02 UTC by Christopher Brannon
Modified: 2020-05-18 15:19 UTC (History)
10 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
This enhancement allows you to make a new column visible on the OPAC. The new column shows the materials specified field after the call number column. You have to turn the column on in the "Columns settings" section.
Version(s) released in:
20.05.00


Attachments
Bug 13547: Item field 3 (Materials specified) would be useful to see on OPAC (3.59 KB, patch)
2020-03-05 15:04 UTC, Devinim
Details | Diff | Splinter Review
Bug 13547: Add item field 3 (Materials specified) to the OPAC holdings table (3.97 KB, patch)
2020-03-06 16:20 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 13547: (follow-up) Item field 'Materials specified' would be useful to see in OPAC (2.61 KB, patch)
2020-03-27 16:59 UTC, Devinim
Details | Diff | Splinter Review
Bug 13547: (follow-up) Item field 'Materials specified' would be useful to see in OPAC (2.60 KB, patch)
2020-03-27 17:13 UTC, Devinim
Details | Diff | Splinter Review
Bug 13547: (follow-up) Item field 'Materials specified' would be useful to see in OPAC (2.64 KB, patch)
2020-04-17 15:38 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 13547: Add item field 3 (Materials specified) to the OPAC holdings table (4.02 KB, patch)
2020-04-18 01:54 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 13547: (follow-up) Item field 'Materials specified' would be useful to see in OPAC (2.70 KB, patch)
2020-04-18 01:54 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 13547: (follow-up) Improve POD for template plugin (3.17 KB, patch)
2020-05-06 07:31 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 13547: (QA follow-up) Add basic tests (1.37 KB, patch)
2020-05-06 07:51 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Brannon 2015-01-09 17:02:44 UTC
The Materials specified (field 3) is show on the staff catalog in each item row in the record view, but not on the patron side.  This would be helpful to see on the patron side.

As it is now, patrons can see one general description of items in the bib record from field 300e.  However, if there were some minor discrepancies between items (fewer discs, no bonus disc), your choices here are to either hope no one cares, or create a separate bib record.  With this item field showing, you could list minor material differences.

Christopher
Comment 1 Katrin Fischer 2015-01-12 06:41:21 UTC
I think it would be good to make this optional and not turn on by default for existing installation as the field might have been used to store informaton that should not be visible for patrons in the OPAC in the past.
Comment 2 Christopher Brannon 2015-01-13 16:55:29 UTC
(In reply to Katrin Fischer from comment #1)
> I think it would be good to make this optional and not turn on by default
> for existing installation as the field might have been used to store
> informaton that should not be visible for patrons in the OPAC in the past.

Agreed.

Christopher
Comment 3 Paul A. 2015-06-20 22:34:32 UTC
Tested sandbox, modded to production 20 June 2015.

This allows the use of 952$3 (we use for e.g. v. hb [1384 p., 85 col. plates]) in the OPAC. It is already in staff.

/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/modules/opac-detail.tt

line 713 insert
[% IF itemdata_materials %]<th id="item_materials">Materials specified</th>[% END %] 

line 739 insert
[% IF itemdata_materials %]<td>[% ITEM_RESULT.materials %]</td>[% END %]

chown koha:koha, chmod 644


/usr/share/koha/opac/cgi-bin/opac/opac-detail.pl

line 513 add 'materials'
foreach (qw(ccode enumchron materials copynumber itemnotes uri)) {
                            ^^^^^^^^^

line 561 insert
itemdata_materials      => $itemfields{materials},

chown koha:koha, chmod 755
Comment 4 Marjorie Barry-Vila 2018-11-16 20:50:01 UTC
Hi,
With 18.05, item_materials is not in column configuration for holdingst.

could it be added?

Regards,

Marjorie
Comment 5 Katrin Fischer 2019-01-02 16:34:20 UTC
(In reply to Marjorie Barry-Vila from comment #4)

> With 18.05, item_materials is not in column configuration for holdingst.
> 
> could it be added?


+1
Comment 6 Devinim 2020-03-05 15:04:17 UTC
Created attachment 100199 [details] [review]
Bug 13547: Item field 3 (Materials specified) would be useful to see on OPAC

Test plan:
1- View a record with Materials specified (field 3) data in the opac
2- Apply patch
3- Log in to staff client
4- Home->Administration->Column Settings->OPAC->holdingst
5- Set item_materials visibility
6- Refresh OPAC page
7- Confirm that the materials specified column has been added after the Call number column.
Comment 7 Owen Leonard 2020-03-06 16:20:42 UTC
Created attachment 100279 [details] [review]
Bug 13547: Add item field 3 (Materials specified) to the OPAC holdings table

Test plan:

1- View a record with Materials specified (field 3) data in the opac
2- Apply patch
3- Log in to staff client
4- Home->Administration->Column Settings->OPAC->holdingst
5- Set item_materials visibility
6- Refresh OPAC page
7- Confirm that the materials specified column has been added after the
   Call number column.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 8 Katrin Fischer 2020-03-15 22:52:32 UTC
This patch works as expected, but there is a little catch: For libraries, that have used this field to add information that is patron privacy relevant (like the name of someone), this change might be problematic. I have seen this happening, as the field will show up on checkout/checkin in a prominent way. (When returned, hand over to X next or something like that).

Even when the materials column is hidden, it's still fully visible in the source code.

Would it be possible not to pass it to the template if the column configuration is set to not display it?
Comment 9 Christopher Brannon 2020-03-17 04:31:03 UTC
(In reply to Katrin Fischer from comment #8)
> This patch works as expected, but there is a little catch: For libraries,
> that have used this field to add information that is patron privacy relevant
> (like the name of someone), this change might be problematic. I have seen
> this happening, as the field will show up on checkout/checkin in a prominent
> way. (When returned, hand over to X next or something like that).
> 
> Even when the materials column is hidden, it's still fully visible in the
> source code.
> 
> Would it be possible not to pass it to the template if the column
> configuration is set to not display it?

Is it fair to withhold this functionality because some might be using it for something it wasn't intended for?  How many other fields are used in a similar fashion?  I can understand this caution on a field that was meant to hold sensitive information, but I am not sure about this one.  Maybe it could be suppressed with column configuration, but unless we treat other fields the same way, this suppression might get lost in future upgrades because it doesn't coincide with other column practices.
Comment 10 Katrin Fischer 2020-03-17 07:05:05 UTC
Hi Christopher,

I am not withholding anything - I've not set this to Failed QA even. Only checking if we might be able to fix it in an easy way before we push this.

The problem is, we only have one field right now that is not visible in the OPAC and shows up on checkin/circulation - so I wouldn't blame anyone using it for different purposes. I won't block this, but I felt it was worth asking.
Comment 11 Joy Nelson 2020-03-26 22:10:32 UTC
Koha developments most often (if not always) keep one eye towards current users as well as future users.  At times it's hard to balance the needs of a library (or libraries) and workflows that seem so important with the needs and workflows of the many.  The things that seem obvious to me are not always obvious to others.  I rely on the input of others in the community to give perspective on how other libraries operate.  I believe someone once said "show me a library with a mad scheme and I'll show you another with a madder one"! 

Speaking from someone with experience migrating thousands of libraries to Koha, I can confidently say that libraries have indeed used this field with the expectation that it was NOT visible in the OPAC.  There is the distinct possibility that patron information (or staff information/direction) is available in this field.  A number of libraries come to my mind who have been using Koha for years in a way that is built upon the original design (not visible in opac).  

If this is to be implemented and visible in the OPAC, it must be made so it is optional/configurable.
Comment 12 Christopher Brannon 2020-03-27 15:54:50 UTC
(In reply to Joy Nelson from comment #11)
> Koha developments most often (if not always) keep one eye towards current
> users as well as future users.  At times it's hard to balance the needs of a
> library (or libraries) and workflows that seem so important with the needs
> and workflows of the many.  The things that seem obvious to me are not
> always obvious to others.  I rely on the input of others in the community to
> give perspective on how other libraries operate.  I believe someone once
> said "show me a library with a mad scheme and I'll show you another with a
> madder one"! 
> 
> Speaking from someone with experience migrating thousands of libraries to
> Koha, I can confidently say that libraries have indeed used this field with
> the expectation that it was NOT visible in the OPAC.  There is the distinct
> possibility that patron information (or staff information/direction) is
> available in this field.  A number of libraries come to my mind who have
> been using Koha for years in a way that is built upon the original design
> (not visible in opac).  
> 
> If this is to be implemented and visible in the OPAC, it must be made so it
> is optional/configurable.

I guess then there should be a configuration.  Anything to move this forward.
Comment 13 Devinim 2020-03-27 16:59:21 UTC Comment hidden (obsolete)
Comment 14 Devinim 2020-03-27 17:13:52 UTC
Created attachment 102015 [details] [review]
Bug 13547: (follow-up) Item field 'Materials specified' would be useful to see in OPAC

We've changed the patch adding the possibility of control for its visibility at opac-detail.tt with is_hidden function added to the Koha/Template/Plugin/ColumnsSettings.pm file
Comment 15 Owen Leonard 2020-04-17 15:38:02 UTC
Created attachment 103172 [details] [review]
Bug 13547: (follow-up) Item field 'Materials specified' would be useful to see in OPAC

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 16 Devinim 2020-04-17 18:41:59 UTC
Thanks Owen
Comment 17 Katrin Fischer 2020-04-18 01:54:02 UTC
Thx a lot for the follow-up - I am really happy to see that this could be 'fixed'!

I really want to PQA on this and will attach signed-off patches. The only problem I see is that we don't have unit tests for the new method (that I am to blame for). I will leave this in Signed off hoping that a quick follow-up can be provided.
Comment 18 Katrin Fischer 2020-04-18 01:54:28 UTC
Created attachment 103188 [details] [review]
Bug 13547: Add item field 3 (Materials specified) to the OPAC holdings table

Test plan:

1- View a record with Materials specified (field 3) data in the opac
2- Apply patch
3- Log in to staff client
4- Home->Administration->Column Settings->OPAC->holdingst
5- Set item_materials visibility
6- Refresh OPAC page
7- Confirm that the materials specified column has been added after the
   Call number column.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 19 Katrin Fischer 2020-04-18 01:54:32 UTC
Created attachment 103189 [details] [review]
Bug 13547: (follow-up) Item field 'Materials specified' would be useful to see in OPAC

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 20 Martin Renvoize 2020-05-06 07:31:35 UTC
Created attachment 104402 [details] [review]
Bug 13547: (follow-up) Improve POD for template plugin
Comment 21 Martin Renvoize 2020-05-06 07:51:33 UTC
Created attachment 104403 [details] [review]
Bug 13547: (QA follow-up) Add basic tests
Comment 22 Martin Renvoize 2020-05-06 07:52:07 UTC
With those two followups adding tests and improving the POD I think we can safely PQA
Comment 23 Martin Renvoize 2020-05-06 08:12:22 UTC
https://wiki.koha-community.org/wiki/Holdings_data_fields_(9xx) likely needs updating to reflect this bug.
Comment 24 Katrin Fischer 2020-05-09 22:47:10 UTC
(In reply to Martin Renvoize from comment #23)
> https://wiki.koha-community.org/wiki/Holdings_data_fields_(9xx) likely needs
> updating to reflect this bug.

Updated.
Comment 25 Devinim 2020-05-10 18:50:49 UTC
Hi Katrin,
Bug number is wrong in the document.
Comment 26 Katrin Fischer 2020-05-10 20:51:50 UTC
(In reply to Devinim from comment #25)
> Hi Katrin,
> Bug number is wrong in the document.

Thank you - I guess I copied from the wrong tab. Now fixed!
Comment 27 Martin Renvoize 2020-05-12 10:47:27 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 28 Joy Nelson 2020-05-13 19:10:14 UTC
enhancement not backported to 19.11