[JIRA] (JENKINS-38893) Active Choice Reactive Reference parameter value rendered as File Selector not cascaded

2 views
Skip to first unread message

imoutsatsos@msn.com (JIRA)

unread,
Oct 11, 2016, 7:54:07 AM10/11/16
to jenkinsc...@googlegroups.com
Ioannis Moutsatsos created an issue
 
Jenkins / Bug JENKINS-38893
Active Choice Reactive Reference parameter value rendered as File Selector not cascaded
Issue Type: Bug Bug
Assignee: Bruno P. Kinoshita
Components: active-choices-plugin
Created: 2016/Oct/11 11:53 AM
Priority: Minor Minor
Reporter: Ioannis Moutsatsos

When an Active Choice reactive reference is rendered as a Jenkins File Chooser, the name of the selected file is not cascaded to other active choices that reference it.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

brunodepaulak@yahoo.com.br (JIRA)

unread,
Mar 10, 2017, 6:12:01 PM3/10/17
to jenkinsc...@googlegroups.com
Bruno P. Kinoshita started work on Bug JENKINS-38893
 
Change By: Bruno P. Kinoshita
Status: Open In Progress
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

imoutsatsos@msn.com (JIRA)

unread,
Aug 30, 2018, 2:00:01 PM8/30/18
to jenkinsc...@googlegroups.com
Ioannis Moutsatsos updated an issue
Change By: Ioannis Moutsatsos
Priority: Minor Major
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

imoutsatsos@msn.com (JIRA)

unread,
Aug 30, 2018, 2:01:02 PM8/30/18
to jenkinsc...@googlegroups.com
Ioannis Moutsatsos commented on Bug JENKINS-38893
 
Re: Active Choice Reactive Reference parameter value rendered as File Selector not cascaded

Changed the severity, as this is directly affecting the expected behavior of the AC control

brunodepaulak@yahoo.com.br (JIRA)

unread,
May 4, 2019, 7:22:03 AM5/4/19
to jenkinsc...@googlegroups.com

brunodepaulak@yahoo.com.br (JIRA)

unread,
May 4, 2019, 7:23:02 AM5/4/19
to jenkinsc...@googlegroups.com
Bruno P. Kinoshita commented on Bug JENKINS-38893
 
Re: Active Choice Reactive Reference parameter value rendered as File Selector not cascaded

Ok, I think I finally understood the issue and what's going on. What we have when we use Jenkins' File parameter is a FileParameterValue.

The Jelly file used to render is very simple and it seems like the part we are missing here is that the input field's name must be "file", not "value".

If you want to cascade to other parameters, I think you will have to find some JavaScript that reacts to the event when the user chooses the file, then copies the file name in another input name="value".

So in summary, the only thing I changed from your example to get it working was: <input name="file" type="file" jsonAware="true" />

To match Jenkins' jelly file.

Could you check if that works for you Ioannis Moutsatsos, please? Here's a screen shot (also checked in the disk, and both files were uploaded).

brunodepaulak@yahoo.com.br (JIRA)

unread,
May 4, 2019, 7:24:03 AM5/4/19
to jenkinsc...@googlegroups.com
Bruno P. Kinoshita edited a comment on Bug JENKINS-38893
Ok, I think I finally understood the issue and what's going on. What we have when we use Jenkins' File parameter is a [FileParameterValue|https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/FileParameterValue.java].

The Jelly [file used to render|https://github.com/jenkinsci/jenkins/blob/master/core/src/main/resources/hudson/model/FileParameterDefinition/config.jelly] is very simple and it seems like the part we are missing here is that the input field's name must be "file", not "value".


If you want to cascade to other parameters, I think you will have to find some JavaScript that reacts to the event when the user chooses the file, then copies the file name in another input name="value".

So in summary, the only thing I changed from your example to get it working was: <input name="file" type="file" jsonAware="true" />

To match Jenkins' jelly file.

Could you check if that works for you [~ioannis], please? Here's a screen shot (also checked in the disk, and both files were uploaded , but no file name in the latter ).

!screenshot-1.png|thumbnail!

imoutsatsos@msn.com (JIRA)

unread,
May 4, 2019, 8:21:03 AM5/4/19
to jenkinsc...@googlegroups.com

Thanks for looking into this Bruno! So you have clearly confirmed my previous investigation: https://issues.jenkins-ci.org/browse/JENKINS-38893?focusedCommentId=305784&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-305784 Excellent!

 

I will investigate the workaround  you suggested, but I think this is the first case where we can't reproduce a functional Jenkins UI control whose value can be cascaded in the typical AC way. I will try to document on wiki after I find a workaround for it.

Thank you-have a great Sunday afternoon in NZ!

dozinbatty@gmail.com (JIRA)

unread,
Jun 6, 2019, 11:09:02 AM6/6/19
to jenkinsc...@googlegroups.com

The issue mentioned Ioannis Moutsatsos is there, but I could add another finding, when we use the same active choice in pipeline job, the file is not uploaded either you specify 
<input name="file" type="file" jsonaware="true">
OR
<input name="value" type="file" jsonaware="true">
In Pipeline type of job, you can get the name of the file, but do not have a space where the file could be located.

Reply all
Reply to author
Forward
0 new messages