[Koha-bugs] [Bug 24754] UserEnv not set for ISLDI requests

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Mar 6 13:16:53 CET 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24754

Nick Clemens <nick at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #99773|0                           |1
        is obsolete|                            |
 Attachment #100006|0                           |1
        is obsolete|                            |
 Attachment #100035|0                           |1
        is obsolete|                            |

--- Comment #14 from Nick Clemens <nick at bywatersolutions.com> ---
Created attachment 100269
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=100269&action=edit
Bug 24754: Set userenv for ilsdi requests

Currently ILSDI scripts do not have a userenv set. This affects both
action_logs and statistics.

For action_logs we either get no user or, if there is an active session, we use
that one. This can have unintended consequences and we should explicitly set
the env so that system user (0) is recorded

For statistics we need to specify a branch to record for actions like renewals.
With bug 24759 we add an items method for this. We should take advantage of
this method and use the 'opac' interface as the ilsdi scripts live there.

To test:
1 - Enable ILSDI in systempreferences
2 - Checkout an item to a patron
3 - Enable Renewal logs
4 - Ensure you will be able to renew the item several times
5 - Open an incognito/private browser
6 - Renew item via ilsdi:
   
http://localhost:8080/cgi-bin/koha/ilsdi.pl?service=RenewLoan&patron_id=5&item_id=1128
7 - Check action logs, interface may be random, user should be 0, if not make
sure the user in step 9 is a different one
8 - In private browser open a new tab
9 - Sign in to staff client
10 - Return to other tab
11 - Refresh page to repeat renewal
12 - Check action_logs
13 - The second renewal indicates it was renewed via intranet by logged in
staff member
14 - Apply patch
15 - restart_all
16 - Ensure staff client still signed in
17 - Repeate renewal again
18 - Check logs, renewal now indicates opac again (as it should), user is 0
even if logged in on other tab

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list