Cananybody help me out figuring what parameters do i need to pass in?
Suppose i have 2 issues with me say Mutable issue as "issue" and other as "opt"
so now what i need to pass?
You need to pass in:
I got the point for SourceIssue ID, Destination Issue ID, User. but id of the type of link is what i am stuck, so can you elaborate on it?
My code seems like this.
Sorry nic, code didint get attached. okay that value i got it from database.
Here is my code:
def public TransitionStatus(MutableIssue issue){
def cfopts = issue.getCustomFieldValue(customField_name) def MutableIssue opt = issueManager.getIssueObject(cfopts) log.warn("get OPT name: " + opt.key) def currentUser = jiraAuthenticationContext.getUser(); Collection<ActionDescriptor> actions1 = issueWorkflowManager.getAvailableActions(issue); log.warn("Action for Candidate Tickets are: " + actions1) log.warn("Open Position :" + opt.dump()) log.warn("Open Position Class : " + opt.getClass()) log.warn("Current Status for open position" + opt.getStatusObject()) def jiraworkflow = workflowManager.getWorkflow((Issue)opt) as JiraWorkflow; def transitions = jiraworkflow.getAllActions() def status=jiraworkflow.getLinkedStatusObjects() WorkflowTransitionUtil workflowTransitionUtil = ( WorkflowTransitionUtil ) JiraUtils.loadComponent( WorkflowTransitionUtilImpl.class ); //This will capture the Wokflow workflowTransitionUtil.setIssue(issue); //This will set the Issue workflowTransitionUtil.setAction(221);//This will set the Action Id to Make an Offer Transition workflowTransitionUtil.progress(); //This will vallidate the progress log.warn("I have set the Status Transition have performed from Second Round to Make an Offer!!") WorkflowTransitionUtil workflowTransitionUtil1 = ( WorkflowTransitionUtil ) JiraUtils.loadComponent( WorkflowTransitionUtilImpl.class ); workflowTransitionUtil.setIssue(opt); //This will set the Issue workflowTransitionUtil.setAction(11); //This will set the Action Id Candidate Joined Transition workflowTransitionUtil.progress(); //This will vallidate the progress log.warn("I have set the Status Transition have performed from Pending to Candidate Joined for OPen Position !!")}TransitionStatus(issue)
I can't see any code there, but I can try to explain the link type id.
If you, as an administrator, go into "issue linking" in the web interface, you'll see a list of link *types*. For example "related", "cloned", "dependent on" and so-on. You need to pass in the ID of the link type you wish to use.
To find the link type id, go to Administration > System > Issue Linking. Here you will see your Jira instance's link types. Each will have an "Edit" and "Delete" operation hyperlink. Mouse over these hyperlinks and you will see the link type id at the end of the URL.
For example https://yourserver/secure/admin/EditLinkType!default.jspa?id=10020
The id=10020 indicates the link type id is 10020.
It looks like you're new here. Sign in or register to get started.