Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,299,834
Community Members
 
Community Events
165
Community Groups

Why I can't add a condition to the Create Issue transition

Hi,

I want to add a condition to Create Issue transition in my workflow.

This transition is the only one that doesn't have possibility to add conditions or triggers.

I did a lot of internet search and reading, but the only statement I found is that you can't add a condition to the create transition.

Can someone help me understand why is this and how I can still add some condition when user creates an issue.

My particular case is that I want to add required fields only for issue type = Bug.

Is there any other possibility to do this except to create and maintain 2 different workflows and duplicate any work on them. 

5 answers

2 accepted

1 vote
Answer accepted

It's because there is nothing there when you use the transition.

A condition is something that decide whether to present an option to a user, it needs to be able to look at data in order to make the decision about whether a transition should be available to the current user.  When you are using "create", there is nothing for a condition to look at.  Without an issue, there's nothing it can work with.

Even if you could put a condition on a create transition, all it would be able to do is remove the "create issue" links.  It would be functionally useless.

There is some control over create though, you do it in permissions, by allowing people to create issues in the project (or not)

What you are trying to do is absolutely nothing to do with conditions.

You need to look at having a different "field configurations" - one for "bug" and one for all the other issue types in the project.  If you separate those, you'll be able to set mandatory fields for bug, while leaving them optional for the other issue types.

what if I want to set a condition based on the issue type and assign it to different users based on that?

eg.
if issue type is either Change request or New Feature -> assign it to User A, Otherwise assign all other tickets to User B

Thanks.

That's not a "condition", please see the original answer for what a condition does.

I disagree, it would be useful if certain issue types could be restricted to users with specific roles. For users that fall outside of those roles the issue issue type would not even be present as an option. This would be a condition that is checked when determining what issue types are allowed to be chosen. 

Like Mike DESILE Positive likes this

That's not a "condition", that's something that would have to be done before the workflow starts.

1 vote
Answer accepted

Hi @Elena Kotsinova ,

when you want to make a field required in general for a specific issue type, I'd go for updating the corresponding field configuration and make it required there - see https://confluence.atlassian.com/adminjiraserver0810/specifying-field-behavior-1014673967.html

Cheers
Thorsten

You can use a Validator on the create transition, and use a fields required validator (A validator supplied by JSU) or similar one.

So assuming your Bug issue type has its own workflow, that should do what you want. You will be unable to create the issue unless those fields are filled in.

Thank you all for pointing me the right direction.

I did the following:

1. Created a new  Field Configuration

2. Marked everything what I need to be required.

3. Associated this configuration with issue types through the field configuration scheme

4. Added this scheme to a project through  Project settings > Fields > Actions > Use different scheme.

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you