Forums

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

Show a warning message whenever the Original Estimate value is changed and exceeds a set limit.

Likhita May 21, 2025

Hi All,

I’m trying to set a help text on the Original Estimate field dynamically using Behaviours. The goal is to show a message when the entered value in Original Estimate exceeds a certain threshold.

However, unlike other fields (like number or text fields), the Original Estimate field doesn't behave as expected. When the value changes, the help text doesn't update in real-time. It only appears after the issue is updated and reopened — not immediately as the value is entered.

This means the dynamic behavior isn’t working as it does with standard custom fields, which respond to changes instantly.

Can someone help me understand why Behaviours don’t work dynamically with the "Original Estimate" field?

Please suggest any other possible solution as per the requirement..

Below is my code:

1. Attached this below script to "Original Estimate" Field in behaviours

//Code Start

// get Original Estimate field object
def originalEstimateField = getFieldById(getFieldChanged())
def value = originalEstimateField.getValue()

def loggedTimespent = underlyingIssue.timeSpent
log.info("Time Spent (in seconds): " + loggedTimespent)

def numValue = 0L

if (value) {
    try {
        numValue = Double.parseDouble(value.toString())
    } catch (Exception e) {
        log.warn("Invalid value format: " + value)
    }
} else if (underlyingIssue?.getOriginalEstimate()) {
    numValue = underlyingIssue.getOriginalEstimate()
}

log.info("Original Estimate in seconds: " + numValue)

// Convert original estimate to days
def estimatedDays = numValue / 28800
log.info("Estimated Days: " + estimatedDays)

// Convert time spent to days
def timeSpentDays = loggedTimespent ? (loggedTimespent / 28800) : 0
log.info("Time Spent in Days: " + timeSpentDays)

def valueche = estimatedDays - timeSpentDays
log.info(valueche)

if (estimatedDays > 5) {
    originalEstimateField.setHelpText("Original estimate exceeds 5 days. Please review.")
} else {
    originalEstimateField.setHelpText(null)
}
//Code Ends

1 answer

0 votes
Ram Kumar Aravindakshan _Adaptavist_
Community Champion
June 8, 2025

Hi @Likhita

Could you please clarify if this is for Jira Cloud or DC?

I'm asking this because your question has tags for DC, and the deployment type you have selected is cloud.

I am looking forward to your feedback and clarification.

Thank you and Kind regards,
Ram

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events