Bug 18760 - Printable checkin alerts
Summary: Printable checkin alerts
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Alex Arnaud
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-08 15:20 UTC by Gaetan Boisson
Modified: 2018-10-28 19:46 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 18760 - Add item printable checkin alert field (9.08 KB, patch)
2017-06-13 12:27 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 18760 - Add item printable checkin alert field (14.87 KB, patch)
2017-09-18 15:32 UTC, Alex Arnaud
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Gaetan Boisson 2017-06-08 15:20:03 UTC
Our options right now to display messages at check in are as follow :

- put a note in itemnotes, which will display in red in the checked in items table
- write something in materials, which will display a proper alert, but dedicated to accompanying materials

A new feature is on the way to allow patrons to write notes themselves, on a specific issue but not on the item if i understood correctly, that's bug 14224.

This feature will create a new field in the items table: checkin_alert, to allow librarians to have arbitrary alerts displaying at checkin. These alerts will be printable.

Use case: the item is an ILL item, and when checking it back in, the librarian wants to have a printed slip with the address of the partner library the item should be sent back to.
Comment 1 Alex Arnaud 2017-06-13 12:27:52 UTC
Created attachment 64256 [details] [review]
Bug 18760 - Add item printable checkin alert field

Test plan:
  - Apply this patch(es),
  - update databases,
  - launch misc/devel/update_dbix_class_files.pl,
  - edit an item to have html or text content in chekin_alert (may
    need
    a koha to marc mapping for gui edition),
  - check out this item,
  - check it in: you should get a modal showing the alert,
  - check that you can print the alert.
Comment 2 Katrin Fischer 2017-07-09 15:07:13 UTC
Comment on attachment 64256 [details] [review]
Bug 18760 - Add item printable checkin alert field

Review of attachment 64256 [details] [review]:
-----------------------------------------------------------------

Hi,

I took a look at these patches, I agree a per item check-in note could be quite useful. But I have found some issues with the patch and have some concerns:

For the existing patch, see the splinter review notes and below:
- Changes to kohastructure.sql are missing.
- SQL should use AFTER/BEFORE to make sure the column is always added in the same spot.

General concern:
In MARC21 there is only one unmapped subfield left: $k To prevent people from unmapping important things and make this feature discoverable, we should at least provide a default mapping for new installations and a note for existing ones if $k (or UNIMARC equivalent) is already mapped.

But that makes me think: I wonder if this should really be part of the MARC record or if it wouldn't be better to have these kinds of notes in a separate table, manageable outside of the item editor. Example: What if we'd like to have another note for check-out? 

- We are running out of unused subfields.
- There is a possible privavy issue, because as soon as you add a Koha-to-MARC-mapping, the note field will be searchable in the OPAC (existing problem with itemnotes_nonpublic). 
- Also, it will get exported with the MARC exports and be visible on the MARC view if not set up correctly (given that the visibility settings now work correctly)

Maybe something to be discussed some more.

::: circ/print-alert.pl
@@ +1,4 @@
> +#!/usr/bin/perl
> +
> +
> +# Copyright 2008 LibLime

Copy and paste error?

@@ +18,5 @@
> +# You should have received a copy of the GNU General Public License
> +# along with Koha; if not, see <http://www.gnu.org/licenses>.
> +
> +use strict;
> +#use warnings; FIXME - Bug 2505

Should be Modern::Perl instead.
Comment 3 Katrin Fischer 2017-07-09 15:32:26 UTC
Also missing changes to deleted_items!
Comment 4 Alex Arnaud 2017-09-18 15:32:13 UTC
Created attachment 67185 [details] [review]
Bug 18760 - Add item printable checkin alert field

Test plan:
  - Apply this patch(es),
  - update databases,
  - launch misc/devel/update_dbix_class_files.pl,
  - edit an item to have html or text content in chekin_alert (may
    need
    a koha to marc mapping for gui edition),
  - check out this item,
  - check it in: you should get a modal showing the alert,
  - check that you can print the alert.

Test plan #1:
  - Create a koha to marc mapping for the column checkin alert,
  - import an item with a checkin alert message,
  - check that the mapping is done
Comment 5 Alex Arnaud 2017-09-18 15:34:17 UTC
The last replacement patch fix Katrin's QA comment. Also i created a default mapping for MARC21 and UNIMARC
Comment 6 Alex Buckley 2017-10-03 23:43:23 UTC
Hi Alex

Following the first test plan in comment 4 I notice that when you click to edit an item the checkin alert input is empty even if you have entered a checkn alert. And then when you checkout and then checkin an item no alert modal box is displayed.
Comment 7 Katrin Fischer 2017-10-22 10:04:21 UTC
The mapping for UNIMARC is wrong - 952 vs 995. 

I am still not in favour of using our last available mapping for this, I think having a separate note storage (outside MARC) would be better for the future. But this is something more people should give their opinion on, not just me :)