Bug 34963 - Unable to delete fields in suggestions
Summary: Unable to delete fields in suggestions
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 23991
Blocks:
  Show dependency treegraph
 
Reported: 2023-09-29 16:20 UTC by David Roberts
Modified: 2024-04-19 16:07 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00


Attachments
Bug 34963: Restore the ability to blank fields when editing a suggestion (1.45 KB, patch)
2024-04-17 09:51 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 34963: Restore the ability to blank fields when editing a suggestion (1.50 KB, patch)
2024-04-17 14:42 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 34963: Restore the ability to blank fields when editing a suggestion (1.56 KB, patch)
2024-04-19 13:42 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Roberts 2023-09-29 16:20:25 UTC
It doesn't appear possible to delete a note in a suggestion, although it is possible to edit it. To reproduce, create a suggestion record and add a note and non-public note. Edit the suggestion and change the contents of your notes, and save. The notes will both correctly update to your new note text. Now edit the suggestion again and this time completely delete the note. The data does not get deleted.
Comment 1 Joseph Alway 2023-10-10 18:28:09 UTC
I noticed this is happening as well.

It happens for the Note and Non-Public Note field in a suggestion.

Our current version: 22.11.09.000 Rosalie
Comment 2 Katrin Fischer 2023-10-16 21:07:36 UTC
I can replicate this on current master.
Comment 3 Katrin Fischer 2023-10-16 21:10:04 UTC
Actually it's all the non-mandatory fields - you can't empty them, only edit.
Comment 4 Caroline Cyr La Rose 2023-11-06 21:11:23 UTC
I just noticed this is also true for the new non-public note...
Comment 5 Katrin Fischer 2023-11-06 21:17:25 UTC
It's all the text fields :( But I haven't been able to get developer's attention on this bug.
Comment 6 Jonathan Druart 2024-04-17 09:51:16 UTC
Created attachment 164986 [details] [review]
Bug 34963: Restore the ability to blank fields when editing a suggestion

Regression introduced by bug 23991.
We don't want to remove the fields from the edition if they are empty.

Ideally we should have separate parameters for edition and search, but
this is the low-effort fix, and hopefully won't introduce side-effects.

Test plan:
Try to edit a suggestion and blank some fields
Try to search for suggestions using the search form on the left of the
screen
Comment 7 Jonathan Druart 2024-04-17 09:51:36 UTC
Sorry, I was not aware of this bug (or I forgot!)
Comment 8 PTFS Europe Sandboxes 2024-04-17 14:42:24 UTC
Created attachment 165020 [details] [review]
Bug 34963: Restore the ability to blank fields when editing a suggestion

Regression introduced by bug 23991.
We don't want to remove the fields from the edition if they are empty.

Ideally we should have separate parameters for edition and search, but
this is the low-effort fix, and hopefully won't introduce side-effects.

Test plan:
Try to edit a suggestion and blank some fields
Try to search for suggestions using the search form on the left of the
screen

Signed-off-by: Ray Delahunty <lib-systems@arts.ac.uk>
Comment 9 Ray Delahunty 2024-04-17 14:47:25 UTC
Added 2 suggestions, one via Intranet, one via OPAC. Added content to publisher, public and private notes fields. Prior to patch application could not delete any of the three. After the patch applied could delete all three fields in both OPAC and Intranet sourced suggestions. (I did restart services- not sure if that was necessary- am new to signoffs).
Comment 10 Katrin Fischer 2024-04-18 20:48:35 UTC
It never hurts to restart the services :) 

Thanks for the fix and sign-off!
Comment 11 Nick Clemens 2024-04-19 13:42:25 UTC
Created attachment 165200 [details] [review]
Bug 34963: Restore the ability to blank fields when editing a suggestion

Regression introduced by bug 23991.
We don't want to remove the fields from the edition if they are empty.

Ideally we should have separate parameters for edition and search, but
this is the low-effort fix, and hopefully won't introduce side-effects.

Test plan:
Try to edit a suggestion and blank some fields
Try to search for suggestions using the search form on the left of the
screen

Signed-off-by: Ray Delahunty <lib-systems@arts.ac.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 12 Katrin Fischer 2024-04-19 16:07:23 UTC
Pushed for 24.05!

Well done everyone, thank you!