Summary: | Missing firstnames should be gracefully ignored in ILL requests table | ||
---|---|---|---|
Product: | Koha | Reporter: | Magnus Enger <magnus> |
Component: | ILL | Assignee: | Magnus Enger <magnus> |
Status: | CLOSED FIXED | QA Contact: | Josef Moravec <josef.moravec> |
Severity: | minor | ||
Priority: | P5 - low | CC: | fridolin.somers, josef.moravec, martin.renvoize, nick |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 7317 | ||
Bug Blocks: | |||
Attachments: |
Bug 21585 - Ignore missing firstname in ILL requests table
Bug 21585 - Ignore missing firstname in ILL requests table Bug 21585: Ignore missing firstname in ILL requests table |
Description
Magnus Enger
2018-10-16 19:13:20 UTC
The JSON looks like this: "firstname":null,"surname":"Uppsala universitetsbibliotek" Created attachment 80679 [details] [review] Bug 21585 - Ignore missing firstname in ILL requests table To test: - Make sure you have a patron with just a surname and no firstname - Create an ILL request so that the name of this patron shows up in the Patron column of the ILL requests table - Before the patch, the name will display as "null Surname" - Apply the patch - Reload the ILL requests page - The name should now display as just "Surname" - Sign ye merrily off I can't replicate this on master now. I'm wondering if one of the ILL bugs that has been merged recently has inadvertently fixed it. Can you still replicate it Magnus? I can't reproduce this bug either. Thanks for testing, Andrew and Owen! I still see the problem, and I think I know what is happening: If you create a regular, adult type user and give it only a surname, the firstname field in the database will be the empty string. This will display fine in the Patron column of the "List requests" table. If you create a user that is of the Organization type, the field for firstname will not be displayed, and the database column will be NULL. This will display as "null" in the Patron column. Could you please check your borrowers.firstname columns and see if this could explain what you are seeing? Aha! You're right! Creating an organisational user then creating a request for them does indeed demonstrate the problem. I'll test your patch now and sign off. Created attachment 81686 [details] [review] Bug 21585 - Ignore missing firstname in ILL requests table To test: - Make sure you have a patron with just a surname and no firstname - Create an ILL request so that the name of this patron shows up in the Patron column of the ILL requests table - Before the patch, the name will display as "null Surname" - Apply the patch - Reload the ILL requests page - The name should now display as just "Surname" - Sign ye merrily off Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> Created attachment 81723 [details] [review] Bug 21585: Ignore missing firstname in ILL requests table To test: - Make sure you have a patron with just a surname and no firstname - Create an ILL request so that the name of this patron shows up in the Patron column of the ILL requests table - Before the patch, the name will display as "null Surname" - Apply the patch - Reload the ILL requests page - The name should now display as just "Surname" - Sign ye merrily off Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Awesome work all! Pushed to master for 18.11 Pushed to 18.05.x for 18.05.06 Pushed to 17.11.x for 17.11.13 |