Confluence JIRA issues filter macro - how to find all the existing queries (SQL or script)

Mihai Mihai February 14, 2019

Hello,

We recently had a change in the options of one field in JIRA. Let's say that for field X, option 'abc' became 'xyz abc' .

Filters using that option cannot find any results anymore.

I would like to mass update the confluence filters.

I know that in JIRA, filters are stored in the 'searchrequest' table.

Where does Confluence store the searches done in the JIRA issue filter macros?

Also, if instead of SQL anyone has another idea using groovy, as we have scriptrunner for Confluence installed, that would be great too.

 

Thank you!

1 answer

1 accepted

0 votes
Answer accepted
Zak Laughton
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 15, 2019

Hi Mihai,

The queries used in Jira macros in Confluence are actually stored in the macro on the page itself. You can see the raw data if you go to ellipsisView Storage format.

Here's an example of the storage format of a page that holds just a Jira Filter macro:

<p><ac:structured-macro ac:name="jira" ac:schema-version="1" ac:macro-id="1815ea5a-5b7b-4996-a2b8-ce4d67009107"><ac:parameter ac:name="server">Your Company JIRA</ac:parameter><ac:parameter ac:name="columns">key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution</ac:parameter><ac:parameter ac:name="maximumIssues">20</ac:parameter><ac:parameter ac:name="jqlQuery">reporter = currentUser() AND created &lt; '2019-01-01' </ac:parameter><ac:parameter ac:name="serverId">bee9410a-b73f-38d9-9ded-f2af8cc4937f</ac:parameter></ac:structured-macro></p>

If you want to find this in the database, its held with the rest of the page content in the BODYCONTENT table.

I hope this helps!
– Zak

Mihai Mihai February 18, 2019

Hi Zak,

Thank you, it does help indeed!

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events