MISC Custom Fields: Calculated text field


I'm using JIRA 6.3.5

I'm trying to use formula, that will give me something like this:

if issue.get("customfield_10303") = 1

 return "one"

if issue.get("customfield_10303") = 2

 return "two"


I tryed lot of formulas, but they does not works!(( Please help me...

P.S. customfield_10303 is a "number only" field

3 answers

1 accepted

This widget could not be displayed.


to compare two values you need to use == instead of =

<!-- @@Formula: Integer i = issue.get("customfield_10303").intValue ();

if (i==null) return null;

if (i==1) return "one";

if (i==2) return "two";


YES!! Thats works!!))) THANKS!!!!

This widget could not be displayed.

what data type is issue.get("customfiled_10303)? I bet is String.


Try adding quotes around "1" and "2".


Mike Hester BlackpearlPdm

data type? Just custom number field. quotes not working. <!-- @@Formula: if issue.get("customfield_10303").intValue = "1" return "one" -->

<!-- @@Formula: if (issue.get("customfield_10303").intValue()) = "1" return "one" --> not working either <!-- @@Formula: (issue.get("customfield_10303").intValue()) --> works good, but i need "if" cascade

This widget could not be displayed.

Can anyone please help me with this problrm?

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

85 views 1 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you