Jira query: issueFunction in linkedIssuesOfAll("filter = A", "is child of") isn't working

Swati Mathapati
Contributor
August 30, 2022

The below query does not return anything ,Kindly anyone help me to find the solution

issueFunction in linkedIssuesOfAll("filter = PLANC_PI_BOARD_SWSAR", "is parent of") AND project = "Power, Load and Aerodynamic Noise Control"

1 answer

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 30, 2022

Hello @Swati Mathapati 

Using "filter = PLANC_PI_BOARD_SWAR" and "is parent of" indicates you are trying to find all issues returned by the filter PLANC_PI_BOARD_SWAR that have a link "is parent of" to another issue.

This is further constrained in that the issue returned must also be in the project "Power, Load and Aerodynamic Noise Control"

What are the details of the filter PLANC_PI_BOARD_SWAR?

Can you provide a screen image of an issue that you believe meets the conditions of your JQL?

linkedIssuesOfAll is a function provided by the Adaptavist ScriptRunner app. Can you tell us which version of that app you have? You may need to consult with your Jira Administrator to get that information. Additionally can you tell us the version of Jira that you have?

Swati Mathapati
Contributor
August 31, 2022

HI Claspill ,

Thank you for the reply!

The version of the app we are using is Version: 6.58.0

The screenshot of the filter is attached below

Filter.PNG

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 31, 2022

That image does not tell me the details of the criteria in the filter named "PLANC_PI_BOARD_SWSAR". It only shows me the results of the filter.

You need to go to the list of all filters and find the one named "PLANC_PI_BOARD_SWSAR" and show us the criteria it contains.

Also, what version of Jira are you using?

Swati Mathapati
Contributor
August 31, 2022

Jira version is v8.20.10

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 1, 2022

I am not able to offer additional advice without having the details of the filter named PLANC_PI_BOARD_SWSAR.

I suspect that the reason you are not seeing any results is that filter does not include issues that are in the project "Power, Load and Aerodynamic Noise Control", and that is a criteria in the query where you are using the PLANC_PI_BOARD_SWSAR filter

Swati Mathapati
Contributor
September 6, 2022

I am checking with the user for an example that passes the entire query. I will get back to you. 

Thank you so much!

Regards,

Swati

Swati Mathapati
Contributor
September 6, 2022

Issue linking error.PNG

Please find the reply from an user

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 8, 2022

Can you show us an image of SWSAR-7357 showing the part of the screen that shows the linked issues and including the PLANC-4008 issue?

Swati Mathapati
Contributor
September 12, 2022

Please find the image below

JIRA-4924.PNG

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 12, 2022

First, I am going to try to describe what the filter actually does. Let me know if this is the result you actually want.

1. Retrieve a set of issues based on the filter PLANC_PI_BOARD_SWSAR

2. For each of the issues in 1, retrieve the parent Epic.

3. For each Epic retrieved in 2, retrieve all the child issues.

4. From the child issues retrieved in 3, retrieve the subset of issues that are in the project "Power, Load and Aerodynamic Noise Control"

 

Does that match what you intended to retrieve?

 

I don't have access to a Jira Server instance, and these ScriptRunner functions are not available for Jira Cloud, so I cannot try these out for myself.

Using just this much of the query:

issueFunction in linkedIssuesOfAll("issue = PLANC-4008", "is parent of")

...do you get a list of all the children of SWSAR-7375?

Swati Mathapati
Contributor
September 13, 2022

We have tested with some other projects as well and understood that its a problem with Issue linking ("is parent of", "is child of").

Could you please help us to know what we need to use for parent-child relationship?

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 14, 2022

You didn't answer my question about whether or not I correctly described the results you want from this query. I'm going to proceed assuming that I was correct.

I don't have access to a Jira Server instance, and the ScriptRunner functionality is not the same on Jira Cloud, so I can't test out the solution I'm going to propose.

1. Retrieve a set of issues based on the filter PLANC_PI_BOARD_SWSAR

-- you already have that part done.

2. For each of the issues in 1, retrieve the parent Epic.

issuefunction in epicsOf("filter = PLANC_PI_BOARD_SWSAR")

This should return all the parent Epics of the issues returned by the filter PLANC_PI_BOARD_SWAR. Save that as another saved filter. Let us call that "filter2" for the moment.

3. For each Epic retrieved in 2, retrieve all the child issues.

issuefunction in issuesInEpics("filter = filter2")

This should retrieve all the children issues of the Epics you got in step 2. 

4. From the child issues retrieved in 3, retrieve the subset of issues that are in the project "Power, Load and Aerodynamic Noise Control"

issuefunction in issuesInEpics("filter = filter2") and project = "Power, Load and Aerodynamic Noise Control"

That should satisfy step 4.

Swati Mathapati
Contributor
September 14, 2022

Sorry for not replying to your question as I am checking with the user who raised this request.

Suggest an answer

Log in or Sign up to answer