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

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,467,417
Community Members
 
Community Events
177
Community Groups

Roll up story points to epic failing on JQL clause

 

The Lookup clause below is causing an error when the Epic titles contains spaces:

issuetype in (Story) and "Epic Link" = {{issue.epic name}}

Lookup issues
There was an error executing a search during custom value definition: .
Custom Smart Value JQL Search: "issuetype in (Story) and "Epic Link" = Testing Framework" - Error in the JQL Query: Expecting either 'OR' or 'AND' but got 'Testing'. (line 1, character 49)
The above error does not occur when the Epic Link and Name do not contain spaces:
Epic Name:  Test Framework [Creates error]
Epic Name:  TestFramework [When the epic name does not contain spaces this clause works, which naturally does not work as epic names will have spaces.]  I determined this by removing the spaces 'TestFramework' and the OR or AND error above goes away.

Capture.JPG

2 answers

1 accepted

0 votes
Answer accepted

Hi @Neil Wills 

You can wrap the smart value in quotes  to cater for multi-word strings: “Epic Link” = “{{issue.epic name}}”

by adding quotes to “{{issue.epic name}}” does this cast the expression to a string?

There is no casting involved. You are simply wrapping the output of the smart value in quotes so that the JQL is valid in the same way that a manual JQL query needs to have values with spaces quoted. 

0 votes

Hi @Neil Wills 

I believe that epic link is actually a key value, and just renders as the epic name in the user experience views.  Please try this instead for your JQL in the lookup issues action:

issueType IN (Story) AND "Epic Link" = {{issue.key}}

Best regards,
Bill

I'll experiment, I suspect the issue.key might not match "Epic Link" depending what the value of issue.key is.  I used the above solution also.

Gotcha, and...

  • Inside of the branch you showed, the {{issue}} will always be the epic, as that is the current context/scope
  • If also inside the branch, you wanted to access the story which fired the rule you would use {{triggerIssue}}
  • Once back outside the branch, {{issue}} would once again refer to the trigger issue (the story)
Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events