Time Tracking fields (Original Estimated, Remaining Estimation) copy to another field by calculation (1h = 3600S). Created scripted field template as duration(Timetracking) and add this below script
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.core.util.DateUtils
import java.sql.Timestamp
// Get the issue
//def issue = issue
// Get the remaining estimate in seconds
def result = 0
// Perform the calculations
def issueEstimate = issue.originalEstimate
if (issueEstimate) {
result = issueEstimate * 3600
def user = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
// Set the result to a custom field (change 'customFieldName' to your custom field name)
def customFieldName = "Estimate (used for Kiplot Automation)"
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def customField = customFieldManager.getCustomFieldObjectByName(customFieldName)
issue.setCustomFieldValue(customField, result)
}
if (customField) {
issue.setCustomFieldValue(customField, result)
}
return result
Please help me on this.
Thanks,
Sai