Bug 15492 - Stand alone self check-in tool
Summary: Stand alone self check-in tool
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Self checkout (show other bugs)
Version: master
Hardware: All All
: P5 - low new feature (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Josef Moravec
URL: http://devs.bywatersolutions.com/proj...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-06 16:17 UTC by Nicole C. Engard
Modified: 2018-02-21 20:15 UTC (History)
6 users (show)

See Also:
Change sponsored?: 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 15492: Add the SelfCheckInModule syspref (3.22 KB, patch)
2017-11-15 17:47 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 15492: Add SCI module (19.87 KB, patch)
2017-11-15 17:47 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 15492: Add SCI module (21.09 KB, patch)
2017-11-15 19:39 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 15492: Add SCI module (21.10 KB, patch)
2017-11-15 19:53 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 15492: Add SCI module (21.09 KB, patch)
2017-11-16 12:20 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 15492: Add the SelfCheckInModule syspref (3.26 KB, patch)
2017-12-08 20:05 UTC, David Bourgault
Details | Diff | Splinter Review
Bug 15492: Add SCI module (21.12 KB, patch)
2017-12-08 20:05 UTC, David Bourgault
Details | Diff | Splinter Review
Bug 15492: Add the SelfCheckInModule syspref (3.32 KB, patch)
2017-12-21 17:59 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 15492: Add SCI module (21.17 KB, patch)
2017-12-21 17:59 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 15492 [QA Followup] - Reset SCI if idle for 30 seconds (2.43 KB, patch)
2017-12-21 17:59 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 15492: Add the SelfCheckInModule syspref (3.33 KB, patch)
2017-12-27 16:08 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 15492: Add SCI module (21.20 KB, patch)
2017-12-27 16:08 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 15492: (QA follow-up) Reset SCI if idle for 30 seconds (2.49 KB, patch)
2017-12-27 16:09 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 15492: New sysprefs and permissions (11.28 KB, patch)
2017-12-27 16:09 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 15492: Make existing code aware of new self_check* permissions (10.26 KB, patch)
2017-12-27 16:09 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 15492: Make SCI use its own sysprefs and CSS file (9.98 KB, patch)
2017-12-27 16:09 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 15492: Display nicer message on data corruption (1.98 KB, patch)
2017-12-27 16:09 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 15492: Add the SelfCheckInModule syspref (3.33 KB, patch)
2018-02-21 20:13 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 15492: Add SCI module (21.26 KB, patch)
2018-02-21 20:14 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 15492: (QA follow-up) Reset SCI if idle for 30 seconds (2.49 KB, patch)
2018-02-21 20:14 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 15492: New sysprefs and permissions (11.30 KB, patch)
2018-02-21 20:14 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 15492: Make existing code aware of new self_check* permissions (10.26 KB, patch)
2018-02-21 20:14 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 15492: Make SCI use its own sysprefs and CSS file (9.98 KB, patch)
2018-02-21 20:14 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 15492: Display nicer message on data corruption (1.98 KB, patch)
2018-02-21 20:14 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 15492: Add KOHA_VERSION to included .css and .js (2.43 KB, patch)
2018-02-21 20:14 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nicole C. Engard 2016-01-06 16:17:29 UTC
This would work very similarly to the current check-in module on the staff client, except that patron information won’t be displayed. Once all books are scanned in for check-in, a “Finish” button can be clicked in order to return to the main shelf-checkout screen to login with ID and checkout books as normal.

Work to be done:
1) Create new sco-checkin.pl script
2) Create new sco-checkin.tt template
3) Make sco-checkin.pl accept barcodes and mark items as returned
4) If item cannot be returned ( i.e. AddReturn returns 0 ) request that the item be taken to a library for returning.




Seeking Co-sponsors: http://devs.bywatersolutions.com/projects/self-check-module-stand-alone-check-in/
Comment 1 mshafer@ckls.org 2016-10-13 16:24:36 UTC
This development would be great for schools. With severe budget cuts, many school libraries are only staffed a few hours a week. So much of the library circulation is done with self-checkout. In elementary schools the checkout process is simple and easy to use. However, using the self checkout as it is now for CHECKINs it too complicated for grade schoolers. self checkin: Log Into SelfCheckout with patron number, scan card, select Return this Item; Renew this Item or Cancel. A stand alone checking would be just what this situation needs!
Comment 2 Tomás Cohen Arazi 2017-11-15 17:47:23 UTC
Created attachment 69165 [details] [review]
Bug 15492: Add the SelfCheckInModule syspref
Comment 3 Tomás Cohen Arazi 2017-11-15 17:47:30 UTC Comment hidden (obsolete)
Comment 4 Owen Leonard 2017-11-15 18:54:55 UTC
This is missing from sci-main.tt:

<script type="text/javascript">
    function _(s) { return s } // dummy function for gettext
</script>

(see sco-main.tt for comparison)
Comment 5 Tomás Cohen Arazi 2017-11-15 19:39:34 UTC Comment hidden (obsolete)
Comment 6 Tomás Cohen Arazi 2017-11-15 19:53:00 UTC Comment hidden (obsolete)
Comment 7 Tomás Cohen Arazi 2017-11-16 12:20:02 UTC Comment hidden (obsolete)
Comment 8 Tomás Cohen Arazi 2017-11-16 12:21:45 UTC
(In reply to Owen Leonard from comment #4)
> This is missing from sci-main.tt:
> 
> <script type="text/javascript">
>     function _(s) { return s } // dummy function for gettext
> </script>
> 
> (see sco-main.tt for comparison)

I've re-introduced it, along with several other tiny fixes/changes, including the help modal.
Comment 9 David Bourgault 2017-12-08 20:05:28 UTC Comment hidden (obsolete)
Comment 10 David Bourgault 2017-12-08 20:05:34 UTC Comment hidden (obsolete)
Comment 11 Kyle M Hall 2017-12-21 17:59:47 UTC Comment hidden (obsolete)
Comment 12 Kyle M Hall 2017-12-21 17:59:54 UTC Comment hidden (obsolete)
Comment 13 Kyle M Hall 2017-12-21 17:59:57 UTC Comment hidden (obsolete)
Comment 14 Jonathan Druart 2017-12-22 15:22:46 UTC
All works great, few concerns:
1. Code in C4::Auth must be simplify and merged with existing one (you c/p 25  lines)
2. Only the AutoSelfCheckID should be able to connect to sci-main.pl, we should apply the same behaviour as self-checkout (no?)
3. Description (and name) of the permission self_checkout must be adapted
4. I do not know how SCOMainUserBlock is used, but it may be wrong to display it for SCI (?)
5. "Data corruption detected" => Are we sure we want to display that at the OPAC?
6. If error code is not known, we should display it instead of ignore it (BLOCK error_message)
Comment 15 Tomás Cohen Arazi 2017-12-27 16:08:51 UTC
Created attachment 70173 [details] [review]
Bug 15492: Add the SelfCheckInModule syspref

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 16 Tomás Cohen Arazi 2017-12-27 16:08:56 UTC
Created attachment 70174 [details] [review]
Bug 15492: Add SCI module

This patch adds the SCI module, and adapts C4::Auth to know about it.

The current behaviour is:
- Requires admin user initialization/login
- Uses the logged users' library
- A form allows to scan multiple barcodes
- A button sends the barcode list to the controller
  to batch perform the checkins
- Successful and failed checkins are sent to the template
- Results are displayed
- Logout link

To test:
- Apply this patches
- Make sure you upgrade:
  $ kshell
 k$ perl installer/data/mysql/updatedatabase.pl
- Have 'SelfCheckInModule' disabled
- Go to http://kohadev.myDNSname.org:8080/cgi-bin/koha/sci/sci-main.pl [1]
=> SUCCESS: You are rejected because the feature is disabled
- Enable 'SelfCheckInModule'
- Go to the previous URL
=> SUCCESS: You are required to login
- Login with a user WITHOUT self_checkout permissions
=> SUCCESS: You are not allowed to log into the Self check-in module.
- Login with a user WITH self_checkour permissions
=> SUCCESS: You gain access, and are presented the UI
- Go through the several options
=> SUCCESS: All works as it should
- Click the 'Help' link
=> SUCCESS: A help text is displayed on a modal
- Sign off :-D

- Bonus points:
  $ kshell
 k$ qa -c 2 -v 2
=> SUCCESS: All tests green

[1] Adjust to your dev's OPAC setup

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 17 Tomás Cohen Arazi 2017-12-27 16:09:00 UTC
Created attachment 70175 [details] [review]
Bug 15492: (QA follow-up) Reset SCI if idle for 30 seconds

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 18 Tomás Cohen Arazi 2017-12-27 16:09:04 UTC
Created attachment 70176 [details] [review]
Bug 15492: New sysprefs and permissions

In order to make this module unrelated to the SCO module, this
patch introduces the following sysprefs:

- SelfCheckInMainUserBlock
- SelfCheckInModuleUserID
- SelfCheckInTimeout
- SelfCheckInUserCSS
- SelfCheckInUserJS

It also adds a new user flag and sub-permission:

- self_check => self_checkin_module

and moves the circulate => self_checkout permission into

- self_check => self_checkout_module

Descriptions are adjusted accordingly.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 19 Tomás Cohen Arazi 2017-12-27 16:09:08 UTC
Created attachment 70177 [details] [review]
Bug 15492: Make existing code aware of new self_check* permissions

This patch makes the existing code for SCO use the new permissions schema
for self check modules. Specifically addresses this change:

  circulate  => self_checkout
becomes
  slef_check => self_checkout_module

about.pl checks are dejusted too.

get_template_and_user gets refactored to avoid code duplication and the
conditions are adjusted for the new permissions.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 20 Tomás Cohen Arazi 2017-12-27 16:09:12 UTC
Created attachment 70178 [details] [review]
Bug 15492: Make SCI use its own sysprefs and CSS file

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 21 Tomás Cohen Arazi 2017-12-27 16:09:15 UTC
Created attachment 70179 [details] [review]
Bug 15492: Display nicer message on data corruption

This patch hides scary messages and changes the wording for a more
idiomatic approach. Thanks to Nick :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 22 Tomás Cohen Arazi 2017-12-27 16:16:08 UTC
(In reply to Jonathan Druart from comment #14)
> All works great, few concerns:
> 1. Code in C4::Auth must be simplify and merged with existing one (you c/p
> 25  lines)

Done.

> 2. Only the AutoSelfCheckID should be able to connect to sci-main.pl, we
> should apply the same behaviour as self-checkout (no?)

The behaviour for SCI is different. Users with SCI permission can only access SCI in the OPAC. This should be carefully documented in the manual (it is explicitly mentioned in the permissions page).

> 3. Description (and name) of the permission self_checkout must be adapted

Done. I've moved self check-related sysprefs like this:

- selc_check
  * self_checkin_module
  * self_checkout_module

Existing code has been adjusted. This needs to be tested just in case, that's why I moved it back to NSO (it is a trivial change, though).

> 4. I do not know how SCOMainUserBlock is used, but it may be wrong to
> display it for SCI (?)

I did what I planned for a followup bug: making SCI have its own set of sysprefs. I was going to do it anyway, but cleaner on the same patchset. Good catch.

> 5. "Data corruption detected" => Are we sure we want to display that at the
> OPAC?
> 6. If error code is not known, we should display it instead of ignore it
> (BLOCK error_message)

Both addessed with Nick's idiomatic aid.
Comment 23 Tomás Cohen Arazi 2017-12-27 16:23:40 UTC
(In reply to Jonathan Druart from comment #14)
> All works great, few concerns:
> 2. Only the AutoSelfCheckID should be able to connect to sci-main.pl, we
> should apply the same behaviour as self-checkout (no?)

FTR, self check users should be 'marked' by a flag somewhere (hardcoded category types, a flag in the patron category, on the borrowers table, etc) instead of doing complex tricks. This way we would just do

 if ( $patron->is_self_check_user ) {
     # handle it
 }

instead. Just my 2 cents.
Comment 24 Tomás Cohen Arazi 2017-12-27 21:54:24 UTC
Setting as signed-off so another QA round takes place.
Comment 25 Josef Moravec 2018-02-21 19:16:14 UTC
This patchset does not apply on current master. Also, could you please add KOHA_VERSION to included js and css files in templates?
Comment 26 Tomás Cohen Arazi 2018-02-21 20:13:59 UTC
Created attachment 72053 [details] [review]
Bug 15492: Add the SelfCheckInModule syspref

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 27 Tomás Cohen Arazi 2018-02-21 20:14:05 UTC
Created attachment 72054 [details] [review]
Bug 15492: Add SCI module

This patch adds the SCI module, and adapts C4::Auth to know about it.

The current behaviour is:
- Requires admin user initialization/login
- Uses the logged users' library
- A form allows to scan multiple barcodes
- A button sends the barcode list to the controller
  to batch perform the checkins
- Successful and failed checkins are sent to the template
- Results are displayed
- Logout link

To test:
- Apply this patches
- Make sure you upgrade:
  $ kshell
 k$ perl installer/data/mysql/updatedatabase.pl
- Have 'SelfCheckInModule' disabled
- Go to http://kohadev.myDNSname.org:8080/cgi-bin/koha/sci/sci-main.pl [1]
=> SUCCESS: You are rejected because the feature is disabled
- Enable 'SelfCheckInModule'
- Go to the previous URL
=> SUCCESS: You are required to login
- Login with a user WITHOUT self_checkout permissions
=> SUCCESS: You are not allowed to log into the Self check-in module.
- Login with a user WITH self_checkour permissions
=> SUCCESS: You gain access, and are presented the UI
- Go through the several options
=> SUCCESS: All works as it should
- Click the 'Help' link
=> SUCCESS: A help text is displayed on a modal
- Sign off :-D

- Bonus points:
  $ kshell
 k$ qa -c 2 -v 2
=> SUCCESS: All tests green

[1] Adjust to your dev's OPAC setup

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 28 Tomás Cohen Arazi 2018-02-21 20:14:11 UTC
Created attachment 72055 [details] [review]
Bug 15492: (QA follow-up) Reset SCI if idle for 30 seconds

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 29 Tomás Cohen Arazi 2018-02-21 20:14:20 UTC
Created attachment 72056 [details] [review]
Bug 15492: New sysprefs and permissions

In order to make this module unrelated to the SCO module, this
patch introduces the following sysprefs:

- SelfCheckInMainUserBlock
- SelfCheckInModuleUserID
- SelfCheckInTimeout
- SelfCheckInUserCSS
- SelfCheckInUserJS

It also adds a new user flag and sub-permission:

- self_check => self_checkin_module

and moves the circulate => self_checkout permission into

- self_check => self_checkout_module

Descriptions are adjusted accordingly.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 30 Tomás Cohen Arazi 2018-02-21 20:14:27 UTC
Created attachment 72057 [details] [review]
Bug 15492: Make existing code aware of new self_check* permissions

This patch makes the existing code for SCO use the new permissions schema
for self check modules. Specifically addresses this change:

  circulate  => self_checkout
becomes
  slef_check => self_checkout_module

about.pl checks are dejusted too.

get_template_and_user gets refactored to avoid code duplication and the
conditions are adjusted for the new permissions.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 31 Tomás Cohen Arazi 2018-02-21 20:14:33 UTC
Created attachment 72058 [details] [review]
Bug 15492: Make SCI use its own sysprefs and CSS file

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 32 Tomás Cohen Arazi 2018-02-21 20:14:40 UTC
Created attachment 72059 [details] [review]
Bug 15492: Display nicer message on data corruption

This patch hides scary messages and changes the wording for a more
idiomatic approach. Thanks to Nick :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 33 Tomás Cohen Arazi 2018-02-21 20:14:46 UTC
Created attachment 72060 [details] [review]
Bug 15492: Add KOHA_VERSION to included .css and .js

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>