A while back I built a script console tool to assist with identifying when a custom field appears in:
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};
"""
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?
Ended up being:
def filterQuery = """
SELECT "id","reqcontent","filtername" from "searchrequest" WHERE "reqcontent" ilike ${formattedCustomField};
"""
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.