Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
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

Slack Messages includes issues not included in lookup

Trying to create an automation that sends issues still in review for a specific Jira Board.


Screen Shot 2021-09-05 at 1.32.14 PM.png

 

The challenge is that the Slack Message includes additional issues that are not included in the Lookup Issues.

For example, this SQL finds 4 issues for this CS board (see image). However, the Slack message in the channel shows 33 issues (includes issues in review rom other projects). Why are other projects included in the slack message? 

 

Screen Shot 2021-09-05 at 1.32.46 PM.png

Slack message field:

Currently there are {{lookupIssues.size}} tickets in review,

{{#lookupIssues}}
:white_medium_small_square: <{{url}} | {{project.name}} - {{key}} - {{assignee.displayName}} - {{summary}}>
{{/}}

1 answer

1 accepted

3 votes
Answer accepted

One thing that pops out at me immediately is I believe your JQL may be flawed? As written that JQL will return issues outside of your CS project since you have the OR statement outside of any parentheses. Maybe your JQL should look like this?

project = CS and status in (“in review”, “in test”)

Thanks, Jack! The JQL seems to come back with 4 issues which is the number I expect. 

It doesn't seem to like this JQL? Maybe because of the "in" word is part of the status

Screen Shot 2021-09-05 at 4.12.18 PM.png

Curt Holley Community Leader Sep 05, 2021

The JQL looks right. By having those multi-word statuses in quotations should take care of the confusion it is complaining about.

Jack Brickey Community Leader Sep 05, 2021

@Andrew Hickey , a couple of comments…

  • as Curt indicated the JQL looks correct from what I can see
  • The odd thing is that The error is saying there is an error at character 59. Well there’s only 51 characters in that check you well.
  • If you paste that JQL directly in the advanced search does it work? Maybe you’ve already tried that as indicated by your text above - The JQL seems to come back with 4 issues which is the number I expect. 
  • Is this a project rule or global rule? If project then remove the “project = CS” and simply use Status in (“in review”, “in test”). Tip, get your JQL working in the advanced search first then copy and paste it directly into your rule.

Thanks @Jack Brickey and @Curt Holley ! 

1. This is a project rule. I included the "project = CS" just in case it was helpful. 

Screen Shot 2021-09-05 at 4.55.58 PM.png

2. Excluded the "project = CS" but still receive the same error :/ 

Screen Shot 2021-09-05 at 4.57.03 PM.png

3. Regardless, my previous JQL receives 4 issues found, but my slack message shows 33 issues. 

 

Screen Shot 2021-09-05 at 5.03.44 PM.png

Screen Shot 2021-09-05 at 5.00.44 PM.png

Screen Shot 2021-09-05 at 5.04.54 PM.png

 

4. If I remove the "Project = CS" from my initial JQL, then my slack message shows 47 tickets (despite this being a project rule)

Screen Shot 2021-09-05 at 5.00.00 PM.png

Screen Shot 2021-09-05 at 5.00.44 PM.png

Screen Shot 2021-09-05 at 5.02.51 PM.png

Curt Holley Community Leader Sep 05, 2021

Put the Project = CS back into your lookup issues action.

and

What is in your schedule? does it have any JQL configuration? 

If not, then add your same JQL there. That way only those 4 issues are part of the rule from the get go.

Of course all of this does require getting your JQL to work. But totally agree with @Jack Brickey . Get it working in Advanced Search, copy into the rule....and it should be fine.

Thank you @Curt Holley and @Jack Brickey ! 

The advanced search helped a lot. Just copied into the rule like you suggested :) 

 

for anyone experiencing a similar challenge, I updated my JQL as listed below after testing with the Advanced Search

 

(project in (10017)) AND (Project = CS AND status = "in review" or (status = "in test"))
Curt Holley Community Leader Sep 05, 2021

That is an interesting JQL.

Why the (project in (10017)) part? as surely that has to be the CS project or the query would not return anything due to the AND statement.

I'm also frustrated by you not being able to get away with:

Project = CS AND status in ("in review", "in test")

as it really should work. 

For the record; You are using Jira Cloud...yeah? or......?

Agreed ... not sure why the

(project in (10017)) AND ...

resolved the issue. 

 

Yes! Jira Cloud. 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira

Do you use Jira Cloud with Microsoft Teams?

Hi, Jira users! Do you use Jira alongside Microsoft Teams? We want to hear how you’ve used the power of Jira Cloud and Microsoft Teams (via the Jira Cloud for Microsoft Teams app) to achieve a team...

481 views 3 7
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