Bug 15492 - Stand alone self check-in tool
Summary: Stand alone self check-in tool
Status: CLOSED FIXED
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: release-notes-needed
Depends on:
Blocks: 20479 20480 20632
  Show dependency treegraph
 
Reported: 2016-01-06 16:17 UTC by Nicole C. Engard
Modified: 2018-12-03 20:03 UTC (History)
7 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
Bug 15492: Add the SelfCheckInModule syspref (3.37 KB, patch)
2018-02-25 08:53 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 15492: Add SCI module (21.28 KB, patch)
2018-02-25 08:53 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 15492: (QA follow-up) Reset SCI if idle for 30 seconds (2.53 KB, patch)
2018-02-25 08:53 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 15492: New sysprefs and permissions (11.29 KB, patch)
2018-02-25 08:53 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 15492: Make existing code aware of new self_check* permissions (10.27 KB, patch)
2018-02-25 08:53 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 15492: Make SCI use its own sysprefs and CSS file (10.03 KB, patch)
2018-02-25 08:53 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 15492: Display nicer message on data corruption (2.03 KB, patch)
2018-02-25 08:54 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 15492: Add KOHA_VERSION to included .css and .js (2.48 KB, patch)
2018-02-25 08:54 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 15492: (QA followup) Make page refresh work correctly (2.54 KB, patch)
2018-03-19 19:32 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>
Comment 34 Josef Moravec 2018-02-25 08:53:25 UTC
Created attachment 72176 [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>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 35 Josef Moravec 2018-02-25 08:53:33 UTC
Created attachment 72177 [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>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 36 Josef Moravec 2018-02-25 08:53:39 UTC
Created attachment 72178 [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>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 37 Josef Moravec 2018-02-25 08:53:44 UTC
Created attachment 72179 [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>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 38 Josef Moravec 2018-02-25 08:53:50 UTC
Created attachment 72180 [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>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 39 Josef Moravec 2018-02-25 08:53:56 UTC
Created attachment 72181 [details] [review]
Bug 15492: Make SCI use its own sysprefs and CSS file

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

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 40 Josef Moravec 2018-02-25 08:54:01 UTC
Created attachment 72182 [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>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 41 Josef Moravec 2018-02-25 08:54:07 UTC
Created attachment 72183 [details] [review]
Bug 15492: Add KOHA_VERSION to included .css and .js

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

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 42 Jonathan Druart 2018-02-26 15:25:56 UTC
248             //Increment the idle time counter every minute.
249             var idleInterval = setInterval(timerIncrement, 1000); // 1 second
Comment 43 Jonathan Druart 2018-02-26 15:32:24 UTC
 89         catch {
 90             push @errors, { barcode => $barcode, messages => 'unknown_error' };
 91         };

=> We should at least log $@
Comment 44 Jonathan Druart 2018-02-26 15:39:11 UTC
* Hit /cgi-bin/koha/sci/sci-main.pl:
  ReferenceError: mungeHistory is not defined

* Timeout does not seem to work

Since there is a JS error I will continue the tests when it's fixed.
Comment 45 Tomás Cohen Arazi 2018-03-19 19:32:15 UTC
Created attachment 73097 [details] [review]
Bug 15492: (QA followup) Make page refresh work correctly

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 46 Jonathan Druart 2018-03-26 20:34:39 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 47 Jonathan Druart 2018-03-26 23:06:26 UTC
I have added a fix for koha-misc4dev:
  commit 4fd7e11bab2da7bc4601f3c5591141366acbef30
  Fix insert_data.pl for self_checkout permission
Comment 48 Jonathan Druart 2018-03-26 23:14:40 UTC
There is something wrong with commit d6e8e88249914531d8b01f35200de6a8a4692b89
    Bug 15492: Make existing code aware of new self_check* permissions

% prove t/db_dependent/Search/History.t
t/db_dependent/Search/History.t .. 12/27 A context appears to have been destroyed without first calling release().
Based on $@ it does not look like an exception was thrown (this is not always
a reliable test)

This is a problem because the global error variables ($!, $@, and $?) will
not be restored. In addition some release callbacks will not work properly from
inside a DESTROY method.

Here are the context creation details, just in case a tool forgot to call
release():
  File: t/db_dependent/Search/History.t
  Line: 478
  Tool: Test::More::subtest

Cleaning up the CONTEXT stack...
# Test ended with extra hubs on the stack!
    # Looks like you planned 27 tests but ran 26.
t/db_dependent/Search/History.t .. Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 1/27 subtests 

Test Summary Report
-------------------
t/db_dependent/Search/History.t (Wstat: 65280 Tests: 26 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 27 tests but ran 26.
Files=1, Tests=26,  2 wallclock secs ( 0.02 usr  0.01 sys +  1.09 cusr  0.82 csys =  1.94 CPU)
Result: FAIL
Comment 49 Jonathan Druart 2018-03-27 14:49:25 UTC
(In reply to Jonathan Druart from comment #48)

Fixed by the patch on bug 20479
Comment 50 Jonathan Druart 2018-03-27 15:49:54 UTC
Test in C4::Auth does not test if the AutoSelfCheckID patron has self_checkout_module permission:

 185         if (
 186 # If the user logged in is the SCO user and they try to go out of the SCO module,
 187 # log the user out removing the CGISESSID cookie
 188                $in->{template_name} !~ m|sco/|
 189             && $user
 190             && C4::Context->preference('AutoSelfCheckID')
 191             && $user eq C4::Context->preference('AutoSelfCheckID')
 192           )
 193         {
 194             $kick_out = 1;
 195         }
Comment 51 Nick Clemens 2018-04-23 22:49:02 UTC
Awesome work all, enhancement, not backported for stable