Forums

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

how the lookupIssues.size work?

Mar Angelo L. Tareno
Contributor
September 17, 2025

the {{lookupIssues.size}} did not work to check if the requestor send his/him first request ever.


here, the example scenario,


the requestor is sending a ticket for the first time,

then the automation must check if the requestor first request ever made then edit custom field.



request.png

3 answers

2 votes
Fabian Lim
Community Champion
September 17, 2025

Hi @Mar Angelo L. Tareno ,

The issue may be that the value of rereporter is not the same as {{issue.reporter}}.  

You may want to use {{reporter.displayName}} instead.  I'm not sure what the value of rereporter is so you have to figure out if it's holding the user display name or the account id.  

This will help you: https://community.atlassian.com/forums/Jira-Service-Management/how-the-lookupIssues-size-work/qaq-p/3113194

I suggest you use the Log action with the smart values to ensure you are getting the right thing.

Fabian

1 vote
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 18, 2025

Hi @Mar Angelo L. Tareno 

Yes, and...to the suggestions from others:

The behavior of the list size function can be inconsistent, such as when no work items are found for the Lookup Work Items action.  That could definitely happen in the rule you show due to known, racetrack timing problems with the Work Item Created trigger.  Some adjustments to your rule to mitigate these causes are shown in bold below to add a re-fetch action and a default value for the function:

  • trigger: Work Item Created
  • action: Re-fetch Work Item Data
  • action: Lookup Work Items, with the corrected JQL from Trudy and Fabian
  • smart values condition:
    • first value: {{lookupIssues.size|0}}
    • condition: less than
    • second value: 2
  • action: Edit Work Item...

 

Kind regards,
Bill

0 votes
Trudy Claspill
Community Champion
September 18, 2025

Hello @Mar Angelo L. Tareno 

The issues is that you have specified the wrong field in the JQL in your Lookup Issues action.

If you want to filter based on the value in the native Reporter field you need to use "reporter" not "rereporter".

Using this will work. I have successfully tested it.

reporter = {{issue.reporter}}

Note that the Lookup Issues action can return no more than 100 issues. But if you don't want to know the actual total count beyond 100 issue then that will not impact your rule.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events