https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43346 Bug ID: 43346 Summary: MarkLostItemsAsReturned does not work without userenv set Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: andreas.jonsson@kreablo.se QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle@bywatersolutions.com Target Milestone: --- If MarkLostItemsAsReturned is called when there is no userenv set it fails because "checkin_library" is set from userenv. $issue->checkin_library( C4::Context->userenv->{'branch'} ); I have developed an Opac payment plugin with a callback to a public REST endpoint, that is authenticated by a cryptographic token (similar to the easy payments plugin). This callback is executed without userenv and will therefore occasionally fail. As the item is lost, it is unclear what the checkin_library should signify. Setting it the the branchcode on the issue seems just as appropriate. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.