It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

JQL based on a SIL scripted field

Hi,

 

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
Answer accepted

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
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted 3 hours ago in United States

Atlassian Government Symposium

Good day members, Not sure if you are aware that Atlassian will be hosting a Government Symposium on May 1st, 2019 in Washington DC. For more details please click here If you have any questions...

12 views 0 0
View post

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