Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Using Behaviors to populate Description Field Edited

Using Behaviors and code that is on Scriptrunner site

 

Script Code.png

 

User are experiencing from time to time when they make changes the text reverts back tpo the default that is being set.  There have been reports that when a user clicks into another field the Description field reset to the defautl text.  Looking for posible causes or maybe something in the code. 

 

Additonal testing it appears that if you make the change to the default and then go to the Assignee field and set the assignee the field goes back to default value - but if you click the undo arrows in the lower right of the field and select undo - your changes are back. 

1 answer

Hi Brian,

Is this an initialiser function ?

I would suggest to change it into 

import static com.atlassian.jira.issue.IssueFieldConstants.*

def desc = getFieldById(DESCRIPTION)

if (! desc.getValue() ) {
    desc.setFormValue("This is a default value")
}

regards, Thanos

This did fix the issue on creating an issue that it does nto revert back to the original text.  However there are two new issues that cropped up 

  • If you edit an issue the defualt text overwrites the exisitng text 
  • With the behavior enabled it disables the ability to edit the descriotion in the Issue Detail view on a board. 

 

This is hte code that I have in place 

import static com.atlassian.jira.issue.IssueFieldConstants.*


def desc = getFieldById(DESCRIPTION)

if (! desc.getValue() ) { desc.setFormValue("""h2. Narrative
* As a
* I want
* so that

h2. Acceptance Criteria
Enter the Acceptance Criteria here.""") }

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

Happy New Year and Welcome New Marketplace Partner Program Partners!

Happy New Year! We hope you all had a safe and restful holiday season. 2020 was a unique year full of unforeseen events; however, as we enter the new year of 2021, we’re optimistic for the light at t...

641 views 7 23
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you