-
Bug
-
Resolution: Fixed
-
Minor
-
None
I am using the updated 1.1.0 plugin with all fields for tickets and I am trying to use the duedate field with issues.
My example Jenkinsfile is:
import org.joda.time.DateTime; node('mynode') { def issue = [ fields: [ project: [key: 'myproject'], summary: 'summary', description: 'description'.stripIndent(), components: [[name: 'mycomp']], assignee: [name: 'first.last'], //duedate: new DateTime(2020, 3, 26, 0, 0), duedate: DateTime.now(), issuetype: [name: 'Deploy'] ] ] response = jiraNewIssue issue: issue, site: "jira-production" }
The stack trace I am getting is:
org.kohsuke.stapler.NoStaplerConstructorException: There's no @DataBoundConstructor on any constructor of class org.joda.time.DateTime, updated: org.kohsuke.stapler.NoStaplerConstructorException: There's no @DataBoundConstructor on any constructor of class org.joda.time.DateTime)[])): java.lang.ClassCastException: org.thoughtslive.jenkins.plugins.jira.api.Fields.duedate expects class org.joda.time.DateTime but received class org.joda.time.DateTime at org.jenkinsci.plugins.structs.describable.DescribableModel.instantiate(DescribableModel.java:264) at org.jenkinsci.plugins.structs.describable.DescribableModel.coerce(DescribableModel.java:380) at org.jenkinsci.plugins.structs.describable.DescribableModel.buildArguments(DescribableModel.java:318) at org.jenkinsci.plugins.structs.describable.DescribableModel.instantiate(DescribableModel.java:259) ... 52 more Caused by: java.lang.ClassCastException: org.thoughtslive.jenkins.plugins.jira.api.Fields.duedate expects class org.joda.time.DateTime but received class org.joda.time.DateTime at org.jenkinsci.plugins.structs.describable.DescribableModel.coerce(DescribableModel.java:392) at org.jenkinsci.plugins.structs.describable.DescribableModel.buildArguments(DescribableModel.java:318) at org.jenkinsci.plugins.structs.describable.DescribableModel.instantiate(DescribableModel.java:259) ... 55 more