Multi-select job option used default values if nothing is selected

178 views
Skip to first unread message

sinist...@gmail.com

unread,
May 8, 2023, 4:37:39 PM5/8/23
to rundeck-discuss
Hello all,

I've got a job with a job option configured that allows multiple selections from an allowed list. Let's assume it's :
- option1
- option2
- option3

Option1 is also the default value, so whenever you run a new job option1 is pre-selected.

Input for this option is not enforced. It can be empty.
However, deselecting everything and running the job will set the options value to option1.

I've made a simple job that just echo's out the value of the variable and I'm getting this :
Selected : option1 (default), Output : option1
Selected : option1,option2, Output : option1,option2
Selected : option3, Output : option3
Selected : nothing, Output : option1
*changed defaults to option2,option3
Selected : nothing, Output : option2,option3


Is there any way around this? I'd really like to leave the default value in place, so users do not forget it in 90% of the use cases, but also leave the option to unselect it if needed.

Running version Rundeck 4.10.0 2023-02-13

rac...@rundeck.com

unread,
May 8, 2023, 5:22:44 PM5/8/23
to rundeck-discuss

Hi!

Weird. I was able to see that behavior (on Rundeck 4.10.2) but after touching “required”/“restriction” parameters (and save it) it works as expected (your goal) . Could you try with the following job definition?

- defaultTab: nodes description: '' executionEnabled: true id: eac8952d-347d-4400-bc2f-945c7884267a loglevel: INFO name: Hiya nodeFilterEditable: false options: - delimiter: ',' multivalued: true name: user value: 'bob,charlie' values: - alice - bob - charlie valuesListDelimiter: ',' plugins: ExecutionLifecycle: null scheduleEnabled: true sequence: commands: - exec: echo ${option.user} keepgoing: false strategy: node-first uuid: eac8952d-347d-4400-bc2f-945c7884267a

Try editing the job, change some parameters like “restriction”, save your job and try again.

This could be a strange bug related to options.

Also, could you share your example job definition to take a look?

Thanks!

rac...@rundeck.com

unread,
May 8, 2023, 5:29:08 PM5/8/23
to rundeck-discuss
My mistake, you're right, if you don't select any option, Rundeck prints the default one. This is the default behavior. Please open a new issue here.

sinist...@gmail.com

unread,
May 10, 2023, 5:23:07 AM5/10/23
to rundeck-discuss
Thanks for taking the time to confirm this.
I've opened #8314 on the issue tracker, fingers crossed.

Reply all
Reply to author
Forward
0 new messages