There are some bad--and missing--template variable checks in the course details template which result in empty parentheses showing up in the table of items in the course.
Created attachment 177704 [details] [review] Bug 39078: Fix incorrect variable checks in course reserve details template This patch adds some variable checks and corrects some others so that the course reserve detail template doesn't show empty parentheses. To test, apply the patch and create a course if necessary. - Add an item to the course. - After submitting a barcode, check the checkbox next to each option and select a different value (item type, collection, etc.). - View the course details and check the columns for the fields you changed. They should display the correct information: "Updated field value (Original field value)" - Add another item but this time don't change any options. The information should be display as: "Unchanged (Original field value)" - There should be no instances where it looks like: "Field value ()" Sponsored-by: Athens County Public Libraries
Created attachment 177946 [details] [review] Bug 39078: Fix incorrect variable checks in course reserve details template This patch adds some variable checks and corrects some others so that the course reserve detail template doesn't show empty parentheses. To test, apply the patch and create a course if necessary. - Add an item to the course. - After submitting a barcode, check the checkbox next to each option and select a different value (item type, collection, etc.). - View the course details and check the columns for the fields you changed. They should display the correct information: "Updated field value (Original field value)" - Add another item but this time don't change any options. The information should be display as: "Unchanged (Original field value)" - There should be no instances where it looks like: "Field value ()" Sponsored-by: Athens County Public Libraries
Created attachment 178301 [details] [review] Bug 39078: Fix incorrect variable checks in course reserve details template This patch adds some variable checks and corrects some others so that the course reserve detail template doesn't show empty parentheses. To test, apply the patch and create a course if necessary. - Add an item to the course. - After submitting a barcode, check the checkbox next to each option and select a different value (item type, collection, etc.). - View the course details and check the columns for the fields you changed. They should display the correct information: "Updated field value (Original field value)" - Add another item but this time don't change any options. The information should be display as: "Unchanged (Original field value)" - There should be no instances where it looks like: "Field value ()" Sponsored-by: Athens County Public Libraries Signed-off-by: David Nind <david@davidnind.com>
Testing notes (using KTD): 1. I couldn't replicate the issue with empty brackets by adding a course reserve and not selecting any fields (or making changes).
Created attachment 178451 [details] [review] Bug 39078: Fix incorrect variable checks in course reserve details template This patch adds some variable checks and corrects some others so that the course reserve detail template doesn't show empty parentheses. To test, apply the patch and create a course if necessary. - Add an item to the course. - After submitting a barcode, check the checkbox next to each option and select a different value (item type, collection, etc.). - View the course details and check the columns for the fields you changed. They should display the correct information: "Updated field value (Original field value)" - Add another item but this time don't change any options. The information should be display as: "Unchanged (Original field value)" - There should be no instances where it looks like: "Field value ()" Sponsored-by: Athens County Public Libraries Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Pushed for 25.05! Well done everyone, thank you!