It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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 Feb 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

Hi Zak,

Thank you, it does help indeed!

Like # people like this

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Confluence

Introducing Confluence Cloud and Jira Software Cloud Premium

Wherever you are in your team’s journey , our goal is to support your big ambitions. We’re a cloud-first company with the mission of unleashing the potential of every team, and to address the range ...

639 views 4 17
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you