To reproduce, k-t-d: Preparation - Additional fields: 1) Add a new 'additional field', visit: /cgi-bin/koha/admin/additional-fields.pl 2) Click 'subscription' and '+ New field'. Enter a 'name' and hit 'save'. Serials: 1) Add a new serial, visit: /cgi-bin/koha/serials/subscription-add.pl 2) Put a biblionumber in the 'record' field, i.e. '112'. Press 'next' and click 'ok' on the alert box 3) Fill all the required fields and click 'test prediction' 4) Input something in the additional field created previously. 5) Click 'save subscription'. Notice the additional field is as expected. 6) Repeat steps 1-5 to create a second serial. Batch edit: 1) Visit serials and hit the 'Search' button: /cgi-bin/koha/serials/serials-home.pl 2) Click the 2 checkboxes for the 2 serials we created previously and click the new link that pops up 'edit selected serials'. 3) Click 'Save' without changing anything. 4) Go back to either of the serials, notice the value for the additional field is gone. Visit: /cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=1
Created attachment 157221 [details] [review] Bug 35073: Rename additional_fields to available_additional_fields 'additional_fields' is ambiguous and in other places we name this available_additional_fields instead. Do the same here.
Created attachment 157222 [details] [review] Bug 35073: Default to existing value if there is one For values that dont exist in the batch edit submission, i.e. UI says 'No change', we default to existing value if there is one. Test plan: Preparation - Additional fields: 1) Add a new 'additional field', visit: /cgi-bin/koha/admin/additional-fields.pl 2) Click 'subscription' and '+ New field'. Enter a 'name' and hit 'save'. Serials: 1) Add a new serial, visit: /cgi-bin/koha/serials/subscription-add.pl 2) Put a biblionumber in the 'record' field, i.e. '112'. Press 'next' and click 'ok' on the alert box 3) Fill all the required fields and click 'test prediction' 4) Input something in the additional field created previously. 5) Click 'save subscription'. Notice the additional field is as expected. 6) Repeat steps 1-5 to create a second serial. Batch edit: 1) Visit serials and hit the 'Search' button: /cgi-bin/koha/serials/serials-home.pl 2) Click the 2 checkboxes for the 2 serials we created previously and click the new link that pops up 'edit selected serials'. 3) Click 'Save' without changing anything. 4) Go back to either of the serials, notice the value for the additional field is unchanged. Visit: /cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=1
Created attachment 157223 [details] [review] Bug 35073: perltidy subscription-batchedit.pl git show -w <this_patch_hash>
This is a data loss bug, marking as major.
Created attachment 158038 [details] [review] Bug 35073: Rename additional_fields to available_additional_fields 'additional_fields' is ambiguous and in other places we name this available_additional_fields instead. Do the same here. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 158039 [details] [review] Bug 35073: Default to existing value if there is one For values that dont exist in the batch edit submission, i.e. UI says 'No change', we default to existing value if there is one. Test plan: Preparation - Additional fields: 1) Add a new 'additional field', visit: /cgi-bin/koha/admin/additional-fields.pl 2) Click 'subscription' and '+ New field'. Enter a 'name' and hit 'save'. Serials: 1) Add a new serial, visit: /cgi-bin/koha/serials/subscription-add.pl 2) Put a biblionumber in the 'record' field, i.e. '112'. Press 'next' and click 'ok' on the alert box 3) Fill all the required fields and click 'test prediction' 4) Input something in the additional field created previously. 5) Click 'save subscription'. Notice the additional field is as expected. 6) Repeat steps 1-5 to create a second serial. Batch edit: 1) Visit serials and hit the 'Search' button: /cgi-bin/koha/serials/serials-home.pl 2) Click the 2 checkboxes for the 2 serials we created previously and click the new link that pops up 'edit selected serials'. 3) Click 'Save' without changing anything. 4) Go back to either of the serials, notice the value for the additional field is unchanged. Visit: /cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=1 Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 158040 [details] [review] Bug 35073: perltidy subscription-batchedit.pl git show -w <this_patch_hash> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Cool! Thanks Katrin!
Created attachment 158213 [details] [review] Bug 35073: Rename additional_fields to available_additional_fields 'additional_fields' is ambiguous and in other places we name this available_additional_fields instead. Do the same here. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Created attachment 158214 [details] [review] Bug 35073: Default to existing value if there is one For values that dont exist in the batch edit submission, i.e. UI says 'No change', we default to existing value if there is one. Test plan: Preparation - Additional fields: 1) Add a new 'additional field', visit: /cgi-bin/koha/admin/additional-fields.pl 2) Click 'subscription' and '+ New field'. Enter a 'name' and hit 'save'. Serials: 1) Add a new serial, visit: /cgi-bin/koha/serials/subscription-add.pl 2) Put a biblionumber in the 'record' field, i.e. '112'. Press 'next' and click 'ok' on the alert box 3) Fill all the required fields and click 'test prediction' 4) Input something in the additional field created previously. 5) Click 'save subscription'. Notice the additional field is as expected. 6) Repeat steps 1-5 to create a second serial. Batch edit: 1) Visit serials and hit the 'Search' button: /cgi-bin/koha/serials/serials-home.pl 2) Click the 2 checkboxes for the 2 serials we created previously and click the new link that pops up 'edit selected serials'. 3) Click 'Save' without changing anything. 4) Go back to either of the serials, notice the value for the additional field is unchanged. Visit: /cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=1 Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Created attachment 158215 [details] [review] Bug 35073: perltidy subscription-batchedit.pl git show -w <this_patch_hash> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Works, makes sense, QA script happy, code looks good, passing QA :)
Pushed to master for 23.11. Nice work everyone, thanks!
Pushed to 23.05.x for 23.05.06
Nice work everyone! Pushed to 22.11.x for next release