Forums

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

Filters in Automation Rules

Micah Harley May 16, 2018

I am trying to use saved filters in Automation rules... I can get rules to meet conditions of normal saved filters, but cannot get them to work with filters created with ScriptRunner Enhanced Search.

I'm assuming it is a timing thing... Since scriptrunner turns sub queries into regular jql, I think the automation rule is checking before that takes place. 

Has anyone had luck with running ScriptRunner filters in Automation Rules?

Simple recreate:

  1. Saved filter named testRegularFilter: resolution is empty (or any normal jql)
  2. Saved filter named testSRFilter: project= "projectName" AND resolution is empty AND issueFunction in linkedIssuesOf("resolution is not empty") AND NOT issueFunction in linkedIssuesOf("resolution is empty") Translation: Unresolved issues where all linked issues are resolved
  3. New Queue named testQueue: filter = testSRFilter (works great as long as filter does not return issues from projects that the queue is not in)
  4. New Automation Rule: When issue is created -> condition, issue matches, filter = testRegularFilter -> alert user (works great, so regular filters in automation rules work)
  5. New Automation Rule: When linked issue is transitioned -> condition, issue matches, filter = testSRFilter -> alert user (fails to meet condition, so scriptrunner didn't update filter before condition check is assumed)

 

1 answer

0 votes
Greg Bailey
Contributor
October 16, 2019

I have the same issue but with a twist.

I'm creating a rule looking for the sprint field changing and then matching a JQL that uses the removeFromSprintAfterStart and AddedtoSprintAfterStart Issuefunctions.  The rule is not firing when an issue is added to an active sprint or when an issue is moved out of an active sprint to a sprint that has not yet started.  However, it does fire when I move an issue out of an active sprint into the backlog.  

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events