Skip to content

Commit

Permalink
Add updated Jira config to Config.groovy template
Browse files Browse the repository at this point in the history
  • Loading branch information
ewoks committed Aug 9, 2020
1 parent ec0e0ca commit 72abbe3
Showing 1 changed file with 31 additions and 4 deletions.
35 changes: 31 additions & 4 deletions template_config/Config.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ htmlSanityCheck.with {
//sourceDir = "build/html5/site"
//checkingResultsDir =
}
//end::htmlSanityCheckConfig[]

//tag::jiraConfig[]
// Configuration for Jira related tasks
Expand Down Expand Up @@ -197,10 +198,36 @@ jira.with {
// the label to restrict search to
label =

// Jira query
jql = "project='%jiraProject%' AND labels='%jiraLabel%' ORDER BY priority DESC, duedate ASC"
// Base filename in which Jira query results should be stored
resultsFilename = 'JiraTicketsContent'

saveAsciidoc = true // if true, asciidoc file will be created with *.adoc extension
saveExcel = true // if true, Excel file will be created with *.xlsx extension

/*
List of requests to Jira API:
These are basically JQL expressions bundled with a filename in which results will be saved.
User can configure custom fields IDs and name those for column header,
i.e. customfield_10026:'Story Points' for Jira instance that has custom field with that name and will be saved in a coloumn named "Story Points"
*/
requests = [
new JiraRequest(
filename:"File1_Done_issues",
jql:"project='%jiraProject%' AND status='Done' ORDER BY duedate ASC",
customfields: [customfield_10026:'Story Points']
),
new JiraRequest(
filename:'CurrentSprint',
jql:"project='%jiraProject%' AND Sprint in openSprints() ORDER BY priority DESC, duedate ASC",
customfields: [customfield_10026:'Story Points']
),
]
}

// Filename in which Jira query results should be stored
resultsFilename = 'JiraTicketsContent.adoc'
@groovy.transform.Immutable
class JiraRequest {
String filename //filename (without extension) of the file in which JQL results will be saved. Extension will be determined automatically for Asciidoc or Excel file
String jql // Jira Query Language syntax
Map<String,String> customfields // map of customFieldId:displayName values for Jira fields which don't have default names, i.e. customfield_10026:StoryPoints
}
//end::jiraConfig[]

0 comments on commit 72abbe3

Please sign in to comment.