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

Martin Renvoize <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #157417|0                           |1
        is obsolete|                            |

--- Comment #2 from Martin Renvoize <[email protected]> ---
Created attachment 157418
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=157418&action=edit
Bug 35105: Fix patron accessor in Illrequest.pm

Patron is nullable, so we need to consider undef return

Test plan, k-t-d:
1) Install FreeForm and enable ILLmodule, run:
bash <(curl -s
https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh)
2) Visit /cgi-bin/koha/ill/ill-requests.pl
3) Create 'New ILL request'
4) Select the request type, input cardnumber '42' and select a library
5) Hit 'Create'
6) Manage the request created just now: click the request id or 'manage
request' button from the table
7) Click "Edit request" from the top actions toolbar
8a) Input text in Patron ID e.g. 'asdasdasf'. Notice you get redirected to the
table - now renders correctly.
8b) Input a patron id that doesn't exist e.g. '987654'. Notice you get an error
upon saving "FK Constraint error",
go back to the table and verify it renders correctly.

In both instances, the request is saved with borrowernumber as NULL,
this was preventing the table from rendering because the 'patron' API
embed was trying to retrieve a patron - getting an empty resultset instead
of undef.

Signed-off-by: Martin Renvoize <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to