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 searchFrom 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 !!!
@Tom Lister Greetings! I would like to ask for your help if possible. Thanks you.
https://community.atlassian.com/t5/Jira-Software-questions/Problem-Jira-search-all-issues-in-a-project/qaq-p/2252978
It looks like you're new here. Sign in or register to get started.