You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
To enable deletion of issues not included in a sprint using jira behavior
I used the script below because I wanted to activate the delete button on the screen for issues that are not included in the sprint like the question title, but where can I see the logs for that script? The script doesn't seem to work, so tell me if there's something wrong with the script
import com.atlassian.jira.component.ComponentAccessor
def issue = getFieldById("issuekey").getValue() // 이슈 키 가져오기
def sprintManager = ComponentAccessor.getComponent(com.atlassian.greenhopper.service.sprint.SprintManager)
def boardManager = ComponentAccessor.getComponent(com.atlassian.greenhopper.manager.board.BoardManager)
def issueService = ComponentAccessor.getIssueService()
def sprintCustomField = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Sprint")
if (issue) {
def issueObject = issueService.getIssue(issue).getIssueObject()
def sprints = issueObject.getCustomFieldValue(sprintCustomField)
if (sprints) {
// 이슈가 스프린트에 등록되어 있습니다. 아무 작업도 수행하지 않습니다.
} else {
// 이슈가 스프린트에 등록되어 있지 않으므로 삭제 권한을 부여합니다.
// issue.setDeletable(true) // 이렇게 권한을 설정할 수 있을 것으로 예상됩니다.
}
}
Hi @이지성 welcome to the community. I don't think this is an instance where you would use a behaviour. Behaviours are primarily used to drive screen and the behaviors of that screen. I think you'd be better off here with a fragment and then a script behind that fragment.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.