getMyFilters method
Returns the filters owned by the user. If includeFavourites
is true
,
the user's visible favorite filters are also returned.
Permissions required: Permission to access Jira, however, a favorite filters is only visible to the user where the filter is:
- owned by the user.
- shared with a group that the user is a member of.
- shared with a private project that the user has Browse projects project permission for.
- shared with a public project.
- shared with the public.
For example, if the user favorites a public filter that is subsequently made private that filter is not returned by this operation.
Implementation
Future<List<Filter>> getMyFilters(
{String? expand, bool? includeFavourites}) async {
return (await _client.send(
'get',
'rest/api/3/filter/my',
queryParameters: {
if (expand != null) 'expand': expand,
if (includeFavourites != null)
'includeFavourites': '$includeFavourites',
},
) as List<Object?>)
.map((i) => Filter.fromJson(i as Map<String, Object?>? ?? const {}))
.toList();
}