Skip to content

Commit

Permalink
Add Jira Filter View Macro
Browse files Browse the repository at this point in the history
  • Loading branch information
zackerydev authored and mrueg committed May 25, 2023
1 parent 0988a7a commit 80d3be2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,10 @@ By default, mark provides several built-in templates and macros:

See: https://confluence.atlassian.com/conf59/status-macro-792499207.html

* template `ac:jira:filter` to include JIRA Filters/Searches. Parameters:
- JQL: The "JQL" query of the search
- Server (Optional): The Jira server to fetch the query from if its not the default of "System Jira"

* template `ac:jiraissues` to include a list of JIRA tickets. Parameters:
- URL (Required), The URL of the XML view of your selected issues. (link to the filter)
- Anonymous (Optional) If this parameter is set to 'true', your JIRA application will return only the issues which allow unrestricted viewing. That is, the issues which are visible to anonymous viewers. If this parameter is omitted or set to 'false', then the results depend on how your administrator has configured the communication between the JIRA application and Confluence. By default, Confluence will show only the issues which the user is authorised to view.
Expand Down
9 changes: 9 additions & 0 deletions pkg/mark/stdlib/stdlib.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,15 @@ func templates(api *confluence.API) (*template.Template, error) {
`</ac:structured-macro>`,
),

/* Used for rendering Jira Filters */

`ac:jira:filter`: text(
`<ac:structured-macro ac:name="jira">`,
`<ac:parameter ac:name="server">{{ or .Server "System JIRA" }}</ac:parameter>`,
`<ac:parameter ac:name="jqlQuery">{{ .JQL }}</ac:parameter>`,
`</ac:structured-macro>`,
),

/* https://confluence.atlassian.com/doc/jira-issues-macro-139380.html */
`ac:jiraissues`: text(
`<ac:structured-macro ac:name="jiraissues">`,
Expand Down

0 comments on commit 80d3be2

Please sign in to comment.