You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hello everyone, I have an SLA counter, which, depending on whether the time has expired or not, has the status "Ok" or "Fail".
My problem is that the tasks don't change the index after changing the result on the spinner, which restricts searching through JQL. Only manual reindexing solution worked for me .When I do reindexing with my hands, only then I get all the tasks in the search
From the link below. https://docs.adaptavist.com/sr4js/6.57.0/features/built-in-scripts/re-index-issues?utm_source=product-help
Is it possible to add this somehow to my code?
My code
https://drive.google.com/drive/folders/1xPmWrKHTCv-SUh7vO6J0hzdwmYXJoOFA
Thank you!
def setSLA(issue, value) {
fieldName = 'Counter status'
customFieldManager = ComponentAccessor.getCustomFieldManager()
customField = customFieldManager.getCustomFieldObjectByName(fieldName)
if (customField.getValue(issue).toString() != value) {
fieldConfig = customField.getRelevantConfig(issue)
optionsManager = ComponentAccessor.getOptionsManager()
option = optionsManager.getOptions(fieldConfig).find { it.value == value }
changeHolder = new DefaultIssueChangeHolder()
customField.updateValue(null, issue, new ModifiedValue(issue.getCustomFieldValue(customField), option), changeHolder)
def issueIndexingService = ComponentAccessor.getComponent(IssueIndexingService)
issueIndexingService.reIndex(issue)
}
}
@Tom Lister Hi! It worked! Thank you very much!!! You just have no idea how much you helped with this issue! Many thanks to you !!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Tom Lister Greetings! I would like to ask for your help if possible. Thanks you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.