JQL based on a SIL scripted field



I have a custom scripted field using SIL that returns 0 or 1, configured with the Exact Number Searcher. I want to reference this field on a JQL.


The issue is: right after re-building the index, the results are accurate. However, any values that change after that are not reflected in the JQL results. I understand this may have to do with the fact that the scripted field calculate results 'on the fly', but is there a solution other than scheduling a re-index to run every 'x' time?


Thanks in advance.

2 answers

1 accepted

0 votes
Accepted answer

Hi Hugo,

It depends on your specific use case for the SIL script field. The value of the field is recalculated for search purposes when it's reindexed (this is done automatically when you edit the issue or during a full reindex).

If this value changes based on factors external to the issue (e.g time, data that is not stored on the issue) then your issues will have stale values for this field until they are reindexed. To fix this, in theory, you'll need to detect when the external dependencies change and then trigger a reindex on the issue so that the value is recalculated. In practice however, this is impossible most of the times. So you can fix this depending on whether or not you can do:

  1. detect when the value could change (not necessarly what is the new value, but just that it could change)
  2. for which issues does the value change

... and then trigger a reindex for those issues specifically.

Hope this helps!

Thanks, this helped me going into the right direction to solve the problem.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Friday in Agile

Are you a Jira Service Desk agent? We want to talk to you!

Are you a whiz at handling tickets and looking at how you can further optimize your workflow with automation? Do you tackle detailed customer support questions while simultaneously getting flooded wi...

90 views 0 5
Read article

Atlassian User Groups

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!

Find my local user group

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

Groups near you