I'm looking to show a transition screen when a sub task is transitioned from x to y based upon parent issue type.
The requirements are :
You can't do this directly. Behaviours can do the show/hide, and require/optional, but the choice of whether to show a screen is out of your control, as is the display of parent issue.
But you can do those indirectly:
Hi Nic,
Thanks for your reply.
We basically wanted to show the transition screen always for all sub-task transitions. We need to show fields in the transition screen based on the parent issue type. Thoughts ?
Ok, it's the same answer, but change "without a screen" to "with a different screen"
@Nic Brough -Adaptavist- ,
I've used below code in behavior for all sub-task transitions.
import com.atlassian.jira.component.ComponentAccessorimport com.atlassian.jira.issue.*
def parentIssueType = getFieldById("Parent Issue Type")?.formValuedef fieldToHideA = getFieldByName("Target Release")def fieldToRequireB = getFieldByName("Target Release")
if ( parentIssueType=="Bug Sub-task" && issueContext.issueType.name == "Sub-task" ){fieldToHideA.setHidden(true)fieldToRequireB.setRequired(true)}
the compiles without any error.
while the transition happening i'm not able to get the result as expected.
It looks like you're new here. Sign in or register to get started.