Hi All,
How to check one custom field( Checkboxes ) values in single cfValues script ??
I am trying to create a subtask automatically when parent issue is created based on custom field value selection.
we have a custom field( Checkboxes) called "Implementation Method" ,it has options A, B, C and D and I want to put a condition that if user select B and C while creating parent issue it should not create a subtask automatically.
If user selects option A or D, subtask should get created.
I've added Create sub-task(Script runner) post function and added below condition
cfValues['Implementation Method'] != "B" && "C"
Sub-tasks is getting created even when option B and C are selected together.
Any help??
Thanks in advance
I would suggest to use other alternatives to create a sub-tasks. Script runner one isn't required for this simple requirement. However, you can use the below in your condition -
cfValues['Implementation Method'] != "B" || cfValues['Implementation Method'] !="C"
Let me know if this doesn't work!
You can use JMWE Create / Clone Issue(s) Post-function for this too. (Paid app)
Project -> Same as the current issue
Issue type -> Sub-tasks
Condition:
issue.getAsString("Implementation Method") == "A" || issue.getAsString("Implementation Method") == "D"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Aditya Sastry I tried below script, not working apparently. Even when value B is selected, it creates a subtask which is not expected behaviour.
cfValues['Implementation Method'] != "B" || cfValues['Implementation Method'] !="C"
JMWE has a cost involved so it will not be possible to buy at this point of time for my organization.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, so I looked into this and checkboxes work differently. This is the condition you should use -
'A' in cfValues['Call-out']*.value || 'C' in cfValues['Call-out']*.value
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.