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,364,698
Community Members
 
Community Events
168
Community Groups

Automation to find empty colum

I'm writing an automation to send a message to Slack when:

Trigger: issue transitions from Status A to Status B

  Then: Lookup Issues

     JQL Search (sprint in openSprints() and status = "QA Review"

  IF: Matches

     {{lookupIssues.size}} equals 0

  THEN: Send slack message

 

Basically, if an issue transitions out of QA review, and there are NO issues remaining in QA review, then I want to send a message in slack prompting a deployment to our stage environment.

The problem is that the automation is saying "no issues matched your jql search" (which is good!)... so it's skipping the if: matches block. 

How do I test for the absence of issues in a specific column so I can then take an action?

 

2 answers

1 accepted

0 votes
Answer accepted

Hello @kevinsherman 

Can you show us the details of your Lookup Issues action and your IF component?

Is "QA Review" an actual Status, and is it the only Status mapped to the column you are wanting to check?

I did a similar rule checking the In Progress column, where "In Progress" is the one and only status mapped to the column. My rule did not stop with the Lookup Issues condition. I think your IF component may be incorrect. I used the Advanced Compare Condition for that component.

Screen Shot 2022-08-25 at 4.30.14 PM.png

0 votes

You'll need to look at the current column definition (the status it contains) and add that into your query.

If, for example, your "test" column contains the status dev-complete, int-test and QA, then 

sprint in openSprints() and status in (dev-complete, int-test, QA) 

will return 0 when the column is empty, and you can use your if based on that 0 result.

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events