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

Counting of linked issues results in an incorrect value

Edited

I created an automation in a project that is a manually triggered rule (for now).

In the automation, I do a lookup with the following query: "issue in linkedissues({{issue.key}}) and type = bug "

When I run the same query in ScriptRunner, I get 11 results for the target issue, so I believe this is correct:

Scriptrunner results automation.png

In the automation, I then edit the issue using {{lookupissues.size}}.  When I run to automation, the field is set to zero, and not the expected 11.

What am I doing wrong here? 

automation setup.png

I did try changing the edit value from "{{lookupIssues.size}}" to "={{lookupIssues.size}}" and then got the following error in the audit log:

Action details:
MANUAL TRIGGER
The user Matthew Noe triggered the rule
LOOKUP ISSUES
A search during custom value definition found no issues.
EDIT ISSUE
Could not convert the field value to a number. Please ensure the value is a number, math expression or smart-value that can be converted into a number.
Bug Count: =0
No fields or field values to edit for issues (could be due to some field values not existing in a given project):
CBE-16626

1 answer

1 accepted

1 vote
Answer accepted
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Mar 15, 2023

Hi @Matt Noe 

Works fine here:

bugrule.png

Is the field you are trying to edit available on the specific project?

The field is available on the project.  The only thing that I can think of is that the linked issues is a part of a separate project?  Does my automation have to be moved to global because of it?

Project being run against is CBE-XXXXX Linked issues  are BUG-XXXXX

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Mar 15, 2023

Prior of changing the rule to global, try the following query on your lookup component:

issue in linkedIssues(CBE-16626) and issuetype = bug

Click validate query and see how many issue it will return 

Thanks @Alex Koxaras _Relational_ .  I tried it on both the project specific automation and the global.  Project specific returns 0 and global returns 11.  Looks like that is my problem.  

Thank you for your help!

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events