Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to automate updating of JIRA filters/query on Confluence page

Oana November 23, 2020

Hello everyone,

We have our Confluence page for each step of a sprint and this page needs to be updated every sprint with the sprint related stories.

 

The team, usually updates the Jira query or filter manually when editing the Confluence page each sprint. The issue is that this is a manual process prone to human error.  I have pasted bellow How the page usually looks once all the data is pulled from JIRA.

My idea was to write a script, not sure in which language or how to link it to both Confluence and JIRA, haven't written scripts at all.

These are the steps that I have identified on what the script should update:

  1. For project is CLOUD and issuetype is STORY  change currentFixVersion from … to  … and nextFixVersion from … to …

This is our current JIRA query:

project = PROJECT NAME AND issuetype = Story AND fixVersion in (S4.3.20, S4.3.20DF, S4.3.20FT, S4.4.20, S4.4.20DF, S4.4.20FT) AND fixVersion not in (S4.2.20FT, S4.5.20DF, S4.6.20DF, S5.1.20DF,S5.2.20DF) AND ("Lead Countries" = "COUNTRY NAME" OR "Other Countries" in (COUNTRY NAME AND ALL)) AND (COUNTRY NAME != "Not Applicable")     

 

Confluence_JIRA_Filters_Query1.jpg

Thank you for your help and please ask any questions that might make this clearer.

 

2 answers

2 votes
Katerina Kovriga {Stiltsoft}
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 23, 2020

Hi @Oana ,

We can suggest trying our app - Table Filter and Charts for Confluence.

Use the most simple JQL query for your Jira Issues macro (such as "project = qwerty") and wrap the macro into the Table Filter macro body.

You'll be able to filter (and save the results!) in the page view mode using a friendly Excel-like interface:

Mon 1-1.pngThe Table Filter macro provides different kinds of filters: dropdown, date range, icon etc. as well as reversed filters to get the most accurate result.

Oana November 24, 2020

Hi @Katerina Kovriga {Stiltsoft} , 

Thank you for your answer.

This seems to be a paid solution, correct?

I am interested in something that I can do by myself before looking into paid solutions.

Would this work with the free version? 

 

Thank you , 

 

Oana

Katerina Kovriga {Stiltsoft}
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 24, 2020

Yes, it's a paid app: filtering is only one part of the available functions. The addon supports Cloud/Server/DC and provides Excel-like features (pivots, table calculations, conditional formatting, table merging, pagination, various kinds of charts based on static and dynamic data, import/export to CSV, etc.).

It may come in handy if you use a lot of tables in Confluence (both manually created and automatically generated by such table macros as Jira Issues, Page Properties Report, etc.). So feel free to give it a try - you'll have one month to explore all the features with an evaluation license.

Oana November 25, 2020

Thank you @Katerina Kovriga {Stiltsoft} this seems interesting and useful but I am looking for something different.

Hope to get a bit more answers and help.

Oana

0 votes
Oscar April 12, 2022

Hi @Oana

I have been working on a similar area. Our aim is to automate the creation of confluence pages and include the Jira's that are linked to the page. 

So far I have this string which I append to the end of a HTML I intend to post to confluence via powershell. 

"<ac:structured-macro ac:name=\""jira\"" ac:schema-version=\""1\"" ac:macro-id=\""4cb87cc3-eac8-4e8d-85c4-72322671662a\"">
<ac:parameter ac:name=\""server\"">Admiral IT Jira</ac:parameter>
<ac:parameter ac:name=\""columnIds\"">issuekey,summary,issuetype,created,updated,assignee,status</ac:parameter>
<ac:parameter ac:name=\""columns\"">key,summary,type,created,updated,assignee,status</ac:parameter>
<ac:parameter ac:name=\""maximumIssues\"">20</ac:parameter>
<ac:parameter ac:name=\""jqlQuery\"">summary ~ &quot;$($PageTitle)&quot; OR labels =&quot;$($PageTitle)&quot;</ac:parameter>
<ac:parameter ac:name=\""serverId\"">*MASKED*
</ac:parameter></ac:structured-macro>"

 

Here we are using a JQL query within the Jira macro. However, the issue we are facing is <ac:structured-macro ac:name=\""jira\"" ac:schema-version=\""1\"" ac:macro-id=\""4cb87cc3-eac8-4e8d-85c4-72322671662a\""> (The first line from above). The ac:macro-id is taken from an existing page and I suspect this is the problem because they are unique. 

This link: 

provided some explanation but omitting the Id failed too.
This comment may help your work and if anyone else can provide more info thanks!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events