Be you a beginner in JIRA or a professional, one of the features used often is creating and managing filters. The fact that we can save the searches, share them, and subscribe to them adds a lot of value to JIRA. So, how do we programmatically create and manage filters?
In this recipe, we will learn how to manage filters programmatically.
We will see the various aspects of managing the filters one-by-one.
Most of the operations on managing filters are done using SearchRequestService
. For creating a filter, the following are the steps:
Create the query to be saved as a filter. The query can be created using
JqlQueryBuilder
, as we have seen in the previous recipes.Create a
SearchRequest
object from the query, using the appropriate name, description, and so on:SearchRequest searchRequest = new SearchRequest(query, loggedInUser, "Test Filter", "Test Description");
Create a JIRA Service Context. If you are in an...