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,300,003
Community Members
 
Community Events
165
Community Groups

Automation - create an issue and then update that new issue

I have an automation that will create a new issue. I then need to update the request type on that issue I've just created (either that, or I create a request type and then update a field on that same request type).

How do I refer to the "new issue" within the automation? 

3 answers

1 accepted

1 vote
Answer accepted

Hi Mary, 

I can think of 2 ways to set/edit the request type of an issue. 

  1. Use the Create service request action instead of the Create issue action. This will allow you to set the Customer request type field to the desired request type at issue creation.
    Option1_CreateServiceRequest_Action.png
  2. Add a Branch rule action after the Create issue action, setting the related issue type to Most recently created issue. Then within that branch add an Edit request type action and choose the request type you desire.
    Option2_CreateIssue_EditRequestType_Actions.png

The Branch rule action using the Most recently created issue related issue type is how you can refer to issues created within the same automation rule. 

I'll have to try the Branch rule action - I didn't know about that. Thank you.

(If I create it as a Service Request, I end up with the same problem because I can't copy over the Insight object field at creation)

The Create service request action might actually work for you. 

  1. Use Create service request, and set the request type
  2. Use Branch rule for the Most recently created issue
  3. Use Edit issue to copy the Insight object field value from the trigger issue.

CopyInsightObjectField_AfterCreation.png

Would this achieve your goal?

2022-05-17_16-00-46.jpg

Here's the step where I create the issue. For the next step, I want to update the request type of this issue.

I don't see an option to set it at creation (unless I do it in the "More options" section?

0 votes
John M Funk Community Leader May 17, 2022

Hi Mary,

Can you post the rule that you have so far that creates the issue? 

Why don't you add the update right after the create? Or even include the value for the field when you create the issue? 

John M Funk Community Leader May 17, 2022

When you click on Choose fields to set ...  you can't find the Request Type field? 

Nope. Not sure why it's not there, but it isn't. 

John M Funk Community Leader May 18, 2022

And this project is a JSM project? Because I see the Request Type field in the dropdown under Choose fields. 

Hi John, if you try selecting the Customer Request Type field on a Create issue action the following error message will be displayed. CantUseFieldCRT.png

Like John M Funk likes this
John M Funk Community Leader May 19, 2022

Ah, that's good to know. That should work though. :-)

Yeah I think it should work as well. I'm curious to know the reason why editing that field has to be done within its own Edit request type action. 

John M Funk Community Leader May 19, 2022

I am sure there are a lot of other things tied to it. I remember that they only added that function in the past year or less. 

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