jenkinsci/git-changelog-plugin

Jira Summary is not fetched

Closed this issue · 1 comments

I am using below code :
{
def changelogString = gitChangelog returnType: 'STRING',
from: [type: 'REF', value: "${currentReleaseTag}"],
to: [type: 'REF', value: 'master'],
ignoreCommitsIfMessageMatches: '^Merge.',
ignoreCommitsWithoutIssue: 'true',
jira: [issuePattern: 'CICD'+ '-([0-9]+)\b',password: "${PASSWORD}", server: 'https://jira.com', username: "${USERNAME}"],
template: """

           <!DOCTYPE html>
<title>Change Log</title> <style> h2 { text-decoration: underline; } table { border: 1px solid black; border-collapse: collapse; width: 100%; } th, td { border: 1px solid black; border-collapse: collapse; text-align: left; padding: 8px; } tr:nth-child(even){background-color: #f2f2f2} th { background-color: #0099cc; color: white; } </style>

Change Log for {{repoName}}

JOB NAME: ${JOB_NAME}

BUILD ID: ${BUILD_ID}

GIT BRANCH:${GIT_BRANCH}

{{#tags}}

{{name}}

{{#issues}}
{{#hasIssue}}

{{/hasIssue}} {{^hasIssue}} {{/hasIssue}} {{/issues}}
JIRA ID JIRA TITLE GIT MERGES
{{issue}} ### {{name}} {{issue}} {{title}} {{#hasIssueType}} *{{issueType}}* {{/hasIssueType}} {{#hasLabels}} {{#labels}} *{{.}}* {{/labels}} {{/hasLabels}} {{#commits}} {{{messageTitle}}}
{{hash}} {{authorName}} {{commitTime}}

{{/commits}}

{{/tags}}

But still not able to print the summary in 2nd collumn

Expected result - the 2nd collum should fetch the JIRA ticket summary tab with JIRA issue ticlet no
actual result - JIRA DE-10234

Still not following issue template