Hey Gang,
So I've got some team members that are really hating the relative date format and want to see some dates in yyyy-MM-dd HH:mm ... however another team in our JIRA prefers them, and from what I can tell, relative dates are system wide.
I'm looking to create a scripted field that can pull that date and display it in yyyy-MM-dd HH:mm (it can be a text field/string, doesn't need to be into an actual date format) but I'm not sure how to do that.
Been messing around with the following...
import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.ComponentManager;
import com.atlassian.jira.issue.CustomFieldManager;
import com.atlassian.jira.issue.fields.CustomField;
import com.atlassian.jira.issue.IssueManager;
import com.atlassian.jira.issue.Issue;
def issueManager = ComponentAccessor.getIssueManager()
CustomFieldManager customFieldManager = ComponentAccessor.getCustomFieldManager();
def cField = customFieldManager.getCustomFieldObject("customfield_10700")
def cFieldValue = issue.getCustomFieldValue(cField)
issue.setCustomFieldValue(cFieldValue)
but I can't seem to get away from the following error
groovy.lang.MissingMethodException: No signature of method: com.atlassian.jira.issue.IssueImpl.setCustomFieldValue() is applicable for argument types: (java.sql.Timestamp) values: [2018-09-26 00:00:00.0] Possible solutions: getCustomFieldValue(com.atlassian.jira.issue.fields.CustomField), setCustomFieldValue(com.atlassian.jira.issue.fields.CustomField, java.lang.Object)
Looks like I'm pulling the value correctly but there's something about setting the value thats not working. I've tried switching the custom field template to Text Field, Date Time Picker, and Absolute date time with no luck.
Anyone able to help?