Hello team
I have a business requirements , we need to oblige customer when he create issue to link this issue to a story , so the linked ticket or issue must be mandatory .
I do not found how to do it .
I need your help
Regards
Custom Solution - Make a workflow transition button for example - "Link to Story". Add a screen in the transition to show up a query custom field or issue picker field. Write your jql to allow only stories and make the field mandatory with validators. Write a post function to link the story to issue.
If this needs to be on Create, make the custom story field mandatory, write a post function to link the story to issue.
You can use the below code in script runner validator
import com.atlassian.jira.ComponentManager;import com.atlassian.jira.issue.IssueManager;import com.atlassian.jira.issue.MutableIssue;import com.atlassian.jira.component.ComponentAccessor;
String paramRequiredLinkType = "relates to";List paramRequiredIssueTypes = Arrays.asList("Bug", "New Feature");
def request = webwork.action.ActionContext.getRequest();if (request) {String linkType = request.getParameter('issuelinks-linktype');String[] linkedIssues = request.getParameterValues('issuelinks-issues');if (linkType != null && linkType.equals(paramRequiredLinkType) && linkedIssues != null) {if (linkedIssues.size() == 0) {def myIssueManager = ComponentAccessor.getIssueManager();for (String tmpLinkedIssue: linkedIssues) {MutableIssue toBeLinkedIssue = myIssueManager.getIssueObject(tmpLinkedIssue);if (toBeLinkedIssue != null) {if (!paramRequiredIssueTypes.contains(toBeLinkedIssue.getIssueType().getName())) {return false;}} else {return false;}}return true;}}}return false;
You can use JMWE's Related Issue(s) Validator, the options to pick will be pretty straightforward.
@David Fischer can you help me understand how to use this Validator?
If you have any example to share that will help. Also I was not able to find this Validator in my instance so confused.
Which version of JMWE for Jira Server do you have?
Installed version:6.1.2
@Aditya Sastry thank you very much.
It looks like you're new here. Sign in or register to get started.