[JIRA] (JENKINS-61385) Jelly 'enum' tag 'default' attribute not working

11 views
Skip to first unread message

knapsu@gmail.com (JIRA)

unread,
Mar 8, 2020, 12:00:03 PM3/8/20
to jenkinsc...@googlegroups.com
Krzysztof Knapik created an issue
 
Jenkins / Bug JENKINS-61385
Jelly 'enum' tag 'default' attribute not working
Issue Type: Bug Bug
Assignee: Unassigned
Components: core
Created: 2020-03-08 15:59
Environment: Jenkins 2.60|2.224, Java Runtime Environemnt 8|11
Labels: jelly
Priority: Minor Minor
Reporter: Krzysztof Knapik

The <f:enum>  tag from Jenkins Jelly form library has an attribue 'default' that should set the field value for newly created forms.  It does not work because of the bug in the core/src/main/resources/lib/form/enum.jelly source file. As a result the HTML <select> will have no <option> selected which will make the first enum value be used when submitting a form instead of the wanted value.
{{}}
  <f:entry field="ballColor">
    <f:enum default="YELLOW"/>
  </f:entry>
{{}}

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

knapsu@gmail.com (JIRA)

unread,
Mar 8, 2020, 12:00:03 PM3/8/20
to jenkinsc...@googlegroups.com
Krzysztof Knapik updated an issue
Change By: Krzysztof Knapik
The {{*<f:enum>*}}  tag from Jenkins Jelly form library has an attribue '{{default}}' that should set the field value for newly created forms.  It does not work because of the bug in the {{core/src/main/resources/lib/form/enum.jelly}} source file. As a result the HTML {{<select>}} will have no {{<option>}} selected which will make the first enum value be used when submitting a form instead of the wanted value.
{{}}
{{  <f:entry field="ballColor">}}
{{    <f:enum default="YELLOW"/>}}
{{  </f:entry>}}

{{}}

knapsu@gmail.com (JIRA)

unread,
Mar 8, 2020, 12:01:02 PM3/8/20
to jenkinsc...@googlegroups.com
Krzysztof Knapik updated an issue
The {{*<f:enum>*}}  tag from Jenkins Jelly form library has an attribue ' * {{default}} ' * that should set the field value for newly created forms.  It does not work because of the bug in the * {{core/src/main/resources/lib/form/enum.jelly}} * source file. As a result the HTML {{<select>}} will have no {{<option>}} selected which will make the first enum value be used when submitting a form instead of the wanted value.


{{  <f:entry field="ballColor">}}
{{    <f:enum default="YELLOW"/>}}
{{  </f:entry>}}

knapsu@gmail.com (JIRA)

unread,
Mar 8, 2020, 12:16:02 PM3/8/20
to jenkinsc...@googlegroups.com
Krzysztof Knapik commented on Bug JENKINS-61385
 
Re: Jelly 'enum' tag 'default' attribute not working

I've created a pull request on GitHub with code fixes and tests for enum tag.

dbeck@cloudbees.com (JIRA)

unread,
Mar 16, 2020, 9:00:02 AM3/16/20
to jenkinsc...@googlegroups.com
Daniel Beck resolved as Fixed
 
Change By: Daniel Beck
Status: Open Resolved
Resolution: Fixed
Released As: 2.226

mark.earl.waite@gmail.com (JIRA)

unread,
Mar 16, 2020, 1:57:03 PM3/16/20
to jenkinsc...@googlegroups.com
Mark Waite closed an issue as Fixed
Change By: Mark Waite
Status: Resolved Closed
Reply all
Reply to author
Forward
0 new messages