Hello,
Using Behaviours - from Scriptrunner, I would like to check if a sprint is active. If that is true, then I would like to make a certain field (Story Points) read-only.
Please let me know how to check if the sprint is active.
Thank you!
This is what I have so far:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.greenhopper.service.rapid.view.RapidViewService
import com.atlassian.greenhopper.service.sprint.Sprint
def SprintField = getFieldById("Sprint")
def StoryPointsField = getFieldById("Story Points")
if (SprintField.state == Sprint.State.ACTIVE) {
StoryPointsField.setReadOnly(true)
}