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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Create issue if a filter is not empty

I want to create a jira issue/ticket for a filter if it's not empty and link the tickets. 

 

For example, I have tickets moved to "backlog" but did not enter a "follow up" date, so I have a filter to return those tickets. 

project = KBS AND "Follow Up[Date]" = EMPTY AND type != epic AND resolution is EMPTY ORDER BY created DESC

I want each morning for a new issue to be created linking any tickets that are pulled by this filter with a new issue called "assign dates" or something. When I tried to automate it made a new issue for each issue returned by the filter, not one issue linking all of the issues.

3 comments

Comment

Log in or Sign up to comment
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Sep 09, 2021

Hi Jacob,

You can create a Scheduled trigger in Automation for Jira to do that. 

Like Sarah Elmer likes this

Hi Jacob, 

As John referenced you can use the scheduled trigger in automation, set the JQL condition (if JQL matches X) then set a new action to create ticket! 

Like Sarah Elmer likes this

Screenshot 2021-09-09 at 16.47.31.png

Looks like this at a super top level

Mykenna Cepek
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Sep 09, 2021

From the OP, it sounds like the concern is that his rule creates multiple tickets when he wants just one ticket created. I suspect the problem isn't the trigger or using JQL.

Is that right, @Jacob Rosenfeld? If so, it would help us to see a screenshot of your rule (similar to what @Margareta Buruian illustrated above).

Correct. It wasn't just the issue creation, I also wanted them linked within the issue.

 

This is the rule that made a new issue for each issue returned. 

image.pngimage.png

Mykenna Cepek
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Sep 09, 2021

I notice in your trigger that you have this box checked:

Screen Shot 2021-09-09 at 11.35.21 AM.png

Note how this says that it will execute actions (your "Create issue" component) for each issue in the JQL result.

Have you tried unchecking that box and testing the rule?

Then I can't run the JQL and nothing happens. 

Mykenna Cepek
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Sep 09, 2021

So it seems that using JQL in the Scheduled trigger isn't going to do what you want.

I'm going back to your OP, where you stated:

I want each morning for a new issue to be created linking any tickets that are pulled by this filter...

To run a rule once per day, you do need to use the Schedule trigger. So uncheck the box and skip the JQL in the trigger component of the rule.

Here is some pseudocode for what I suggest for your rule (after the trigger):

1. Terminate early if no issues match your JQL

2. Create a new issue

3. Loop through the JQL and link to the new issue

For part 1, use a JQL Condition with your JQL. If no issue match, the rule will not continue. No new issue will be created (I think this is what you want, right?).

For part 2, use the Create Issue action.

For part 3, start with a Branch / Related Issues component, configured with "Type of related issues" to contain your JQL. In that loop, use the "Link issues" action which allows you specify the "Most recently created issue".

Like # people like this

Ok, this is what it looks like now and it's working. Thanks!

image.png

Like # people like this
TAGS
AUG Leaders

Atlassian Community Events