Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-66450

Java type java.util.Date not currently supported for .setCustomFieldValue()

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • None
    • None
    • None
    • 1
    • 1
    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      Hi,

      I'm trying to store Date type into a customfield in Groovy/ScriptRunner Plugin using the .setCustomFieldValue() and get the following exception
      java.lang.IllegalArgumentException: Java type java.util.Date not currently supported. Sorry.

      Please see my code below. Are you planning to support Date, please?
      Thanks,
      Jarda

      MutableIssue       issueToUpdate      = (MutableIssue)issue;            
      ComponentManager   componentManager   = ComponentManager.getInstance();
      IssueManager       issueManager       = ComponentAccessor.getIssueManager(); 
      CustomFieldManager customFieldManager = ComponentAccessor.getCustomFieldManager();
      ApplicationUser    user               = ComponentAccessor.getUserManager().getUserByKey(c.USER());            issueToUpdate.setCustomFieldValue(customFieldManager.getCustomFieldObjectByName(CustomFieldName), Date);
      issueManager.updateIssue(user, issueToUpdate, EventDispatchOption.ISSUE_UPDATED, true)
      

       

      Attachments

        Activity

          People

            wthompson Wazza
            509985f36ba7 Jaroslav Lhoták
            Votes:
            6 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated: