/
Filter Administration Functions
Filter Administration Functions
This section contains functions that enable users to handle filters, including creating, updating and sharing them. Also the filter event function
Functions Summary
Structures used in cloud:
JSharePermission
int id; // the id of the permission
string type; // the type of the permission
string object; //the corresponding object id, see notes
Type must be one of the following:
"user"
- object must be theaccountId
"group"
- object must begroupid
"project"
- object must beprojectKey
"projectRole"
- object must have this formprojectKey|roleId
"global"
- object value is discarded"loggedin"
- object value is discarded
See below example on usage
JFilter
int id; //id of the filter
string jql; // the jql
string name; //must be unique in your Jira
string description; // just a description, optional
string owner; // account id of the owner
JSharePermission [] editPermissions; //edit
JSharePermission [] sharePermissions; //share
Example usage
//create a filter
JFilter f = admCreateFilter("pcfilter", "project = TEST and issueType = Bug", currentUser(), "This is programatically created");
//get it's owner
string owner = admGetFilterOwner(f.id);
//update the filter
f.description = "Modified description";
f.name="pcfiltertwo";
admUpdateFilter(f);
//update various bits
admChangeFilterOwner(f.id, someOtherUser);
admFavourFilter(f.id, currentUser());
//Get filters in different ways
f = admGetFilterById(f.id);
JFilter [] allFilters = admGetAllFilters();
JFilter [] namedFilters = admGetFiltersByName("pcfiltertwo");
JFilter [] owned = admGetAllOwnedFilters(currentUser());
//Share a filter:
JSharePermission perm;
perm.type="project";
perm.object="TEST";
admShareFilter(f.id, 1, perm);
perm.type="group";
perm.object="site-admins";
admShareFilter(f.id, 1, perm);
Peacock
Related content
Screen and Screen Schemes Administration Functions
Screen and Screen Schemes Administration Functions
Read with this
admCreateFilter
admCreateFilter
More like this
How to use setShareScope action in Jira Command Line Interface (CLI)
How to use setShareScope action in Jira Command Line Interface (CLI)
More like this
admShareFilter
admShareFilter
More like this
admShareFilter
admShareFilter
More like this
Shared ownership for filters
Shared ownership for filters
More like this