how can I create a new issue during a transition in another project and the project is pending on a user field value? e.g. user field = ABC, new issue will be created in project ABC
ComponentAccessor comAcc =new ComponentAccessor(); CustomFieldManager cfm = comAcc.getCustomFieldManager(); currentIssue.getCustomFieldValue(cfm.getCustomFieldObjectByName("user field")); IssueManager issueManager = comAcc.getIssueManager(); IssueFactory issueFactory = comAcc.getIssueFactory(); ProjectManager projManager = comAcc.getProjectManager(); JiraAuthenticationContext authContext = comAcc.getJiraAuthenticationContext(); MutableIssue issueObject = issueFactory.getIssue(); Project projObj = projManager.getProjectObjByKey("{user field i.e.project key}"); issueObject.setProjectId(projObj.getId()); issueObject.setReporterId(authContext.getLoggedInUser().getName()); issueObject.setSummary("[JIRA-generated] "+currentIssue.getSummary()); issueObject.setPriorityObject(currentIssue.getPriorityObject()); issueObject.setIssueTypeId(currentIssue.getIssueTypeObject().getId()); issueManager.updateIssue(authContext.getLoggedInUser(),issueObject,EventDispatchOption.ISSUE_UPDATED,true);
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.
https://developer.atlassian.com/display/JIRADEV/Performing+Issue+Operations
https://answers.atlassian.com/questions/107582/how-to-create-an-issue-programatically-using-java
you go through the above links, if any doubt you can ask me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you create an issue by placing a condition.
see the code in my answer
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.