When paying a fine, the description is built out of the borrower's type and title, instead of the actual fine's description. This has two causes: the information was not passed, and then it was overriden by some line << #workaround for Bug 4041 to get rid of duplicated code in circ-menu.tt, use circ-menu.inc instad $template->param(%$borrower); >> which basically replace the accountline's description with the borrower's ?!?! Anyway, steps to reproduce: 1) in the staff, go to a user with a fine to pay. a) if none, go to a user and Fines>>"Create manual invoice" with a distinctive description. 2) In Fines>>Pay fines, click the "Pay" button on the line of the fine. 3) This will take you a "Pay an individual fine" screen, where the description will look like "Staff Mrs", for the category and title of the borrower. Apply the patch, and do it again. Voilà.
Created attachment 41208 [details] [review] Bug 14605 - Corrects the individual fine's description When paying a fine, the description is built out of the borrower's type and title, instead of the actual fine's description. STEPS: 1) in the staff, go to a user with a fine to pay. a) if none, go to a user and Fines>>"Create manual invoice" with a distinctive description. 2) In Fines>>Pay fines, click the "Pay" button on the line of the fine. 3) This will take you a "Pay an individual fine" screen, where the description will look like "Staff Mrs", for the category and title of the borrower.
It looks like »Description« and »Account type« were mixed up. When I apply the patch, I have the fine description in »Description«, but also in »Account type«. I suppose this is where the user category should go. Can you confirm and adjust the patch?
Created attachment 41216 [details] display after patch I do not reproduce your issue, unless I'm misunderstanding. In "Account type", I only get the "F" as I had before. I checked again the diff's code, and can't see how it would have modified the account_type display.
(In reply to Blou from comment #3) > I do not reproduce your issue, unless I'm misunderstanding. > In "Account type", I only get the "F" as I had before. Maybe I don't understand what the account type column is actually for. I assumed it is for the patron category (which accidentally ended up in description before your patch). I left F as description before and thought it is the same now in both fields. After I used a different description, I see the fields have different contents. I am still not sure what account type is supposed to mean though. If it is the type of invoice, it would probably be better to display the description (Fine), not the code (F), and label the column »Invoice type«?
Created attachment 41218 [details] [review] Bug 14605 - Corrects the individual fine's description When paying a fine, the description is built out of the borrower's type and title, instead of the actual fine's description. STEPS: 1) in the staff, go to a user with a fine to pay. a) if none, go to a user and Fines>>"Create manual invoice" with a distinctive description. 2) In Fines>>Pay fines, click the "Pay" button on the line of the fine. 3) This will take you a "Pay an individual fine" screen, where the description will look like "Staff Mrs", for the category and title of the borrower. Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
I would say that the expected behavior was to display the description (what you did) and the title of the biblio, don't you think?
And what about existing rows in the DB? Do you think it's possible to update them?
Created attachment 51168 [details] [review] Bug 14605 - Corrects the individual fine's description When paying a fine, the description is built out of the borrower's type and title, instead of the actual fine's description. STEPS: 1) in the staff, go to a user with a fine to pay. a) if none, go to a user and Fines>>"Create manual invoice" with a distinctive description. 2) In Fines>>Pay fines, click the "Pay" button on the line of the fine. 3) This will take you a "Pay an individual fine" screen, where the description will look like "Staff Mrs", for the category and title of the borrower. Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
I rebased. Regarding the "issues": The biblio's title was not part of the previous functionality, and I don't think it's right anyway, since I presume fines can be for things other than associated to a biblio. As for correcting the current DB, that's feasible, but a bit dodgy. I would really fear to replace perfectly valid subjects (corrected manually by the employee), and validating what is right or not might be a bit too much work for what it's worth. This patch is here to correct make life easier in the future, but it's not correcting a major bug that's worth a big discussion on "How to fix the current data", don't you think?
(In reply to Blou from comment #9) > I rebased. > Regarding the "issues": The biblio's title was not part of the previous > functionality That's correct. It can be done, but I think in another bug. > As for correcting the current DB, that's feasible, but a bit dodgy. I don't know if it's possible, description in accountlines must be set initially. A fee entry does not reference the original biblio. I think that correct Status for this is Signed off, no problem if you need another sign but it's already signed by Mirko.
Created attachment 51929 [details] [review] Bug 14605 - Corrects the individual fine's description When paying a fine, the description is built out of the borrower's type and title, instead of the actual fine's description. STEPS: 1) in the staff, go to a user with a fine to pay. a) if none, go to a user and Fines>>"Create manual invoice" with a distinctive description. 2) In Fines>>Pay fines, click the "Pay" button on the line of the fine. 3) This will take you a "Pay an individual fine" screen, where the description will look like "Staff Mrs", for the category and title of the borrower. Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 52248 [details] [review] Bug 14605 - Corrects the individual fine's description When paying a fine, the description is built out of the borrower's type and title, instead of the actual fine's description. STEPS: 1) in the staff, go to a user with a fine to pay. a) if none, go to a user and Fines>>"Create manual invoice" with a distinctive description. 2) In Fines>>Pay fines, click the "Pay" button on the line of the fine. 3) This will take you a "Pay an individual fine" screen, where the description will look like "Staff Mrs", for the category and title of the borrower. Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Pushed to master for 16.11, thanks Philippe!
Pushed in 16.05. Will be in 16.05.01.
Patch pushed to 3.22.x, will be in 3.22.8