Hi everybody -
I have the below code applied to a Calculated Text field - it checks for contents of two separate fields which should contain a date - if one of them does, then it should reformat that date and display it in the requested format - but it does not - the logfile contains the error:
CalculatedTextField: error evaluating formula of field "<fieldname>" of issue GGG-123: Parse error at line 21, column 5. Encountered
Please find below the code - what is the problem? what is the remedy? I searched for a while but to no avail - can someone please help?
thanks a lot
import java.text.SimpleDateFormat;
String s = issueObject.issueTypeObject.name;
if (s.equals("ABC"))
{
engineeringDate = issue.get("customfield_15267");
if (engineeringDate == null)
{
if (engineeringDate = issue.get("customfield_16735") != null)
{
String dateString = new SimpleDateFormat("dd-MM-yyyy hh:mm a").format(engineeringDate);
return dateString;
}else
{
return ""
}
}
else
{
String dateString = new SimpleDateFormat("dd-MM-yyyy hh:mm a").format(engineeringDate);
return dateString;
}
} else if (s.equals("XYZ"))
{
engineeringDate = issue.get("customfield_15267");
if (engineeringDate != null)
{
String dateString = new SimpleDateFormat("dd-MM-yyyy hh:mm a").format(engineeringDate);
return dateString;
}else
{
return ""
}
}
Validate your expertise in managing Jira Service Projects for Cloud. Master configuration, optimize workflows, and manage users seamlessly. Earn global 🗺️ recognition and advance your career as a trusted Jira Service management expert.
Get Certified! ✍️Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.