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

Searching ALL Swimlanes (and Quick Filters) for String

Andrew Wolpers January 24, 2023

Background

A while back I built a script console tool to assist with identifying when a custom field appears in:

  • User Filters
  • Swimlanes
  • Quick Filters
  • Board Gadget configurations

This mostly worked with some caveats for formatting. I'm looking to make some improvements and convert most of these queries from SQL queries to using the API.

I am looking to make this more useful (and stay away from the DB) when identifying fields to combine/merge and assess the impacts of making a change like that.

The current database queries look something like:

def swimlaneQuery = """

SELECT "QUERY","NAME","RAPID_VIEW_ID" from "AO_60DB71_SWIMLANE" WHERE "QUERY" like ${CUSTOM_FIELD_NAME};

""" //todo: update these to account for variables

def gadgetQuery = """

SELECT portalpage.id, portalpage.pagename, portalpage.username FROM portalpage INNER JOIN portletconfiguration ON portalpage.id = portletconfiguration.portalpage INNER JOIN gadgetuserpreference ON portletconfiguration.id = gadgetuserpreference.portletconfiguration WHERE userprefvalue = '${CUSTOM_FIELD_ID};

"""

def quickFilterQuery = """

SELECT "NAME","QUERY","RAPID_VIEW_ID" from "AO_60DB71_QUICKFILTER" WHERE "QUERY" like ${CUSTOM_FIELD_NAME};

"""

Problem

I'm being reminded why I initially went with the Database queries for the boards. I'm finding ways to make updates to a specific board (using https://docs.atlassian.com/jira-software/6.7.7/com/atlassian/greenhopper/service/rapid/view/SwimlaneServiceImpl.html), but I'm not finding a great/obvious way to gather and search all Swimlanes and Quick filters like I am filters (where I am essentially just opening each filter, looking for a match, and returning various data about the filters).

Can anyone point me in the right direction for what I need to be using to get ALL quick filters/Swim lane configurations in the app without specifying a board?

1 answer

1 accepted

Suggest an answer

Log in or Sign up to answer
0 votes
Answer accepted
Andrew Wolpers March 2, 2023

Ended up being:

def filterQuery = """
SELECT "id","reqcontent","filtername" from "searchrequest" WHERE "reqcontent" ilike ${formattedCustomField};
"""
TAGS
AUG Leaders

Atlassian Community Events