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

This widget could not be displayed.


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 Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published 9 hours ago in Marketplace Apps

The 7 hacks of highly successful automation

...there's anything I've learnt from working, it's that people are lazy! No offense to anyone reading this, but it's true and we can all admit it. The easier you make something for someone, the more...

54 views 0 8
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