Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Scriptrunner behavior default description problem

Peter Garncarek April 16, 2025

I am experiencing the problem with switching issue type when using behavior to set default description.  What little I could find has not helped much (either I do not understand the code (I am a beginner) or it is suggested to use another app.

If anyone has solved this, I am hoping they can share the solution.  The part I need is the logic to clear the form on issue type switch, as the main problem I have is when having a separate behavior default description for the same project's issue types (the first default description is then stuck for all issue types).  I need some way to clear the description and set the new default on issue type change or be cleared if no default behavior exists for that issue type.

I am migrating from DC where the functionality works great and it would be a big hit to my users if we could no longer have it.

My code starts with this and that is where I need the clearing logic.

const descriptionValue = getFieldById("description").getValue();

// If description field is wiki markup access the content property
if (typeof descriptionValue !== "string") {
const descriptionValueContent = descriptionValue.content.toString();

if (!descriptionValueContent) {

getFieldById("description").setValue({
"version": 1,
"type": "doc",
"content": [

..........

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Laurie Sciutti
Community Champion
April 16, 2025

Hi @Peter Garncarek ~ if I understand correctly, this may be a TON easier to have as an automation rule...  If that isn't an option for you, maybe reach out to Adaptavist for guidance?  If this works for you in DC, they may have a comparable solution in Cloud.  HTH

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
ENTERPRISE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events