import
com.atlassian.jira.component.ComponentAccessor
import
com.atlassian.jira.issue.history.ChangeItemBean
import
com.atlassian.core.util.DateUtils
def
changeHistoryManager = ComponentAccessor.getChangeHistoryManager()
def
string =
"<table class='aui aui-table-list'><thead><tr><th>From</th><th>To</th><th>On Date</th></tr></thead><tbody>"
List<Long> rt = [0L]
def
origestimate = changeHistoryManager.getChangeItemsForField(issue,
"timeoriginalestimate"
)
if
(origestimate.
size
() <=
0
){
string =
"N/A"
}
else
{
origestimate.
each
{
ChangeItemBean item ->
def
totalf = item.fromString
as
Long
def
FROMSTRING = (totalf /
3600
)
def
totalt = item.toString
as
Long
def
TOSTRING = (totalt /
3600
)
def
createdDate = item.created.format(
'yyyy/MM/dd'
)
string +=
"<tr class='aui-row-subtle'><td>"
+ FROMSTRING +
"h</td><td>"
+ TOSTRING +
"h</td><td>"
+createdDate+
"</td></tr>"
}
string +=
"</tbody></table>"
}
return
string
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.