Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Get transition name with Automation

Hey guys, how are you doing?

Here's what I need to do: from an incident or Service Request, to be able to create a Change or a Problem.

As I have just Automation for Jira, I'm addressing it this way:

I have 2 "general" transitions (the ones that go from any status to itself) on my workflow: Create Change and Create Problem.

Then, I have an automation which creates a change, with an IF to check is the status changed from it to itself ({{changelog.status.fromString}} == {{changelog.status.toString}}), but, this is triggering both automations.

I wanted to make an if clause, to check which transition was made.

Is this possible to achieve using smart values? Or any other if condition?

1 answer

1 accepted

1 vote
Answer accepted
Andy Heinzer Atlassian Team Apr 21, 2020

Hi Vando,

I'm well, thanks for asking.  I see that you are looking to use some kind of smart value to distinguish these two different looped transitions.   I do not believe there is any such smart value that will help in regards to being able to know the name of the transition called. The available smart values in Smart values - general simply do not extend to that info.

However I think there is a way you could make this work.  I would actually look to adjust the workflow here.  In Jira Cloud you could easily change the workflow for one of these transitions so that you could add a post function of type "Update Issue custom field" to one of these transitions.  It could then change the custom field to some value that is unique to that transition.  I recommend that this post function come before the one called 'Re-index an issue..' to try to make sure we avoid any race conditions.

You could then try to check for the existence of that custom field value on the issue to see which transition executed it.  To make this work, you would need to also change the workflow of the other transition and give it a different value to set.  That way the custom field could be overwritten by each of these transitions and in turn should only trigger the automation actions of the most recent transition.

Let me know if this helps.

Andy

Hey Andy!

Took me a while to get back to this, sorry!

I just did as you said, and it worked!

 

Thanks so much!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Jira Service Management

Why upgrade to Jira Service Management Premium?

We often have questions from folks using Jira Service Management about the benefits to using Premium. Check out this video to learn how you can unlock even more value in our Premium plan.  &nb...

227 views 1 6
Read article

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