If you use the "Insert runtime parameter" button when editing an SQL report the modal window for defining a label says that the label is optional and will allow no label to be selected. This is wrong. If there is no label the parameter will be treated as a generic text input. The interface should enforce the field as required.
Created attachment 127061 [details] [review] Bug 29352: Runtime parameter labels should not be said to be optional This patch alters the form shown when using the "Insert runtime parameter" button in SQL reports. It makes the label field required and removes "optional" from the field hint. To test, apply the patch and go to Reports -> Create from SQL. - Click the "Insert runtime parameter" button and select "Authorized value." - Clear the "parameter label" field and click "Insert parameter." - The form should display an error asking you to fill in the label field. - Test that the category field is also required. - Close the modal and select a different runtime parameter. - Test again that the label field is required. - Test that the form submits correctly when the label field is populated.
Created attachment 127066 [details] [review] Bug 29352: Runtime parameter labels should not be said to be optional This patch alters the form shown when using the "Insert runtime parameter" button in SQL reports. It makes the label field required and removes "optional" from the field hint. To test, apply the patch and go to Reports -> Create from SQL. - Click the "Insert runtime parameter" button and select "Authorized value." - Clear the "parameter label" field and click "Insert parameter." - The form should display an error asking you to fill in the label field. - Test that the category field is also required. - Close the modal and select a different runtime parameter. - Test again that the label field is required. - Test that the form submits correctly when the label field is populated. Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Created attachment 127115 [details] [review] Bug 29352: Runtime parameter labels should not be said to be optional This patch alters the form shown when using the "Insert runtime parameter" button in SQL reports. It makes the label field required and removes "optional" from the field hint. To test, apply the patch and go to Reports -> Create from SQL. - Click the "Insert runtime parameter" button and select "Authorized value." - Clear the "parameter label" field and click "Insert parameter." - The form should display an error asking you to fill in the label field. - Test that the category field is also required. - Close the modal and select a different runtime parameter. - Test again that the label field is required. - Test that the form submits correctly when the label field is populated. Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to master for 21.11, thanks to everybody involved!
Pushed to 21.05.x for 21.05.05
Depends on Bug 27644 not in 20.11.x