Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Looking for inspiration? Our Jira Expressions Cookbook shows you what cool things are possible with Jira Expressions.

Contents

Table of Contents

Issue must be in current sprint

Need to make sure that an issue is part of the current sprint? That’s a breeze with Jira Expressions. This is typically useful as part of a workflow condition or a workflow validator.

Context

  • issue

JQL

--

Expression

issue.sprint.state == 'active'

Example Result

true

Ensure specs and tests have been written

Whenever you are about to start working on a story you’ll want to make sure that all specs and a test plan are complete and available . Let's assume that both, specs and test plans, each have certain issue type. This is typically useful as part of a workflow condition or a workflow validator.

Context

  • issue

JQL

--

Expression

Code Block
issue.links
  .filter(li => li.linkedIssue.issueType.name == 'Spec' 
             && li.linkedIssue.status.name != 'New').length > 0 
&& issue.links
  .filter(li => li.linkedIssue.issueType.name == 'Test Plan' 
             && li.linkedIssue.status.name != 'New').length > 0

Example Result

true