Forums

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

JQL function parentsOF not Available

Yuriy Tsymbaliyk November 19, 2018

Description:

We need to use advanced search, to filter some issues.

1)We need to filter by issue;

2) We need to filter "not in project" to exclude some projects

3) We need to filter task's with sub-task witch not in status "open"

 

example of our code 

issuetype = Task AND project not in ("[Friends] Project name", "Friend Project ")
AND status changed from "Preparation of project" to "Start project" after startOfMonth()
AND issueFunction in parentsOf("issuetype = sub-task and status != open")

 

all works before last line of jql:

AND issueFunction in parentsOf("issuetype = sub-task and status != open")

 

after adding this parametr we got an issue:

"Error occurred communicating with the server. Please reload the page and try again."

 

We have installed

Adaptavist ScriptRunner for JIRA

 

There is an JQL  Function that enabled and must to work.

We try an option  "scan" in ScriptRunner but we still cant find this function to use in JQL.

There is also some infromation " otherwise they will be automatically loaded at startup"

 

Maybe we need to restart JIRA? If somebody meet this issue also?

Now we see only one way to restart JIRA (we need to wait for night).

or try to disable some JQL preinstalled functions in Scriptrunner (maybe there are can be some count of one time enabled JQL Functions)?

 

 

2 answers

0 votes
Yuriy Tsymbaliyk November 20, 2018

I find this custom function in add-on MyGroovy.

I add this add-on to our jira, after re-index i will write about results that we will got, or issue's that we meet.

Yuriy Tsymbaliyk November 20, 2018

@Tom Lister Can i ask you about next:

 

  • We have add-on Adaptivist ScriptRunner
  • We add new add-on MyGroovy

1) Could it be conflict with the same function? 

2) Or better use Adding a JQL function to Jira Tutorial

and add our own function as we know code of this function?

Tom Lister
Community Champion
November 20, 2018

Hi 

if you have a name clash Jira will take the first match from the plugins alphabetically

check out the scriptrunner notes

https://scriptrunner.adaptavist.com/latest/jira/jql-functions.html

Especially the slow query logs and query profiler

A quick thing to try is to make the parents of query more specific, I think it is evaluated on its own, not in the overall filter context

e.g.

add your project condition to it 

0 votes
Tom Lister
Community Champion
November 19, 2018

Hi @Yuriy Tsymbaliyk

Can you perform a background re-index and try again. This sounds like a corrupt index issue. reindexing should fix it.

Yuriy Tsymbaliyk November 19, 2018

1) We use background re-index at morning before (script runner was installed for a long time before we meet this issue today)

2) than we find option "scan" in scriptrunner

3) we make this scan, but nothing was done

....

4) we try to disable\enable module "parentsOF" 

5) we try to scan second time

 

we will try restart jira and reindex at evening

Yuriy Tsymbaliyk November 19, 2018

Hi Tom!

@Tom Lister

Do you meet something similar, if there any other solution?

Tom Lister
Community Champion
November 19, 2018

Hi Yuri

I have seen the error message before but the causes can be varied, I'd expect a stack trace to be in the logs somewhere. But if its index corruption it may not be a very helpful message.

I've had lots of problems with index corruption in the past due having configured server to build indexes on a SAN which failed frequently due to transient network errors. Should alway be on a local disk.

You shouldn't need to scan unless you are deploying custom script files to the server.

Background indexing is harmless but time taken will depend on server size. That would give you a step to eliminate today rather than waiting for tomorrow after restart.

Yuriy Tsymbaliyk November 19, 2018

@Tom Lister jira restart and re-index doesn't help(

I think that we need to find this function and create our own with different name, and then call it in jql when we need it.

Suggest an answer

Log in or Sign up to answer