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 ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, it's the same answer, but change "without a screen" to "with a different screen"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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" && 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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.