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
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
when use done transition in bug then automatically display link issue field and mandatory only for select duplicate value in resolution drop down list.
You'll have to place transition screen in Done transition of Bug's workflow with linked issue and Resolution field
And to make Linked issue field as mandatory when resolution is Duplicate, I would go with scriptrunner's validator with script below
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.IssueFieldConstants
import com.atlassian.jira.issue.fields.IssueLinksSystemField
import com.opensymphony.workflow.InvalidInputException
import webwork.action.ActionContext
import com.atlassian.jira.issue.MutableIssue;
import com.atlassian.jira.issue.link.IssueLink
def fieldManager = ComponentAccessor.getFieldManager()
def linksSystemField = fieldManager.getField("issuelinks") as IssueLinksSystemField
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def request = ActionContext.getRequest()
if(issue.resolution.name =="Duplicate") {
if (request) {
def params = request.getParameterMap()
def issueLinkingValue = linksSystemField.getRelevantParams(params) as IssueLinksSystemField.IssueLinkingValue
if (! (issueLinkingValue.linkDescription == "duplicates" && issueLinkingValue.linkedIssues.size())) {
throw new InvalidInputException(IssueFieldConstants.ISSUE_LINKS,
"Note: You must use link type 'duplicates'.")
}
Note: it won't place * symbol but it won't allow you to proceed further when resolution is Done and linked issue field is empty and even the link type is different. you can modify the condition according to your requirement
Hope this helps
BR,
Leo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.