When entering data in the subscription history manually, the GUI allows you to enter line breaks. The OPAC will display them as: <br> Probably requires some correctiosn for filtering.
To test: - Create a subscription, make sure "manual history" on the first page is checked - Save the subscription - Go to the subscription detail page, tab "planning" - Click "Edit history" link there - Enter data in the notes and other fields with line breaks - Go to the OPAC detail page for this record - Go to tab subscriptions > More details > Brief history - Verify there are HTML tags displaying for the line breaks
Created attachment 90714 [details] [review] Bug 23126: Display multi-line entries in subscrpitions correctly There are several notes and other fields in a subscription that can be entered as multi-line input with breaks. We should display them as they were entered with keeping the line breaks intact. To test: - Add a subscription - Add comments including line breaks in internal and OPAC note - Check the manual history checkbox - Go to the subscription detail page, tab 'Planning' - Use the 'Edit history' link to edit the history - Enter content with line breaks in all the input fields where it's possible - Go to the OPAC detail page for your subscription record - Go to tab 'Subscriptions' > More details > Brief history - Verify the line breaks show there as <br> - Apply patch - Relaod page, verify all information displays correctly now - Go back to the detail page, subscription tab - verify same there - Go back to the subscription detail page in staff - Check editing the history works as expected - Verify information on all tabs displays correctly - Receive a serial issue - verify note on top displays right - Go to the serial collection page of the subscription - same there
This turned out to be a little bit bigger than a missing filter. GetSubscriptionsFromBiblionumber actually turned the \n to <br>, which we should never do but leave to the templates. I removed the 3 lines doing that and have fixed every place in the templates where I found the variables displayed with TT filter html_line_breaks. I have not submitted tests, because it seemed a little silly to test if the data does not contain <br>? Existing tests in t/db_dependent/Serials.t pass.
$ git grep "\\\n\/\\\<br" Your patch is missing the serials collection pl even though you tweaked the tt.
I did test this and everything seems fine. I didn't sign off because of comment #4, will test again when ready.
Created attachment 90869 [details] [review] Bug 23126: Remove more unnecessary linebreak processing from serial collection This should have no visible effect on the templates as the information the grep changes is not used in the template. It's also strange, that these lines existed, as GetSubscriptionsFromBiblionumber contained the same changes.
Created attachment 90886 [details] [review] Bug 23126: Display multi-line entries in subscrpitions correctly There are several notes and other fields in a subscription that can be entered as multi-line input with breaks. We should display them as they were entered with keeping the line breaks intact. To test: - Add a subscription - Add comments including line breaks in internal and OPAC note - Check the manual history checkbox - Go to the subscription detail page, tab 'Planning' - Use the 'Edit history' link to edit the history - Enter content with line breaks in all the input fields where it's possible - Go to the OPAC detail page for your subscription record - Go to tab 'Subscriptions' > More details > Brief history - Verify the line breaks show there as <br> - Apply patch - Relaod page, verify all information displays correctly now - Go back to the detail page, subscription tab - verify same there - Go back to the subscription detail page in staff - Check editing the history works as expected - Verify information on all tabs displays correctly - Receive a serial issue - verify note on top displays right - Go to the serial collection page of the subscription - same there Signed-off-by: David Nind <david@davidnind.com>
Created attachment 90887 [details] [review] Bug 23126: Remove more unnecessary linebreak processing from serial collection This should have no visible effect on the templates as the information the grep changes is not used in the template. It's also strange, that these lines existed, as GetSubscriptionsFromBiblionumber contained the same changes. Signed-off-by: David Nind <david@davidnind.com>
Created attachment 90929 [details] [review] Bug 23126: Remove more unnecessary linebreak processing from serial collection This should have no visible effect on the templates as the information the grep changes is not used in the template. It's also strange, that these lines existed, as GetSubscriptionsFromBiblionumber contained the same changes. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Arthur Bousquet <arthur.bousquet@inlibro.com>
Created attachment 90931 [details] [review] Bug 23126: Display multi-line entries in subscrpitions correctly There are several notes and other fields in a subscription that can be entered as multi-line input with breaks. We should display them as they were entered with keeping the line breaks intact. To test: - Add a subscription - Add comments including line breaks in internal and OPAC note - Check the manual history checkbox - Go to the subscription detail page, tab 'Planning' - Use the 'Edit history' link to edit the history - Enter content with line breaks in all the input fields where it's possible - Go to the OPAC detail page for your subscription record - Go to tab 'Subscriptions' > More details > Brief history - Verify the line breaks show there as <br> - Apply patch - Relaod page, verify all information displays correctly now - Go back to the detail page, subscription tab - verify same there - Go back to the subscription detail page in staff - Check editing the history works as expected - Verify information on all tabs displays correctly - Receive a serial issue - verify note on top displays right - Go to the serial collection page of the subscription - same there Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Created attachment 90932 [details] [review] Bug 23126: Remove more unnecessary linebreak processing from serial collection This should have no visible effect on the templates as the information the grep changes is not used in the template. It's also strange, that these lines existed, as GetSubscriptionsFromBiblionumber contained the same changes. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Arthur Bousquet <arthur.bousquet@inlibro.com> Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Created attachment 90967 [details] [review] Bug 23126: Display multi-line entries in subscrpitions correctly There are several notes and other fields in a subscription that can be entered as multi-line input with breaks. We should display them as they were entered with keeping the line breaks intact. To test: - Add a subscription - Add comments including line breaks in internal and OPAC note - Check the manual history checkbox - Go to the subscription detail page, tab 'Planning' - Use the 'Edit history' link to edit the history - Enter content with line breaks in all the input fields where it's possible - Go to the OPAC detail page for your subscription record - Go to tab 'Subscriptions' > More details > Brief history - Verify the line breaks show there as <br> - Apply patch - Relaod page, verify all information displays correctly now - Go back to the detail page, subscription tab - verify same there - Go back to the subscription detail page in staff - Check editing the history works as expected - Verify information on all tabs displays correctly - Receive a serial issue - verify note on top displays right - Go to the serial collection page of the subscription - same there Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 90968 [details] [review] Bug 23126: Remove more unnecessary linebreak processing from serial collection This should have no visible effect on the templates as the information the grep changes is not used in the template. It's also strange, that these lines existed, as GetSubscriptionsFromBiblionumber contained the same changes. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Arthur Bousquet <arthur.bousquet@inlibro.com> Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 90969 [details] [review] Bug 23126: Add tests Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Thank you for the tests!
Nice work! Pushed to master for 19.11.00
The bug was found by my coworker while testing 18.11, would be great to see this backported.