Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Why Jira JQL function getValues is called twice?

z August 5, 2014

I have develped a JQL function by extending AbstractJqlFunction and implementing the validate and getValues methods.

During testing I have noticed that the getValues method is called twice when I click on the search icon or press enter on advanced search input field.

Does anyone knows if this is for a reason or it is a bug?

Sometimes the first getValues logs are before the validate method.

I have tried on Jira 6.1.7 and 6.2.4

3 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Kubilay Karpat April 26, 2017

This is old but I also experienced the same thing on JIRA 7.1.8. Wondering reason behind this.

0 votes
JamieA
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.
August 6, 2014

May be a bug in your version of jira. I only use the type where you implement getQuery... I justed tested that and it is only called once.

You can convert from one to the other by using a ConstantScoreQuery...

return new ConstantScoreQuery(new IssueIdFilter([ list of issue IDs as strings ]))

z August 6, 2014

Hi, thank you for the answer but you use your own Abstract function in Groovy runner with the doQuery override which as I see (i may be wrong) works only with the issuefunction customfield. The Original Jira api does have only the AbstractJqlFunction which needs to override validate and getValues.

JamieA
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.
August 7, 2014

Oh sorry, my bad.

0 votes
z August 5, 2014

In the meantime I'm pretty sure that the first getValues is called by a separate thread, concurently with validate as their logs mingle in the log. the second getvalues is always follows the validate.

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events