Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

script runner calculated field

Antonio_Caeiro
March 11, 2020

Hi all,

Does anyone can help me. I'm quite new in scripting...

I need to get a value from a calculated field (number field) and multiply it by 250

 

I'm using this for a field with the value "5":

import com.atlassian.jira.component.ComponentAccessor;
def customField = ComponentAccessor.getCustomFieldManager().getCustomFieldObject("customfield_10102");
def value = (String)issue.getCustomFieldValue(customField);

return value * 250

 

But the result is:

5.05

 

tks for any help

 

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events