Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Need to show a transition screen for Sub-task based upon parent issue type

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 :

  1. its should show/hide the fields on the screen based upon the parent issue type.
  2. its should set the fields required / optional on the screen based upon the parent issue type.
  3. the screen should show the parent issue type value.
  4. Looking for Behavior / script runner scripts.



1 answer

3 votes

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:

  • Create a scripted field for "parent issue type" and use that on the screen
  • In the workflow, have two transitions
    • One with a screen, one without
    • Have a condition on both transitions that looks at the parent issue type and blocks the transition or allows it depending on type

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.ComponentAccessor
import com.atlassian.jira.issue.*

def parentIssueType = getFieldById("Parent Issue Type")?.formValue
def fieldToHideA = getFieldByName("Target Release")
def fieldToRequireB = getFieldByName("Target Release")

if ( parentIssueType=="Bug Sub-task" && == "Sub-task" )





the compiles without any error.

while the transition happening i'm not able to get the result as expected.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Apps & Integrations

Send an Email or Publish to Confluence - What should you do with your release notes?

Background When you hear the words ‘Release notes’, almost always you think of an unsolicited email from a software vendor. But I am here to tell you that from our data, sending release notes via E...

126 views 1 2
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you