Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation: Issue fields condition for issue type does not work

Glenn Ruysschaert
Contributor
June 27, 2024

Helllo,

 

I have a trigger "When: issue transitioned".

I want to check if the parent is an epic, and if so continue with my flow.

 

This is what that part of my branch looks like:

Screenshot 2024-06-28 at 07.51.09.png

 

But when the rule gets triggered by a child with an epic, the step fails, even though in the logs I can see the issue type is an epic.

Screenshot 2024-06-28 at 07.51.25.png

The log "Is epic' does not show up.

 

What am I doing wrong here?

 

Kind regards

4 answers

2 accepted

0 votes
Answer accepted
John Funk
Community Champion
June 28, 2024

Hi Glenn,

First, not sure why that does not work. But, maybe you can work around it by adding a Condition right after the Projects condition to check for the Issue Types that would have Epic as a parent. Also, if you create the rule to be a Multiple projects rule and select those projects in the Rule Details, you shouldn't have to do a Condition here to check the Projects. 

Or the other thing is perhaps the Epic is not in one of the Projects you listed above? 

0 votes
Answer accepted
Trudy Claspill
Community Champion
June 27, 2024

Hello @Glenn Ruysschaert 

What is the project type of the project that contains the Epic? Get that information from the Type column on the View All Projects page under the Projects menu.

Is this rule scoped to a single project, or multiple projects?

Was this rule created by copying another rule or have you changed the project(s) in scope since setting up the condition to check if the parent issue is an Epic? You need to select the project(s) in scope before setting up a condition that will check issue type, especially if the project in scope is a Team Managed project. The Issue Types in Team Managed projects are unique, even when they have the same name as another issue type defined globally or in another Team Managed project. If you changed the project in scope and did no update the condition to reselect the Epic value, then the condition may fail due to being compared to a different Epic issue type that has a different unique numeric identifier in the database.

Glenn Ruysschaert
Contributor
June 27, 2024

Hello @Trudy Claspill ,

 

There are multiple projects, they are all "Company-managed software".

Screenshot 2024-06-28 at 08.58.04.png

 

The rule was new.

I tried deleting and creating a new "Issue Type equals" step, but this had no effect.

 

Kind regards

 

Trudy Claspill
Community Champion
June 28, 2024

What do you have in the Rule Details page for project scope?

Glenn Ruysschaert
Contributor
June 28, 2024

Hello @Trudy Claspill ,

 

Screenshot 2024-06-28 at 15.59.12.png

Trudy Claspill
Community Champion
June 28, 2024

This is puzzling. I have not been able to recreate this problem in my own system, creating the same type of rule that has multiple Company Managed projects in scope.

Can you confirm that you don't have a second field named "Issue Type"? Jira does not require that custom fields have unique names. It is possible that somebody has created a custom field that reused the "Issue Type" name.

Trudy Claspill
Community Champion
July 1, 2024

Hello @Glenn Ruysschaert 

You said you checked the issue types. I was not asking you to check the issue types. I was asking you to check the Custom Fields to find out if there is a custom field named "Issue Type".

https://<yourURL>/secure/admin/ViewCustomFields.jspa

There should not be a field on that page named "Issue Type". If there is, that is the root of your problem.

You can also try using a Smart Value condition rather than an Issue Field condition, and comparing the {{issue.type.name}} to "Epic", as a workaround.

Glenn Ruysschaert
Contributor
July 1, 2024

@Trudy Claspill 

 

Ah, my bad, I misread what you said.

There is no custom field with that name.

Screenshot 2024-07-01 at 09.20.18.png

I tried with a Smart Value, and that seems to work.

However, the original automation is not only for Epics but also Initiatives.
That's why I used the Issue Type, because you can say "one of" (Epic or Initiative).

With Smart Values, I don't know how to do an "or".
Unless I duplicate the branches (for epic and initiative), which is less great for maintenance.

Trudy Claspill
Community Champion
July 1, 2024

You could try a JQL condition (ignore the Trigger in my example)

Screenshot 2024-07-01 at 12.32.16 AM.png

Glenn Ruysschaert
Contributor
July 1, 2024

@Trudy Claspill 

Yes, that worked!

It works in the simplified automation and the full automation, when I replace the built in "Issue Type" check with your JQL condition.

Thank you very much!

Like Trudy Claspill likes this
Trudy Claspill
Community Champion
July 1, 2024

You're welcome!

If my responses helped you solve your problem, please consider clicking the Accept Answer button for my answer.

I am still puzzled as to why the Issue Field condition didn't work. That is so strange!

0 votes
Glenn Ruysschaert
Contributor
June 30, 2024

@Trudy Claspill 

Hello,

I checked the issue types, there is only one of each.

I recreated a very basic setup (this time with only one target project), and it still does not work.

The epic and story I am testing with is this, I am changing any of the story statuses:

Screenshot 2024-07-01 at 08.46.58.png

This is the basic setup:

Screenshot 2024-07-01 at 08.47.12.png

 

And the result from the audit log:

Screenshot 2024-07-01 at 08.47.21.png

 

Do you spot something I did wrong?

Kind regards

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 28, 2024

Hi @Glenn Ruysschaert 

For a question like this, please post images of the complete rule (in one image) and the complete audit log details showing the rule execution (in one image).  Those will provide context for the observations / symptoms.  Thanks!

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events