title: Create Release Notes using JIRA Rest API in HTML format in groovy
body: <p>I am working on a script where I need to create the release notes using JIRA REST API in HTML format for any project.The below four field should come in that release notes. </p>
  
  <p>Issue Key   Module  Summary Release Note</p>
  
  <p>I am trying the below code but it is giving me only the issue Key field but need all other fields as well and in html file.Could you please suggest me on this?</p>
  
  <p>Issue:1
  Initially it was giving me the output in below format:</p>
  
  <pre><code>NTTB-2141
  NTTB-2144
  NTTB-2140
  </code></pre>
  
  <p>But now it is giving me the output json fromat way.</p>
  
  <p>Code which I am trying from the groovy console:</p>
  
  <pre><code>@Grab(group='org.codehaus.groovy.modules.http-builder', module='http-builder', version='0.7' )
  import groovyx.net.http.RESTClient
  
  final String USAGE =
    "Usage: -Djira.username=xxx -Djira.password=xxx -Djira.fixVersion=1.0"
  
  String jiraUsername = 'ABCDEF'
  String jiraPassword = '********'
  String jiraFixVersion = '3.8.101'
  
  println "Getting issues..."
  if (!jiraUsername?.trim()) {
      fail("Empty property: jira.username " + USAGE)
  }
  
  if (!jiraPassword?.trim()) {
      fail("Empty property: jira.password " + USAGE)
  }
  
  if (!jiraFixVersion?.trim()) {
       fail("Empty property: jira.fixVersion " + USAGE)
  }
  
  final String JIRA_SEARCH_URL = "https://jira.test.com/rest/api/latest/"
  // see JIRA docs about search:
  // https://docs.atlassian.com/jira/REST/latest/#idp1389824
  String JQL = "project = NCCB"
  JQL += " AND issuetype in standardIssueTypes()"
  JQL += " AND status in (Resolved, Closed)"
  JQL += " AND fixVersion = \"${jiraFixVersion}\""
  
  def jira = new RESTClient(JIRA_SEARCH_URL)
  
  def query = [:]
  query['os_username'] = jiraUsername
  query['os_password'] = jiraPassword
  query['jql'] = JQL
  query['startAt'] = 0
  query['maxResults'] = 1000
  
  try {
      def resp = jira.get(path: "search",
                          contentType: "application/json",
                          query: query)
      assert resp.status == 200
      assert (resp.data instanceof net.sf.json.JSON)
      resp.data.issues.each { issue -&gt;
          println issue.key
      }
      println "Total issues: " + resp.data.total
  } catch (groovyx.net.http.HttpResponseException e) {
      if (e.response.status == 400) {
          // HTTP 400: Bad Request, JIRA JQL error
          fail("JIRA query failed: ${e.response.data}", e)
      } else {
          fail("Failure HTTP status ${e.response.status}", e)
      }
  
  }
  </code></pre>