The Groovy system script to execute for determining the choices. The list returned from the script is treated as choices. It is treated as followings:


Here is an example:

Example1----------------------------------------------------------------------------- // a simple example returning fixed choices. return ["choice1", "choice2", "choice3"]; Example2----------------------------------------------------------------------------- // choices 1,2,3,...,10. return 1..10; Example3----------------------------------------------------------------------------- // today and last 6 days return (6..0).collect{it -> new Date().plus(-it).format("yyyy-MM-dd")};
About securities about Groovy script, see Script Security Plugin.
For security reasons, when calculating choices in "Default Choice" and when "Run the Script Now" is clicked, the Groovy script is exuecuted in this way: