jenkinsci / jenkinsci/workflow-cps-plugin

[JENKINS-72302] Replay doesn't allow to adapt evaluate(...) content

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

Description

Code executed by evaluate is displayed for modification in the Replay view but the modified content isn't taken into account.

This can be easily reproduced with this code:

def script = "println 'hello world'"

evaluate(script)

After the first execution, no matter what you enter in the Script1 field, the original script is still evaluated.

---
Originally reported by mguillem, imported from: Replay doesn't allow to adapt evaluate(...) content


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

Raw content of original issue

Code executed by evaluate is displayed for modification in the Replay view but the modified content isn't taken into account.

This can be easily reproduced with this code:



def script = "println 'hello world'"

evaluate(script)


After the first execution, no matter what you enter in the Script1 field, the original script is still evaluated.

  • environment: Jenkins 2.414.3

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue in the Replay view with the provided evaluate(script) example, then trace how the Script1 content is displayed and passed to evaluate. Done means changing the displayed Script1 content causes the modified script, rather than the original script, to be evaluated.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.