Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Hardcoded description in specific issur type

Hi,

 

I created a behaviour that put a template in the description of a specific issue type.

When I change inside the create screen from one type to another, the template is still there.

so I created another behaviour that cleans the template.

 

Now, if I wrote somthing in the template of the description, and before saving it press on other field, all of the data I wrote disapeared...

 

First behaviour (only on this issue type): (description in the selected field)

import com.atlassian.jira.component.ComponentAccessor

def desc = getFieldById("description")

def defaultValue = """h5.*+General OS / DB / Browser / Machine Information:+*
h3.\n\n*+Scenario Description and steps to recreate the problem:+*
h3.\n\n*+Actual & Expected Results+*
h3.\n\n*+Log file information:+*
h3.\n\n*+Additional info:+*
h3.\n\n""".replaceAll(/ /, '')

if (! underlyingIssue?.description)
{
desc.setFormValue(defaultValue)
}
else
{
desc.setFormValue("")
}

 

second behaviour:

if (getAction()?.id != 1) {
return; // not the initial action, so don't set default values
}
def desc = getFieldById("description")
if(desc==null)
{
desc.setFormValue("")
}
else
{
return
}

 

How can I make that need?

Daniel

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS

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