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?
Hello Karl.
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.
Cheers
Dyelamos
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.