Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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 Bitbucket Pipelines

Bitbucket Pipelines Runners is now in open beta

We are excited to announce the open beta program for self-hosted runners. Bitbucket Pipelines Runners is available to everyone. Please try it and let us know your feedback. If you have any issue...

499 views 10 8
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