How to clear default description on create issue screen while changing to other project on same

Hello Team,

We have "behaviours" plugin which is part of Script Runner. Applied behaviours for default description on particular issue type on particular project using field mapping.

Here i applied on "ABC" project for story issue type. When i selected story the default description is displaying automatically, but when i changed other project like "XYZ" on same create screen, the default description is remaining same.
How can i clear the description auto filling filed when the changed the project name on same create issue screen. Please suggest on this.

I can't apply on particular workflow transition, because ABC project schemes is using shared configuration, it affects 61 project.



Here is the code,


def desc = getFieldById("description")

def defaultValue = """*Background / Description* :

*Acceptance Criteria :* I'll know this is done when -

*Supported APIs ( Available / Usable)* :

*Experiment ( y / n , % of populate it effects )* :

*Design ( desktop / Mobile included ? )* :

*Clickstream Requirements (with scenarios )* :

*Google Analytics Requirements (with scenarios )* :

*Appboy Requirements (with scenarios )* :

*VQA by ?* :

""".replaceAll(/ /, '')

if (! underlyingIssue?.description) {

1 answer


Your code appears not to be correct, since you are using replaceAll(/ /,") which seems like not the proper way of calling the function.

Why would you call replaceAll when your string is static to begin with? You could just simply place all of the string as you wanted it to be there.

Do the following

def desc = getFieldById("description")def defaultValue = """*Background / Description* :"""
if (! underlyingIssue?.description) {

Does that work?



Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

78 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you