Description Behaviour not removing pre-filled description if changing issue type

Kristin Lyons
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 13, 2020

I've created a Behaviour which will auto fill the description field of specific issue types.  It seems work fine, the description is only filled when you select the proper issue type on the create issue screen.  However on the create issue screen if you select the issue type (in this example let's use Task) the description is filled out, but then if you switch from Task to another issue type the description field stays pre-filled out.  Is there a way to prevent this from happening?

1 answer

0 votes
Leo
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 13, 2020

Hi @Kristin Lyons,

Yes, this is possible. you'll have to write server side script for(I mean map the script with) "Issue Type" field (script remains same) and map it to required project(s) and issue type(s).

So whenever there is a change in issue type field the behaviour script runs and fills the field accordingly issue type mapped

 

BR,

Leo

Kristin Lyons
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 14, 2020

This is the script I have:

 

def desc = getFieldById("description")

 

def defaultValue = """What is the problem statement? What action that will be taken when a claim is identified? What dates of service should be pulled? Which claim statuses should be included? Which lines of business need to be included? Please describe how the claims should be identified, ie…procedure codes, diagnosis codes, service ID, etc:""".replaceAll(/    /, '')

 

if (! underlyingIssue?.description) {

    desc.setFormValue(defaultValue)

}

 

 

On the create issue screen any time I switch from Task issue type to Epic issue type the description stays filled in.  If I open the create issue screen and it defaults to Epic, the description is blank until I select Task. So I know the behaviour is partially working.

Leo
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 14, 2020

Yup, I believe this is not a initializer rather server side script. 

also assume you mapped this script with "Description" field. you can give a try of mapping this with "Issue Type" field and see if that solves your issue or not

Kristin Lyons
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 15, 2020

@Leo  How would I write up a script to map it to the Issue Type field?  I'm fairly new at creating scripts.  TIA!

Leo
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 15, 2020

No need of modifying your script. you would have chosen field before writing behaviour script right. I want you to choose Issue type in that place if you have chosen Description there

Thomas November 26, 2023

@Kristin Lyons, did you find a solution? I have exactly the same problem and can't figure out what's wrong.

Kristin Lyons
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 27, 2023

@ThomasI don't think I ever found a solution unfortunately

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.5.4
TAGS
AUG Leaders

Atlassian Community Events