Forums

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

How to update issue status when the issue is created from Service Desk

Kelsey Smith January 6, 2023

I have a portal where users can submit a ticket. When the ticket is changed to the "Approved" status, an automation creates an issue on our software board.

Note: The software workflow's initial status is "Board Review".

Goal: There are some issues, that we are giving a specific label, that will need to skip that step and go straight to "Backlog".

The automation is creating the issues on the software board, but I cannot get it to change the status to "Backlog" when it has the specific label (I am using the if block condition).

Things I've tried:

  1. When creating the issue, add an action of transition issue. This did not work because it was referencing only statuses in the service desk.
  2. Trigger is "Issue created". It does work if I can create an issue directly in the software board.
  3. Tried the trigger "Issue transitioned".
  4. Tried the trigger "Issue updated".

Since #2 worked, it leads me to believe that I don't have the correct trigger which is why I attempted #3 and #4. Any advice or suggestions would be greatly appreciated.

2 answers

1 accepted

3 votes
Answer accepted
Ste Wright
Community Champion
January 6, 2023

Hi @Kelsey Smith 

I'm assuming you're using Automation for Jira.

Can I confirm the logic is:

  • When an Issue transitions to "Approved" in Project A
  • Create an Issue in Project B
  • And if the Issue has Label A, transition the Issue in Project B to Backlog

If yes, please see below.

---

The rule will look something like this:

  • Trigger: Issue Transitioned
    • To = Approved
  • Condition: Issue Fields Condition
    • Field = Project
    • Condition = equals
    • Value = Project A
  • Action: Create Issue
    • Project = Project B
    • Issue Type = <Issue Type Here>
    • Fields = <Fields Here> - copy across the label(s) into the new Issue
  • Branch: Related Issues
    • Type = Most recently created issue
      • Branch-Condition: Issue Fields Condition
        • Field = Labels
        • Condition = equals (in any order) OR contains any of
        • Value = <Label Here>
      • Branch-Action: Transition Issue
        • Destination Status = Backlog

---

A few notes about this rule:

  • I've made some assumptions about how the rest of the rule might look - the important part for you is the Branch after the issue is created / cloned into Project B
  • The Branch-Condition assumes the label(s) are copied across into the new Issue - if they do not, you could use the Advanced Compare Condition instead:
    • First Value = {{triggerissue.labels}}
    • Condition = contains OR equals
    • Second Value = <Label Name Here>
  • The Branch-Condition could be equals or contains - depending if there's always one label, or multiple. The same logic could be applied to the Advanced Compare Condition above
  • This rule will need to be a Multi-Project / Global Rule, rather than a single Project rule

---

Let us know if this works for you!

Ste

Kelsey Smith January 9, 2023

Your logic is correct. 

Oh goodness, I knew it was going to be something simple. I didn't make it global! 

Thank you so much!

Like Ste Wright likes this
0 votes
Vamsi Kandala
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.
January 6, 2023

Hi @Kelsey Smith

Welcome to the community!

You can use the project automations and use the 'Field value changed' trigger.  

Select the field 'Label' for 'Fields to monitor for changes' and 'Edit issue' for the 'For' option.

Add additional condition to check for correct issue type.

Then select the 'Transition issue' as the 'New action' component and select the appropriate status you want to transition to (in this case 'Backlog').

Note that the workflow should have the transition from the current status to 'Backlog' when the automation rule is triggered.

Hope this helps.

Thanks,
Vamsi

Suggest an answer

Log in or Sign up to answer