Issue Summary

      After Jira 10, Groovy scripts that utilize the java.util.Date class with methods like .parse(), .format(), .plus(), and .minus() no longer works using Assets Groovy Console and in Assets Automation.

      Steps to Reproduce

      1. Run the below script in Assets Groovy Console - _https://JIRA_BASE_URL/secure/admin/InsightPluginInitScriptConsole.jspa_
        import java.util.Date
        import org.apache.log4j.Logger
        
        try {
        Date parsedDate = Date.parse("yyyy-MM-dd", "2025-03-31")
        } catch (MissingMethodException e) {
           log.error("Caught an exception: ", e)
        }
        

      Expected Results

      Code should work.

      Actual Results

      The below exception is thrown in the atlassian-jira.log file:

      2025-04-29 08:45:48,652 [http-nio-8080-exec-64 url: /rest/insight/1.0/groovy/evaluate; user: admin] | Caught an exception: , Error: No signature of method: static java.util.Date.parse() is applicable for argument types: (String, String) values: [yyyy-MM-dd, 2025-03-31]
      Possible solutions: parse(java.lang.String), wait(), clone(), any(), grep(), putAt(java.lang.String, java.lang.Object)
      groovy.lang.MissingMethodException: No signature of method: static java.util.Date.parse() is applicable for argument types: (String, String) values: [yyyy-MM-dd, 2025-03-31]
      Possible solutions: parse(java.lang.String), wait(), clone(), any(), grep(), putAt(java.lang.String, java.lang.Object)
      

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

      Versions Tested

      Please confirm all versions that have been tested for this issue, and indicate whether the tested version is affected or not affected, below: 

      Testing Requirements Version Affected Version
      Customers Reported Version 10.3.4, 10.3.5 Yes
      Most Recent Bug-Fix Release    
      Previous Major Release 9.17.5  No
      Most Recent LTS    
      Previous Supported LTS    
      Other Versions..    
      (Add rows as needed)    

              jxu2@atlassian.com Sam Xu
              jxu2@atlassian.com Sam Xu
              Affected customers:
              3 This affects my team
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: