Created attachment 22819 [details] [review] Bug 11216 - Patron modification creates indefinite manual restriction Editing partron data results in unintended adding of indefinite manual restriction to it. Reason for it is hidden field add_debarment which is wrongly initialized to 1 instead of 0. Also JavaScript code seems to want to toggle checkbox, and sice this field is hidden correct approach would be to change it's value to 1. Test scenario: 1. edit patron data 2. verify that debarrment is wrongly added 3. remove debarrment 3. apply this patch 4. edit patron again 5. verify that debarrment wasn't added 6. intentionally add debarrment and verify that it's saved
Created attachment 22822 [details] [review] [SIGNED-OFF] Bug 11216 - Patron modification creates indefinite manual restriction Editing partron data results in unintended adding of indefinite manual restriction to it. Reason for it is hidden field add_debarment which is wrongly initialized to 1 instead of 0. Also JavaScript code seems to want to toggle checkbox, and sice this field is hidden correct approach would be to change it's value to 1. Test scenario: 1. edit patron data 2. verify that debarrment is wrongly added 3. remove debarrment 3. apply this patch 4. edit patron again 5. verify that debarrment wasn't added 6. intentionally add debarrment and verify that it's saved Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 22826 [details] [review] Bug 11216 - Patron modification creates indefinite manual restriction Editing partron data results in unintended adding of indefinite manual restriction to it. Reason for it is hidden field add_debarment which is wrongly initialized to 1 instead of 0. Also JavaScript code seems to want to toggle checkbox, and sice this field is hidden correct approach would be to change it's value to 1. Test scenario: 1. edit patron data 2. verify that debarrment is wrongly added 3. remove debarrment 3. apply this patch 4. edit patron again 5. verify that debarrment wasn't added 6. intentionally add debarrment and verify that it's saved 7. add debarment, enter something in comment but press cancel and verify that debarment isn't added
Sorry Owen, I found another place which needs care when canceling debarment, so I obsoleted your sign-off
I confirm this bug, testing the fix now
Created attachment 22890 [details] [review] Bug 11216 - Patron modification creates indefinite manual restriction Editing partron data results in unintended adding of indefinite manual restriction to it. Reason for it is hidden field add_debarment which is wrongly initialized to 1 instead of 0. Also JavaScript code seems to want to toggle checkbox, and sice this field is hidden correct approach would be to change it's value to 1. Test scenario: 1. edit patron data 2. verify that debarrment is wrongly added 3. remove debarrment 3. apply this patch 4. edit patron again 5. verify that debarrment wasn't added 6. intentionally add debarrment and verify that it's saved 7. add debarment, enter something in comment but press cancel and verify that debarment isn't added Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> This fixes this blocker, however, with or without the patch, the date is not saved correctly. I will file a new bug for that
Created attachment 22894 [details] [review] Bug 11216 - Patron modification creates indefinite manual restriction Editing partron data results in unintended adding of indefinite manual restriction to it. Reason for it is hidden field add_debarment which is wrongly initialized to 1 instead of 0. Also JavaScript code seems to want to toggle checkbox, and sice this field is hidden correct approach would be to change it's value to 1. Test scenario: 1. edit patron data 2. verify that debarrment is wrongly added 3. remove debarrment 3. apply this patch 4. edit patron again 5. verify that debarrment wasn't added 6. intentionally add debarrment and verify that it's saved 7. add debarment, enter something in comment but press cancel and verify that debarment isn't added Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> This fixes this blocker, however, with or without the patch, the date is not saved correctly. I will file a new bug for that Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Pushed to master and 3.14.x. Thanks, Dobrica!