You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
I am trying to find the Jira database table that stores a scriptrunner custom field. We are calculating the time an issue is in one of the statuses of the projects work flow. Below is the script that is running to calculate the amount of time in that status. I have the field in the customfield table but no values are in the customfieldvalue table.
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.history.ChangeItemBean
def changeHistoryManager = ComponentAccessor.getChangeHistoryManager()
def inProgressName = "1: Gap Analysis Assessment"
List<Long> rt = [0L]
def changeItems = changeHistoryManager.getChangeItemsForField(issue, "status")
changeItems.reverse().each {ChangeItemBean item ->
def timeDiff = System.currentTimeMillis() - item.created.getTime()
if (item.fromString == inProgressName) {
rt << -timeDiff
}
if (item.toString == inProgressName){
rt << timeDiff
}
}
def total = rt.sum() as Long
if (total == 0) { return null}
else return (total / 1000) as long ?: 0L
There isn't one. The result from a scripted field is not stored, like a lot of other stuff Jira shows you.
Your question leads me on to something else though. Why are you asking this? Why are you looking at the Jira database?
I ask that because SQL is the single worst possible way to get any information out of Jira, and there is always a better way to do it. What are you trying to achieve here?
We often have questions from folks using Jira Service Management about the benefits to using Premium. Check out this video to learn how you can unlock even more value in our Premium plan. &nb...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.