Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-49552

How to set component while creating new issue

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Minor Minor
    • jira-steps-plugin
    • None

      Hi Team,

      Is there any way to add component while creating new issue using JIRA jenkins pipeline groovy script?

      We had tried to set the fields as mentioned below, while it is failing with error:

      Could you please support?

      def issue = [fields: [ // id or key must present for project.
                                     project: [id: 10601],
                                     summary: summaryStr,
                                     description: "Devops build request for version '$\{VERSION}'",
                                     priority: [name: 'Lowest'],
                                     //customfield_1000: 'customValue',
                                     // id or name must present for issueType.
                                     issuetype: [id: 10401],
                                     //components: [id: "10002"]
                                     components: [\{name: "AzACS"}]]]
                                    
      

      Jira-jenkins-intgtrn #426 Console [Jenkins]
      Creating new Jira Build Request
      JIRA: Site - ABS Jira - Creating new issue: IssueInput(update=null, fields={project={id=10601}, summary=Devops Build Request, Version : '170.9.165', description=Devops build request for version '170.9.165', priority={name=Lowest}, issuetype={id=10401}, components=[org.jenkinsci.plugins.workflow.cps.CpsClosure2@1f885bb6]})
      Error Code: -1
      Error Message: No serializer found for class org.jenkinsci.plugins.workflow.cps.DSL and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) ) (through reference chain: org.thoughtslive.jenkins.plugins.jira.api.input.IssueInput["fields"]>java.util.LinkedHashMap["components"]>java.util.ArrayList[0]>org.jenkinsci.plugins.workflow.cps.CpsClosure2["delegate"]>org.jenkinsci.plugins.workflow.cps.CpsClosure2["delegate"]>WorkflowScript["binding"]>groovy.lang.Binding["variables"]->java.util.LinkedHashMap["steps"])

            nrayapati Naresh Rayapati
            roshnij7 Roshni J
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: