Team,
I am having a custom field (multi select) which are having a drop down options like A, B, C, Now is there any smart value where i can show all the options which are available in that custom field, even though specific issue is having only B & C as values.
Thanks,
Raju
Came across this git https://gist.github.com/jechlin/9789183 and adapted the code a bit to fit my needs.
import com.atlassian.greenhopper.service.sprint.Sprint
import com.atlassian.greenhopper.service.sprint.SprintIssueService
import com.atlassian.jira.component.ComponentAccessor
import com.onresolve.scriptrunner.runner.customisers.ContextBaseScript
import com.onresolve.scriptrunner.runner.customisers.JiraAgileBean
import groovy.transform.BaseScript
@BaseScript ContextBaseScript baseScript
def issue = getIssueOrDefault("TP-1")
@JiraAgileBean
SprintIssueService sprintIssueService
def currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
def sprintsForIssue = sprintIssueService.getSprintsForIssue(loggedInUser, issue)
Sprint activeSprint = sprintsForIssue.getValue().find{it.active}
if (activeSprint) {
log.info "Adding issue $issue to ${activeSprint.name} with sprint id ${activeSprint.id}"
sprintIssueService.removeIssuesFromSprint(currentUser, activeSprint, [issue] as Collection)
}
else {
log.info ("could not find active sprints for isse ${issue.key}")
}
Are there any other suggestions? :)
Have you tried to use REST for this purpose? https://confluence.atlassian.com/jirakb/how-to-add-and-remove-issue-to-from-sprint-via-rest-api-779158574.html
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.