jenkinsci / generic-webhook-trigger-plugin

Can receive any HTTP request, extract any values from JSON or XML and trigger a job with those values available as variables. Works with GitHub, GitLab, Bitbucket, Jira and many more.
https://plugins.jenkins.io/generic-webhook-trigger
404 stars 159 forks source link

"Post content parameters" radio button not selectable for multiple variables #246

Closed packar3k closed 1 year ago

packar3k commented 1 year ago

Hi, Met with the following issue today!

Jenkins version: 2.346.2 Plugin version: 1.84

When creating new jobs with multiple "Post content parameters" the radio buttons to select JSONPath/XPath are not selectable except for the first variable.

It's been working fine for me, maybe the problem happened after my recent Jenkins version update to 2.346.2. In all the old jobs the selection still works.

As a temporary workaround, I directly adjusted the job config and added <expressionType>JSONPath</expressionType> After that, the selection of the buttons is working again. Screenshot 2022-08-10 at 15 11 51 Thanks in advance!

tomasbjerre commented 1 year ago

I can confirm this.

I think it is a problem in Jenkins, not in the plugin. The plugin has little code to handle those radio buttons: https://github.com/jenkinsci/generic-webhook-trigger-plugin/blob/master/src/main/resources/org/jenkinsci/plugins/gwt/GenericVariable/config.jelly#L7

packar3k commented 1 year ago

Ok, thanks for the response.

Ruruthia commented 1 year ago

I think it can be caused by this Jenkins regression: https://issues.jenkins.io/browse/JENKINS-70139

timjar3 commented 1 year ago

packar3k Could you please mention the steps on how/where you adjusted the Job config?

packar3k commented 1 year ago

@timjar3 If you have access to the Jenkins job config on the Jenkins server, locate the job config and then you can manually edit the job config xml --> find the generic hook config --> modify the expression Type

SnoCold commented 1 year ago

As a workaround, Just go ahead and click the radio button you like, and save the config, then navigate out and backto the page and you would see your radio buttons selected. it is just a Jenkins glitch imho