Degraded performance Customers may experience intermittent errors using Community search. Our platform vendor is investigating.
It's not the same without you
Join the community to find out what other Atlassian users are discussing, debating and creating.
Hello!
I have SIL script custom field updated but not visible in search.
Are there some methods to automaticaly reindex issue when return value changes?
Manualy reindex JIRA is not a solution.
Hi Sergey,
The SIL Script CF has multiple searchers available, depending on what type of value it holds. You can go to Administration->Custom Fields and on the "Edit" screen you should be able to choose which type of searcher you want. Note that changing the searcher, the name of the CF or the SIL script behind it requires a reindex. You should normally not need to manually reindex when the value changes, since it is automatically reindexed.
I don't understand if the problem is that the field is not searchable or if the values shown in search are incorrect.
I have this code to change 2 custom fields and return task overdue in SIL fileld.
string format = "yyyy.MM.dd HH:mm:ss"; string[] my_statuses; string[] my_statusHistory = fieldHistory(key, "status"); date my_startDate; date my_endDate; date my_finalDate; for(number i = 1; i < size(my_statusHistory); i = i + 2) { string my_statusStr = getElement(my_statusHistory, i); if (my_statusStr == "3" && isNull(my_startDate)) { my_startDate = arrayGetElement(my_statusHistory, i - 1); } if (my_statusStr == "5") { my_endDate = arrayGetElement(my_statusHistory, i - 1); } } if (isNull(my_startDate) && (customfield_10611 != created)) { customfield_10611 = created; } else if (isNotNull(my_startDate) && (customfield_10611 != my_startDate)) { customfield_10611 = my_startDate; } if (isNull(my_endDate) && (customfield_10612 != customfield_10107)) { customfield_10612 = customfield_10107; } else if (isNotNull(my_endDate) && (customfield_10612 != my_endDate)) { customfield_10612 = my_endDate; } return ((customfield_10611 > customfield_10107) || (customfield_10612 > customfield_10107) || ((currentDate() > customfield_10107) && (customfield_10612 >= customfield_10107)));
SIL field have exact text seacher. But the values shown in search are incorrect. Manual reindex helps.
https://jira.atlassian.com/browse/JRA-7809
This explains why searching is not working. It's old, but it still applies.
So the problem goes like this: The script should be read-only. You should not be able to modify the fields from the script and there's a good reason for that. If you modify any field, it will trigger a reindex on the issue. The reindex will try to get all the values of the custom fields (including the SIL script) and will re-run the script, which will trigger another reindex and so on and it should start spinning. We have implemented a mechanism to prevent this from getting into an infinite loop. It surprises me that you say this works (as you said on the other thread) since it does start spinning when I try to reproduce this and it will show an empty value for the SIL script cf.
Unfortunately, I don't see a way to make the search work. The issue will be automatically reindexed when someone updates it or if there's a scheduled reindex. If you try to trigger the issue update from the script, you'll bump into the above problem.
I had the problem you are talking about but solved it by updating fields only when they different. And I'll try to solve this task by making another custom field and update its value. I think this will trigger reindex. Am I right?
You will encounter the problem whenever you modify any field. It works now because you didn't need to update any values yet. Even if we assume this works, it's still not enough since the script will be triggered when the issue is shown (or needed somewhere else). So you'll need to view the issue in order for the indexes to be updated.
You could give JJupin a try if you like. It has a bunch of other useful functionalities like conditions, validators, post-functions, services, listeners and more, all based on the SIL scripting language. We're also preparing some really useful new features to work with the issue UI, so stay tuned :)
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.
Read moreAtlas Camp is our developer event which will take place in Barcelona, Spain from the 6th -7th of September . This is a great opportunity to meet other developers and get n...
Connect with like-minded Atlassian users at free events near you!
Find a groupConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.
Start an AUGYou're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.