Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

Description field value in JIRA getting disappeared in Edit screen in JIRA Edited

Hi,

 

I have displaying default value in Description field in create screen using Behaviour Script runners. It is working Fine. We are facing a issue that when we try to edit the JIRA, in Edit screen the values disappear.

If we are trying to edit some other field and save, text in Description field disappear. 

If we edit description field then only edited values are viewed.

 

Can someone help, How to avoid the above issue.

 

Thanks,

Vasnatkumaar

2 comments

Hi @Vasanta Kumaar !

Did you check configuration of behaviour, is this only for create screen ?

also, could you check in console.log of browser some errors? and need to understand the cause

 

Cheers,

Gonchik 

In Console I am getting error as below screenshot

Capture.JPG

I am using below script

def desc = getFieldById("description")

def defaultValue = """h3. (i) SUMMARY
h3. (+) VALUE
h3. :) STAKEHOLDERS
h3. (!) TRACKINGS
h3. (!) METRICS
h3. (/) TO DO
h3. (+) THINGS LESS IMPORTANT THAN TIME TO MARKET
h3. (x) NOT TO DO
h3. (?) QUESTIONS
h3. (flag) DEPENDENCIES

h3. (*) AC
_*Given*_
_*When*_
_*Then*_

h3. (*r) CORNER CASE
_*Given*_
_*When*_
_*Then*_

h3. (*g) DOD
(off) code is reviewed
(off) code is covered by unit and acceptance tests
(off) code is deployed in QA
(off) AC passed in QA (turning FT on to test it if necessary)
(off) At least 1 people (dev, UX, PO,...) that did not develop the story did the AC in QA
(off) code is deployed in all PROD environments
(off) AC passed in PROD (turning FT on to test it if necessary)
(off) funnel happy path is working (checking it manually or automatically)
(off) documentation is kept up-to-date
(off) external stakeholders are notified that the feature is completed/activated
(off) necessary jiras have been opened for cleanup (ab test, FT, tech debt, ...)"""
if ((getActionName() == "Create") && (issueContext.issueType.name =="User Story")){
desc.setFormValue(defaultValue)
}
else {
desc.setFormValue("")
}

Please, double check mapping other behaviours as well, 

I am mapped only the JIRA project which needs the default value and all the issue types.

I am also facing the edit screen issue with other issue types to in the same JIRA project.

Hi @Vasanta Kumaar ,

I have checked on your script, and I would suggest you remove the condition of checking the issue on the create screen. This might cause your "else" condition fire when the issue on the edit screen, and that's why the script will erase your value.

I hope my explanation makes sense to you.

HI Tiong, 

 

I have tried it and if I remove the condition and checked.

When user tries to change the issue type, they can able to see the default value still with other issue types.

Thanks,

Vasantakumaar.

Hi @Vasanta Kumaar ,

May I confirm with you if the original problem was solved but the new problem occurs?

Are these the steps to replication the issue?

  1. Set the default value only for issue type A.
  2. Create new issue > select issue type A > showing the default value > select issue type B > The default value is still showing

Hi @Tiong Lih Yao ,

 

If we remove the if else condition, I am facing issue as you told.

  1. Set the default value only for issue type A.
  2. Create new issue > select issue type A > showing the default value > select issue type B > The default value is still showing

Hello @Vasanta Kumaar ,

Sorry for my previous message might be confusing for you.

My suggestion is not to remove the if-else condition, just the condition checking on the create screen.

This is what I mean:

def desc = getFieldById("description")

def defaultValue = """h3. (i) SUMMARY
h3. (+) VALUE
h3. :) STAKEHOLDERS
h3. (!) TRACKINGS
h3. (!) METRICS
h3. (/) TO DO
h3. (+) THINGS LESS IMPORTANT THAN TIME TO MARKET
h3. (x) NOT TO DO
h3. (?) QUESTIONS
h3. (flag) DEPENDENCIES

h3. (*) AC
_*Given*_
_*When*_
_*Then*_

h3. (*r) CORNER CASE
_*Given*_
_*When*_
_*Then*_

h3. (*g) DOD
(off) code is reviewed
(off) code is covered by unit and acceptance tests
(off) code is deployed in QA
(off) AC passed in QA (turning FT on to test it if necessary)
(off) At least 1 people (dev, UX, PO,...) that did not develop the story did the AC in QA
(off) code is deployed in all PROD environments
(off) AC passed in PROD (turning FT on to test it if necessary)
(off) funnel happy path is working (checking it manually or automatically)
(off) documentation is kept up-to-date
(off) external stakeholders are notified that the feature is completed/activated
(off) necessary jiras have been opened for cleanup (ab test, FT, tech debt, ...)"""
if (issueContext.issueType.name =="User Story"){
desc.setFormValue(defaultValue)
}
else {
desc.setFormValue("")
}

Everything should work fine with this.

Comment

Log in or Sign up to comment
TAGS

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