An issue is created via REST API then a remote issue link is added to the new issue by the same script.
A custom field enumerates the remote issue links and gets assigned a value when the remote issue link globalId matches a pattern. The scripted field gets populated correctly, but the search index is not being updated. Consequently, any searches based on the contents of the scripted field are failing.
There is a similar script that works reliably. The only difference is that script makes other updates to the issue after the remote link has been created.
I can hack around it by doing a meaningless update, or by forcing the globalId into a regular custom field.
Are there any better ideas how to get reliable indexing?
If I'm correct, and I believe I am, you cannot search by a scriptedField reliably(please note my word usage). The reason why, is mainly that Scripted Fields are always evaluated when the issue is viewed.
The main issue is as follows:
Imagine that you have a simple scripted field which simply shows the date. Everytime time an issue is viewed, that field would change, so , as you open an issue, and you have to reindex. All of the time...
Imagine how heavy that would be in terms of CPU ussage in your architecture.
The only workarounds you have about this, is, as you mentioned, do a manually reindex, or update the issue. That is why one of your scripts works, the one that does an update, and this one doesn't.
I hope this helped.
Hello! My name is Genevieve Blanch, and I'm the Marketing Manager at RefinedWiki, creators of apps to give teams the tools to customize Atlassian platforms. Currently, 44% of the tech team at Re...
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