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,361,196
Community Members
 
Community Events
168
Community Groups

Counting of issues with {{lookupIssues.size}} does not work

Hello Atlassian Community!

I have a question regarding to the function {{lookupIssues.size}}. With that function we want to count our linked issues.

Our use case is that smartphones get linked to a purchase order and with our field "Cycle Count" we would like to see how often the smartphones were linked. 

But now this seems to not work, even though no error is shown in the audit logs. 

We created following automation: 

Automation.PNGCycle Count function.PNGMaybe someone can help us with our problem.

I look forward to hearing from anyone.

 

P.S. If further information would be needed, please feel free to ask and comment.

 

Thank you in advance.

 

With best regards,

Iris Studeny

1 answer

0 votes

Hello @Iris Studeny 

Welcome to the community.

In what way exactly is this not working? Are you not getting the value you expect from {{lookupIssues.size}} ?

Have you used the JQL you have in the Lookup Issues action in the Advanced Issue Search screen to confirm that it is actually finding any matching issues? Of course, you will need to substitute the actual issue key value for the smart value when you do that.

Hello @Trudy Claspill 

Thank you for your reply.

 

Yes that is exactly our problem: We do not get the expected value of it. For example, there are two linked issues and it gives us 0. 

No we did not try your hint, should we?

Hello @Iris Studeny 

Yes, you need to try that.

It is highly probably that your JQL is not finding any matching issues and that lookupIssues.size is giving the correct data.

Hello @Trudy Claspill 

Ok so you mean to give our following JQL in the search field: issue in linkedIssues({{issue.key}}) and issueLinkType = "has active Hardware assigned" 

 

Thank you in advance!

You will have to replace {{issue.key}} with the ID of an actual issue that triggered the rule.

Ok thank you for your answer.

So you mean, that I enter for ID a smartphone and then the result shoul be for example three purchase orders that were linked to the smartphone? 

Do I understand it right? 

I mean the ID of a Jira issue where you have added a "Hardware Item(s) - Purchase Order" link to another Jira issue.

@Trudy Claspill Ok thank you for clarification. 

Now I did following:  

1. see Picture "Step 1" Step 1.PNG

2. No issue were found see picture "Result"Result.PNG

3. But phone has got one link see picture "PHONE-1283"PHONE-1283.PNG

The filter you showed in your Automation Rule and the filter you showed in your Advanced Issue Search are not the same. You added 

project = "Hardware Smartphone"

...to the Advanced Issue Search. Remove that so that your Advanced Issue Search matches the JQL in you Automation Rule to see if the you get any results.

Also, please show the Linked Issues section for PO-120.

Ok thank you for the hint. 

You can find attached the Linked Issues section for PO-120 and also the new filter search for the automation rule- is this correct?

Hello Iris,

There were no attachments with you latest response

Hello Trudy,

I am very sorry..

Now the attachments.section1.PNGsection2.PNGsection3.PNGsection4.PNGissuesearch.PNGResult.PNG

Hello @Iris Studeny 

I am going to recommend that you raise this issue directly to Atlassian Support.

https://support.atlassian.com/contact/

I did a test with a very small data set, and in my test the clause "issueLinkType = "<value>" did not return the correct results.

I have a link type called RelatedBug with an Outward description of "is bug child of" and an Inward Description of "has bug".

I have an issue CK-1 with 5 linked issues. Among those are two links that show "is bug child of" and one link that shows "has bug".

When I use the filter 

issue in linkedIssues(CK-1) and issueLinkType = "is bug child of"

The output should contain the two issues under the "is bug child of" linked issues heading. Instead it contains only one of those issues and incorrectly also include the issue under the "has bug" linked issues heading.

I think that there may be a bug in the filtering for issueLinkType.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Jira Software

An update on Jira Software customer feedback – June 2022

Hello Atlassian Community! Feedback from customers like you has helped us shape and improve Jira Software. As Head of Product, Jira Software, I wanted to take this opportunity to share an update on...

5,055 views 18 32
Read article

Atlassian Community Events