How to suspend/hide the description in the parent/main ticket in Jira, but not in its Sub-task

Sonia
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 25, 2025

The issue called "Onboarding" of a project will automatically create a Sub-task (using post functions at transition:create.  We need to put some instructions in the Description field for users to complete the Sub-task.  The content of the description is setup in the Behavior in ScriptRunner. 

Syntax:
===================================

  //  getFieldByName('Description').setHidden(true)   // This line does not work
 //   field.setFieldOptions(['Sub-task'])  //only Subtask is allowed but nothing shows up.
//-------------------------------------------------------------------------------------------------------
def field = getFieldByName('Description')
def defaultValue = """\
      *When onboarding with BSF and setting up its pipeline feature and other capabilities, completing the checklist steps in this Jira ticket should help you through the process.*
     ... etc.
""".stripIndent()
=====================================

The content pops up OK in both the parent "Onboarding" and Sub-Task.
Since it is a duplicate content, and I try to omit/hide the description in the main ticket, but there is no way to make it work.  I also try to use new custom field "Onboard Description" for Sub-Task and remove "Description" from the main ticket. The result is no content/blank  for both main and sub-task.
  Please advise how to proceed this?
   Thank you!
   Cathy

1 answer

0 votes
Digvijay Singh February 26, 2025

Hi @soni 

If you wish to use scriptrunner post-function on Create Transition on Parent Workflow

then you can use "Create a sub-task" post-function.

Select Target Issue Type as <your-sub-task-type>

Fields to copy: Custom > Description (System field)

Additional Issue actions: 

issue.description = '<your-description-verbiage-for-sub-task-only>'

So, whenever a Parent issue is created then the Sub-task will also create with your set description and it will only appear on Sub-task and not on Parent/Main issue.

I hope this helps.

Thanks,

Digvijay

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
9.12
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events