Hi,
I have created automation rule with condition stating issue type bug and it should create jira ticket from certain list of components(eg: component A, B,C,D) and not select other components present in the project , Can you let me know what condition to be set in automation rule.
Regards,
Suma
Hello @Kustagi Suma
Welcome to the Atlassian community.
Let me restate your requirement as I understand it.
In your project you want to be able to define a set of Component values per work item types. i.e.
WHEN a user creates a Bug type issue in a specific project
THEN the list of values in the Components field needs to be a subset of the Components values available for the project
Is that correct?
If I have understood your requirement correctly, then be advised that the Automation Rules feature is not able to modify what values/fields are available in the Create Work Item dialog.
To do that you would need a third party app such as ScriptRunner Behaviours or JMWE Live Fields.
Automation Rules are designed to react to events like Item Created or Item Updated. An Automation Rule could be used after the issue is already created/saved to remove the unacceptable Component values.
Hi @Kustagi Suma ,
Can you maybe share some additional details about the use case?
I'm not entirely clear what the trigger here is, and what actions you'd like to use.
For example:
...it should create jira ticket from certain list of components(eg: component A, B,C,D)...
Are you looking at an existing work item and, based on the components selected there, you would like to create a new 'ticket'? Or, is it that for each component within the project, you would like to create a new work item once a bug is created? 👀
Generally, you could use 'Work item fields condition' and select/configure how the condition should behave based on Components field.
Cheers,
Tobi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So whenever new ticket is created it should pick component from the given list.Please let me know if this helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suma,
My name is Nacho and I am part of Decadis.
If using a third-party app is an option for you, i would like to recommend the Jira expression validator from our app Jira Workflow Toolbox Cloud.
By simply creating this validator in your workflow transition and entering the following Jira expression, you will achieve the desired result.
Here is the expression that can be set in the validator, along with a corresponding screenshot:
issue.issueType.name == "Bug" ? issue.components != null && issue.components.length == 4 && ["A","B","C","D"].every(name => issue.components.some(c => c.name == name)) : true
This would force the selection of the components "A", "B", "C" and "D" for the transition to succeed if the issue type is "Bug".
If you have any further questions, please feel free to create a request in our support portal.
Best regards,
Nacho
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please explain more, as its not clear to me what your requirement is.
Do you only want to create a ticket based on type Bug and if the components on the trigger issue are set to a certain value.
Please also show screenshots of your rule and the audit log and where yoi think the problem currently is.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My requirement is whenever a Bug is created in a project , it has certain components present which are applicable only to bug and not to stories or other issue type. Can we achieve this through automation rule ??
So I have created automation rule
1.When issue is created
2.condition issuetype=Bug
3.Should I do issue field condition scenario or we have any other option?
Regards,
Suma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No this would require an app like scriptrunner or JMWE as mentioned by @Trudy Claspill
This is not possible with automation
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.