Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,363,130
Community Members
 
Community Events
168
Community Groups

How to create advanced scripted field to display the story points value from the link issue to epic?

Edited
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.

1 answer

Any help, is much appreciated. 

@Prerna  you are using wrong spellings.

th("Sorty Points") its wrong.

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events