Excerpt | ||
---|---|---|
| ||
|
This section contains functions that enable users to handle filters, including creating, updating and sharing them. Also the filter event function
Functions Summary
Child pages (Children Display) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Structures used in cloud:
JSharePermission
Code Block |
---|
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
Code Block |
---|
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
Code Block | ||
---|---|---|
| ||
//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); |