I want to create a Scripted Field that contains information ( story points, issue key and status) from the issues that have been linked to epic. And display then in HTML Table. I did find a script: import com.atlassian.jira.component.ComponentAccessor
import groovy.xml.MarkupBuilder
def issueLinkManager = ComponentAccessor.getIssueLinkManager()
def links = issueLinkManager.getOutwardLinks(issue.id)
def writer = new StringWriter()
def xml = new MarkupBuilder(writer)
if(!links){
return null
}
xml.style(type:"text/css",
'''
#scriptField, #scriptField *{
border: 1px solid black;
}
#scriptField{
border-collapse: collapse;
}
''')
xml.table(id:"scriptField"){
tr{
th( "Key")
th("Sorty Points")
th("Status")
}
links.each {issueLink ->
def linkedIssue = issueLink.destinationObject
tr{
td(linkedIssue.key.toString())
td(linkedIssue.storypoints.toString())
td(linkedIssue.status.getName().toString())
}
}
}
return (writer.toString())
Which works fine for giving the details for (issue key and status), but I am not able to get the story points value in this and setting a jql to get only open linked issue value, not the closed one.
I am new to scripting, any help will be much appreciated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.