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

0 votes


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
Community showcase
Published Nov 29, 2018 in Marketplace Apps

How to set up an incident workflow from the VP of Engineering at Sentry

Hey Atlassian community, I help lead engineering at Sentry, an open-source error-tracking and monitoring tool that integrates with Jira. We started using Jira Software Cloud internally last year, a...

1,753 views 3 11
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