I'm part of a team of 4 which takes on projects of varying scales at the same time (some that last a couple of days, others that last months).
We've started managing all of our projects using a single board, but both the board and backlog become bloated pretty quickly. It's also inconvenient when we want to invite stakeholders, etc to view our progress on a particular project because we have to invite them to one board which has ALL of our projects on.
Can somebody help with the following questions?
Hi Anupam
If I understand right you want to create a subtask and immediately to tansit it to a status. So let's say that you want when the subtask with summary Run IST Testing get's created to immediately move through the Pass Testing transition then in the post function you have that creates the subtask Run IST Testing in the additional issue actions field add
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.IssueInputParameters
import com.atlassian.jira.issue.MutableIssue
import com.atlassian.jira.user.ApplicationUser
import com.atlassian.jira.workflow.TransitionOptions
doAfterCreate = {
def cwdUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
def issueService = ComponentAccessor.getIssueService()
IssueInputParameters issueInputParameters = issueService.newIssueInputParameters()
issueInputParameters.setSkipScreenCheck(true)
log.debug "I will transit the subtask " + issue.key
def transitionOptions= new TransitionOptions.Builder()
.skipConditions()
.skipPermissions()
.skipValidators()
.build()
// 21 is the id of the transition, in my example is the In Progress (21). Change it to fit your transition
def transitionValidationResult =
issueService.validateTransition(cwdUser, issue.id, 21, issueInputParameters, transitionOptions)
if (transitionValidationResult.isValid()) {
return issueService.transition(cwdUser, transitionValidationResult).getIssue()
}
log.error "Transition validation result: " + transitionValidationResult.errorCollection
}Please let me know if this does the trick
regards, Thanos
Hi Thanos,
Thanks for your response. I tried it out but it is still not working as expected. The subtasks should not stay open when the parent issue is done. Also, the problem is that for the sub tasks, I don't see the action Approve or Reject. It is still showing the transitions as per my workflow for Open Status - Please see attached screenshot.
image2016-10-27 16:42:54.png
image2016-10-27 16:43:10.png
image2016-10-27 17:3:9.png
The sub-tasks only need to have two transition actions. Approve and Reject.
What I am trying to do is as follows:
So in theory, it is similar to your documentation use case...
image2016-10-27 16:55:13.png
Notice how it has Approve & Reject actions. I am looking to implement the similar logic. I hope that helps understand my use case better.
Thanks
Anupam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Anupam.
So, there's a lot of layers to what you're after. I think I can get you over the immediate road blocks, though.
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.