Hi,
If I set Affects versions using edit screen." Project ="XXX" and affectedVersion is not EMPTY " works fine and returns the issue.
But If I used scriptrunner code:
issue.setAffectedVersions(affectedVersion)
issueManager.updateIssue(user, issue, EventDispatchOption.DO_NOT_DISPATCH, false)
to set Affected version, the code works fine and I can see the added Affects versions in view screen. But " Project ="XXX" and affectedVersion is not EMPTY " does not return the issue.
Does someone knows what is the problem ?
Hi @Nilufar It's definitely an indexing issue. Include below code in Script.
import com.atlassian.jira.issue.index.IssueIndexingService
def indexManager = ComponentAccessor.getComponent(IssueIndexingService.class)
indexManager.reIndex(issue)
Are you using post function to update Affect version field value ?
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Automation for JIRA > Action "Run Script" ,something like this ?
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.
Cool! Glad to hear it works for you!
Stay Safe!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.