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) {
desc.setFormValue(defaultValue)
}
Hi,
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) {
desc.setFormValue(defaultValue)
}
Does that work?
Cheers!
Dyelamos
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.