Hello, I am using a script that adds-up the story points of all the issues in the epic, but, when users who have their language as spanish see the result it adds a 0.
I think it is because Jira says the number is 10.0 and in spanish dots are for decimals so it puts 100, but I do not know how to fix it.
The script is:
import com.atlassian.jira.ComponentManager
import com.atlassian.jira.ComponentAccessor
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.component.ComponentAccessor;
def componentManager = ComponentManager.getInstance()
def issueLinkManager = ComponentAccessor.getIssueLinkManager()
def cfManager = ComponentAccessor.getCustomFieldManager()
double totalSP = 0
customField = ComponentAccessor.getCustomFieldManager().getCustomFieldObject("customfield_10106");
enableCache = {-> false}
issueLinkManager.getOutwardLinks(issue.id)?.each {issueLink ->
if (issueLink.issueLinkType.name == "Epic-Story Link" ){
double SP = (double)(issueLink.destinationObject.getCustomFieldValue(customField) ?: 0)
totalSP = SP + totalSP;
}}
return totalSP
Fixed! If I use as a template text instead of number it does not add the dot!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.