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
Community showcase
Posted in United States

Welcome new members!

Wow, I got swamped and now that I've finally gotten my head back above water, I find we have several new members! Welcome @Darren Keith lowman , @Amanda Babb , @Luis Zapata , @Joli Holmes , and @bh...

31 views 0 2
View post

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you