JQL parentIssuesOf() does not return parents

Cedacri
Contributor
December 2, 2024

Hi everyone,

When using the childIssueOf() in ScriptRunner on a Story Key, I can get all the Story Sub-tasks as shown below:

Screenshot 2024-12-02 163528.png

It would stand to logic using parentIssuesOf() on any of the resulting Sub-task Keys that I should get the parent Story (295) and subsequent parent Epics etc.

My question - what am I doing wrong and how should I modify my query so that this:

 

Screenshot 2024-12-02 164026.png

...will return the Story (295) and its subsequent parents?

 

Thanks in advance!

 

 

EDIT:

Using the Sub-task Key 296 does not yield anything, but using the Key 299 does for some reason result in what I need (namely the Story, Epic and Initiative), which is damn weird and inconsistent to say the least:

Screenshot 2024-12-02 164754.png

Opening the both Sub-tasks side by side shows that they are exactly the same and have the same parent Story, with the exception that the key that works has a Label while the ones that do not yield anything do not have a label.

 

 

 

 

1 answer

0 votes
Salih Tuç
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.
December 3, 2024

Hi @Cedacri ,

If the same function is working for one sub-task (299) and not working for other (296), then it seems we need to focus on 296 one, instead of the ScriptRunner.

Let's put ScriptRunner aside and go to the "Issue Search" and run the same query, can you get the results? There may be some of these problems in the context of the sub-task 296:

  • The user that runs the search cannot have access to the sub-task.
  • Parents of the sub-task 296 may have some Issue Security (or again, the search user maybe cannot access to these parents)
  • There may be some indexing problem on Sub-task 296 (You may use the integrity checker, or basically can go to the Sub-task 296 and check if the Workflow operations (like transitions to the next status) can be seen or not)


Can you please check them first and then if the problem exists please let us know with the details of sub-task 296 so we can help better :)

Cedacri
Contributor
December 3, 2024

Hi @Salih Tuç ,

Thank you for taking your time to help me troubleshoot this!

Yes, I have the exact same behavior in the "Issue Search" as in ScriptRunner

1. I am the user running the queries, and have double checked and can confirm that I have access to the sub-tasks 296-300 

2. I can access all the sub-tasks and the parent issue. Also, there's no Issue security and ScriptRunner should have bypassed it if present.

3. Integrity is OK, Workflow transitions are present

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events