To recreate: Have StoreLastBorrower enabled to store Last Returned By. Create account and leave cardnumber empty. Check out and return item with that account. Go to items detail page. See that Last Returned By and, if return is not anonymized, Last Borrower appears blank (you can inspect the fields and see that borrower information is there but not visible). Previous borrower will similarly be blank if it is from an account with no cardnumber. Most libraries will usually have a value in cardnumber, but if they don't for any reason, perhaps for in-house cards or by user error, it hides important circ information.
Created attachment 176876 [details] [review] Bug 34681: Fallback to borrowernumber when there is no cardnumber To test: 1. Have StoreLastBorrower enabled to store Last Returned By. 2. Create account and leave cardnumber empty. 3. Check out and return item with that account. 4. Go to items detail page. 5. See that Last Returned By and, if return is not anonymized, Last Borrower appears blank (you can inspect the fields and see that borrower information is there but not visible). Previous borrower will similarly be blank if it is from an account with no cardnumber. 6. APPLY PATCH 7. Try the items detail page again. You should see the link for 'Last borrower' and/or 'Previous borrower' now as the borrowernumber.
Created attachment 176940 [details] [review] Bug 34681: Fallback to borrowernumber when there is no cardnumber To test: 1. Have StoreLastBorrower enabled to store Last Returned By. 2. Create account and leave cardnumber empty. 3. Check out and return item with that account. 4. Go to items detail page. 5. See that Last Returned By and, if return is not anonymized, Last Borrower appears blank (you can inspect the fields and see that borrower information is there but not visible). Previous borrower will similarly be blank if it is from an account with no cardnumber. 6. APPLY PATCH 7. Try the items detail page again. You should see the link for 'Last borrower' and/or 'Previous borrower' now as the borrowernumber. Signed-off-by: Magnus Enger <magnus@libriotech.no> Works as advertised, with the tiny followup I am providing.
Created attachment 176941 [details] [review] Bug 34681: Follow up - fix typo Change from: [% last_retruned_by | html %] To: [% last_returned_by | html %]
Created attachment 177117 [details] [review] Bug 34681: Fallback to borrowernumber when there is no cardnumber To test: 1. Have StoreLastBorrower enabled to store Last Returned By. 2. Create account and leave cardnumber empty. 3. Check out and return item with that account. 4. Go to items detail page. 5. See that Last Returned By and, if return is not anonymized, Last Borrower appears blank (you can inspect the fields and see that borrower information is there but not visible). Previous borrower will similarly be blank if it is from an account with no cardnumber. 6. APPLY PATCH 7. Try the items detail page again. You should see the link for 'Last borrower' and/or 'Previous borrower' now as the borrowernumber. Signed-off-by: Magnus Enger <magnus@libriotech.no> Works as advertised, with the tiny followup I am providing. Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Created attachment 177118 [details] [review] Bug 34681: Follow up - fix typo Change from: [% last_retruned_by | html %] To: [% last_returned_by | html %] Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Pushed for 25.05! Well done everyone, thank you!