Defect #41946
closed
/workflows/edit puts used_statuses_only twice at url
Added by Grischa Zengel 3 months ago.
Updated 4 days ago.
Description
1. got to /workflows/edit
2. mark used status only and press edit
you will get /workflows/edit?role_id%5B%5D=all&tracker_id%5B%5D=all&used_statuses_only=0&used_statuses_only=1
- Category set to Issues workflow
- Status changed from New to Confirmed
This is generated by the check_box
helper . To quote its documentation:
The HTML specification says unchecked check boxes are not successful, and thus web browsers do not send them.
Thus, the check_box
helper creates a hidden field containing the disabled value. If the checkbox is unchecked, the browsers only sends the hidden field. If the checkbox is checked, the browser send the hidden field and the checkbox value with the same name (which thus overrides the hidden value).
As we do consider an absent value, i.e. the default, to mean "the checkbox is checked" (see WorkflowController#find_statuses
), this duplication is something we can't easily fix as there would be no way to send an unchecked value from the browser form.
- Status changed from Confirmed to Closed
- Resolution set to Wont fix
Holger Just wrote in #note-2:
As we do consider an absent value, i.e. the default, to mean "the checkbox is checked" (see WorkflowController#find_statuses
), this duplication is something we can't easily fix as there would be no way to send an unchecked value from the browser form.
For the above reason, I am closing this issue.
Also available in: Atom
PDF