Forums

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

How to check if the default value is updated

rbalamu2
Contributor
June 20, 2022

Hi Team,
I have a field named  "Analysis Notes" and have a default value as below
Cause of the defect:
Root cause of the defect:
Impacted area:

When a user moves the status of the issue from "Review" to "Implemented" I want the user to fill in the value of  "Analysis Notes"

I have created a screen as "Analysis screen" and added the field "Analysis Notes" to this screen.

The problem is that, since it has the default value my validator condition to change the "Analysis Notes" is not working. 

Please give me a solution.

3 answers

1 accepted

2 votes
Answer accepted
John Funk
Community Champion
June 20, 2022

Hi @rbalamu2  - Are you using any add-ons like JMWE or ScriptRunner? 

If not, one thing you could do is create a custom field that is hidden (i.e. not on a screen). Then create an automation rule that sets the value of the custom field when the Analysis Notes field is update. 

Then you can base your validator on the value of the custom field. 

I would just use a radio button type with No and Yes for the custom field. Set the value to Yes when the field is updated. Then set your validator to say the custom field must be equal to Yes. 

rbalamu2
Contributor
June 20, 2022

Great @John Funk

Like John Funk likes this
rbalamu2
Contributor
June 20, 2022

Hi @John Funk ,

I am using Issue fields condition, from automation to set the condition. 
I have the below default value:

*Cause of the defect:*
*Root cause of the defect:*
*Impacted area:*

Since it has space between each line, it is not considering the condition which in turn doesn't validate the field. Kindly help!

John Funk
Community Champion
June 21, 2022

I have not tried this before, but try this syntax to remove the extra lines between 

{{issue.summary.replaceAll("\n", "")}} to remove all newline characters ("\n") instead of {{issue.summary}}.

rbalamu2
Contributor
June 29, 2022

Hi @John Funk ,
I am using "Issue Transitioned" trigger.
I used "Advanced compare condition" find the attachment below:
condition.PNG
Please let me know if I am doing anything wrong.

John Funk
Community Champion
June 29, 2022

As I said, I have not actually tried this. Did you try it? Did it work? If not, what kind of error did you get? 

Like Craig Nodwell likes this
0 votes
abhishek.s-j January 24, 2024

Hi @rbalamu2 ,

Add this validator:

"Fields required or changed (by JWT)"

and then choose as below, when prompted:

validation as "must be changed"

This should resolve the problem you were facing, let me know if it does not ?

Also, @John Funk and @Craig Nodwell , is this approach right, I wanted to check with you community leaders, if this fixes the issue.

Hope it does !

Thanks,
--Abhishek

0 votes
Craig Nodwell
Community Champion
June 20, 2022

Hi @rbalamu2 do you have any plugins available to you?  This would be a perfect example of the need for a screen behavior, a feature of Scriptrunner.  Short of that all I can suggest to you is to remove the default value, or test in your condition that the value of the field is both not null and also that the value of the field is not equal to your default value (reflecting edits to that default value).

rbalamu2
Contributor
June 20, 2022

Awesome. Thanks @Craig Nodwell 

rbalamu2
Contributor
June 20, 2022

Hi @Craig Nodwell ,
I am using Issue fields condition, from automation to set the condition. 
I have the below default value:

*Cause of the defect:*
*Root cause of the defect:*
*Impacted area:*

Since it has space between each line, it is not considering the condition which in turn doesn't validate the field. Kindly help!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events