jenkinsci / jenkinsci/workflow-cps-plugin

[JENKINS-70397] Repeatable radio button in Snippet Generator affects wrong item

Open
#1,652 2 comments 0 reactions 0 assignees View on GitHub
component:workflow-cps-plugin imported-jira-issue priority:minor resolution:unresolved ux
Dominant language
Java
Stars
186
Forks
213
Avg merge
12h 12m
Merged PRs (30d)
8

Description

In the Snippet Generator, if a parameter of a step has a repeatable section that contains a radio button, and I click the radio button in the second item, then the click affects first item instead.

To reproduce:


  1. Open the Jenkins web page of a pipeline project in a browser.

  2. Click the "Pipeline Syntax" link in the left sidebar.

  3. In the "Sample Step" dropdown list, select "recordIssues: Record compiler warnings and static analysis results".

  4. At the bottom of the "recordIssues" section, click the "Advanced..." button.

  5. In the "Thresholds" section, click the "Add Quality Gate" button. This adds an item with fields "Threshold", "Type", and "Result". The "Result" field is a pair of radio buttons: "Unstable" (not selected) and "Failed" (selected).

  6. In the "Thresholds" section, click the "Add Quality Gate" button again. This adds a second similar item.

  7. In the "Result" field of the second item, hover the mouse pointer over the "Unstable" radio button, and click the radio button.

Expected result:


  • While the mouse pointer is over the "Unstable" radio button of the second item, this radio button should be highlighted.

  • When you click the "Unstable" radio button of the second item, this radio button should be selected, and the "Failed" radio button below it should be deselected. The first item should not be affected.

Actual result:


  • While the mouse pointer is over the "Unstable" radio button of the second item, the "Unstable" radio button of the first item is highlighted.

  • When you click the "Unstable" radio button of the second item, the "Unstable" radio button of the first item is selected, and the "Failed" radio button of the first item is deselected. The second item is not affected.

---
Originally reported by kon, imported from: Repeatable radio button in Snippet Generator affects wrong item


  • status: Open
  • priority: Minor
  • component(s): workflow-cps-plugin
  • label(s): UI
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 2025-12-07

Raw content of original issue

In the Snippet Generator, if a parameter of a step has a repeatable section that contains a radio button, and I click the radio button in the second item, then the click affects first item instead.

To reproduce:


  1. Open the Jenkins web page of a pipeline project in a browser.

  2. Click the "Pipeline Syntax" link in the left sidebar.

  3. In the "Sample Step" dropdown list, select "recordIssues: Record compiler warnings and static analysis results".

  4. At the bottom of the "recordIssues" section, click the "Advanced..." button.

  5. In the "Thresholds" section, click the "Add Quality Gate" button. This adds an item with fields "Threshold", "Type", and "Result". The "Result" field is a pair of radio buttons: "Unstable" (not selected) and "Failed" (selected).

  6. In the "Thresholds" section, click the "Add Quality Gate" button again. This adds a second similar item.

  7. In the "Result" field of the second item, hover the mouse pointer over the "Unstable" radio button, and click the radio button.

Expected result:


  • While the mouse pointer is over the "Unstable" radio button of the second item, this radio button should be highlighted.

  • When you click the "Unstable" radio button of the second item, this radio button should be selected, and the "Failed" radio button below it should be deselected. The first item should not be affected.

Actual result:


  • While the mouse pointer is over the "Unstable" radio button of the second item, the "Unstable" radio button of the first item is highlighted.

  • When you click the "Unstable" radio button of the second item, the "Unstable" radio button of the first item is selected, and the "Failed" radio button of the first item is deselected. The second item is not affected.

environment

```
Jenkins 2.375.1

workflow-cps-plugin 3601.v9b_36a_d99e1cc

warnings-ng-plugin 9.22.0

Mozilla Firefox 102.6.0esr
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the problem from the Pipeline Syntax entry point using the recordIssues sample step, the Advanced section, and two Quality Gate items. Trace the Snippet Generator UI behavior for the repeated Result radio buttons; done means hovering and selecting the second item's Unstable option affects only that item.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.