I have written a JQL function, in that I'm querying jira database, based on the row count I want to throw an error on to Issue Navigator. I want to use the same error that issue navigator by default gives if the resultant issues are more "The 'issue in xxxxx()' clause in your search matches too many results. If a clause returns too many results, the entire search will fail. Please refine or remove the clause and try the search again".
I have tried throwing one exception, it is not displaying error message on top of issue navigator query box, but it is showing a new page with exception stack trace.
Is it possible invoke the existing error message? if so how?, which Exception I need to throw back from JQL function?
Thanks in advance!
Yes, it is possible by writing your validation code in your validate() of your JQL class. In that, you can set your Error message in MessageSet which is sent to Issue Navigator.
Note: though you got errors in validation(validate method), it is executing getValues method in JQL. So use one class boolean variable and set it in validate() and check it in getValues().
That warning is part of the issue navigator. It's not thrown in a JQL function, it's thrown when the issue navigator is given a search result and it thinks "nope, too big"
If you want to get it in the issue navigator, just give the navigator a search result that's too large.
If you want it in your own code, you'll need to interrogate the search result for the number of issues it's returning and code for putting the warning/error on screen.
I think you're missing the point here - a JQL function returns information for searching on. Informational messages, drawing screens, sending emails, making tea - those are NOT things a JQL function does.
You need to look at where you are going to be displaying the information returned from your search, not the JQL function.
Maybe, if you could explain your end-goal, we can help you a bit more. You seem to be trying to wedge activities into functionality that is simply not designed or intended for those activities. Instead of trying to mangle this, if we had any idea what your end goal was, we may be able to help properly.
Hey Atlassian community, I am a PM on the Bitbucket Cloud team and I am excited to share that we just released an improvement to the Jira Software and Bitbucket Cloud integration. With the newly im...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs