I have made my field - Story Point as Read-Only for a particular project. It's value is getting populated via a script and time of creation/ issue updation (as as sum of values of other number fields)
When the issue is newly created and the issue shows in the Backlog, the Story Point is also getting reflected in the backlog properly.
But once the Edit Screen is opened and the value of the the number fields is changed, hence the sum also changes i.e. value of Story Point also changes. After clicking on Edit button, the correct/updated value is getting reflected in the Issue View Screen.
But in the project backlog, after refreshing multiple times also, the value is not updated. It's still reflecting the previous value which was set at the time of Issue Creation.
Could you please help me with this
What type of field have you created?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, so my guess is that you are setting the number in the field with a script, but your script does not re-index the issue after making the change to the field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Alright. I have added a script listener for same. Could you please tell me how do we re-index the issue using groovy in script listener?
I am using the below code to update value:
storyPointOjb.updateValue(null, issue, new ModifiedValue(issue.getCustomFieldValue(storyPointOjb), (Double)storyPoint),changeHolder);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try this:
import com.atlassian.jira.issue.index.IssueIndexingService
def indexManager = ComponentAccessor.getComponent(IssueIndexingService.class)
indexManager.reIndex(issue)
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.