• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tylernathanreed / jira-client-php / 13634794100

03 Mar 2025 03:19PM UTC coverage: 2.067% (-0.1%) from 2.21%
13634794100

push

github

web-flow
~ Try coveralls action

140 of 6773 relevant lines covered (2.07%)

0.03 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Operations/UserSearch.php
1
<?php
2

3
namespace Jira\Client\Operations;
4

5
use Jira\Client\Client;
6
use Jira\Client\Schema;
7

8
/** @phpstan-require-extends Client */
9
trait UserSearch
10
{
11
    /**
12
     * Returns a list of users who can be assigned issues in one or more projects.
13
     * The list may be restricted to users whose attributes match a string
14
     * 
15
     * This operation takes the users in the range defined by `startAt` and `maxResults`, up to the thousandth user, and then returns only the users from that range that can be assigned issues in the projects.
16
     * This means the operation usually returns fewer users than specified in `maxResults`.
17
     * To get all the users who can be assigned issues in the projects, use "Get all users" and filter the records in your code
18
     * 
19
     * Privacy controls are applied to the response based on the users' preferences.
20
     * This could mean, for example, that the user's email address is hidden.
21
     * See the "Profile visibility overview" for more details
22
     * 
23
     * This operation can be accessed anonymously
24
     * 
25
     * **"Permissions" required:** None.
26
     * 
27
     * @link https://developer.atlassian.com/cloud/jira/platform/profile-visibility/
28
     * 
29
     * @param string $projectKeys A list of project keys (case sensitive).
30
     *                            This parameter accepts a comma-separated list.
31
     * @param string $query A query string that is matched against user attributes, such as `displayName` and `emailAddress`, to find relevant users.
32
     *                      The string can match the prefix of the attribute's value.
33
     *                      For example, *query=john* matches a user with a `displayName` of *John Smith* and a user with an `emailAddress` of *johnson@example.com*.
34
     *                      Required, unless `accountId` is specified.
35
     * @param string $username This parameter is no longer available.
36
     *                         See the "deprecation notice" for details.
37
     *                         @link https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide
38
     * @param string $accountId A query string that is matched exactly against user `accountId`.
39
     *                          Required, unless `query` is specified.
40
     * @param int $startAt The index of the first item to return in a page of results (page offset).
41
     * @param int $maxResults The maximum number of items to return per page.
42
     */
43
    public function findBulkAssignableUsers(
×
44
        string $projectKeys,
45
        ?string $query = null,
46
        ?string $username = null,
47
        ?string $accountId = null,
48
        ?int $startAt = 0,
49
        ?int $maxResults = 50,
50
    ): true {
51
        return $this->call(
×
52
            uri: '/rest/api/3/user/assignable/multiProjectSearch',
×
53
            method: 'get',
×
54
            query: compact('projectKeys', 'query', 'username', 'accountId', 'startAt', 'maxResults'),
×
55
            success: 200,
×
56
            schema: true,
×
57
        );
×
58
    }
59

60
    /**
61
     * Returns a list of users that can be assigned to an issue.
62
     * Use this operation to find the list of users who can be assigned to:
63
     * 
64
     *  - a new issue, by providing the `projectKeyOrId`
65
     *  - an updated issue, by providing the `issueKey` or `issueId`
66
     *  - to an issue during a transition (workflow action), by providing the `issueKey` or `issueId` and the transition id in `actionDescriptorId`.
67
     * You can obtain the IDs of an issue's valid transitions using the `transitions` option in the `expand` parameter of " Get issue"
68
     * 
69
     * In all these cases, you can pass an account ID to determine if a user can be assigned to an issue.
70
     * The user is returned in the response if they can be assigned to the issue or issue transition
71
     * 
72
     * This operation takes the users in the range defined by `startAt` and `maxResults`, up to the thousandth user, and then returns only the users from that range that can be assigned the issue.
73
     * This means the operation usually returns fewer users than specified in `maxResults`.
74
     * To get all the users who can be assigned the issue, use "Get all users" and filter the records in your code
75
     * 
76
     * Privacy controls are applied to the response based on the users' preferences.
77
     * This could mean, for example, that the user's email address is hidden.
78
     * See the "Profile visibility overview" for more details
79
     * 
80
     * **"Permissions" required:** *Browse users and groups* "global permission" or *Assign issues* "project permission"
81
     * 
82
     * @link https://developer.atlassian.com/cloud/jira/platform/profile-visibility/
83
     * @link https://confluence.atlassian.com/x/x4dKLg
84
     * @link https://confluence.atlassian.com/x/yodKLg
85
     * 
86
     * @param string $query A query string that is matched against user attributes, such as `displayName`, and `emailAddress`, to find relevant users.
87
     *                      The string can match the prefix of the attribute's value.
88
     *                      For example, *query=john* matches a user with a `displayName` of *John Smith* and a user with an `emailAddress` of *johnson@example.com*.
89
     *                      Required, unless `username` or `accountId` is specified.
90
     * @param string $sessionId The sessionId of this request.
91
     *                          SessionId is the same until the assignee is set.
92
     * @param string $username This parameter is no longer available.
93
     *                         See the "deprecation notice" for details.
94
     *                         @link https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide
95
     * @param string $accountId A query string that is matched exactly against user `accountId`.
96
     *                          Required, unless `query` is specified.
97
     * @param string $project The project ID or project key (case sensitive).
98
     *                        Required, unless `issueKey` or `issueId` is specified.
99
     * @param string $issueKey The key of the issue.
100
     *                         Required, unless `issueId` or `project` is specified.
101
     * @param string $issueId The ID of the issue.
102
     *                        Required, unless `issueKey` or `project` is specified.
103
     * @param int $startAt The index of the first item to return in a page of results (page offset).
104
     * @param int $maxResults The maximum number of items to return.
105
     *                        This operation may return less than the maximum number of items even if more are available.
106
     *                        The operation fetches users up to the maximum and then, from the fetched users, returns only the users that can be assigned to the issue.
107
     * @param int $actionDescriptorId The ID of the transition.
108
     * @param bool $recommend 
109
     */
110
    public function findAssignableUsers(
×
111
        ?string $query = null,
112
        ?string $sessionId = null,
113
        ?string $username = null,
114
        ?string $accountId = null,
115
        ?string $project = null,
116
        ?string $issueKey = null,
117
        ?string $issueId = null,
118
        ?int $startAt = 0,
119
        ?int $maxResults = 50,
120
        ?int $actionDescriptorId = null,
121
        ?bool $recommend = false,
122
    ): true {
123
        return $this->call(
×
124
            uri: '/rest/api/3/user/assignable/search',
×
125
            method: 'get',
×
126
            query: compact('query', 'sessionId', 'username', 'accountId', 'project', 'issueKey', 'issueId', 'startAt', 'maxResults', 'actionDescriptorId', 'recommend'),
×
127
            success: 200,
×
128
            schema: true,
×
129
        );
×
130
    }
131

132
    /**
133
     * Returns a list of users who fulfill these criteria:
134
     * 
135
     *  - their user attributes match a search string
136
     *  - they have a set of permissions for a project or issue
137
     * 
138
     * If no search string is provided, a list of all users with the permissions is returned
139
     * 
140
     * This operation takes the users in the range defined by `startAt` and `maxResults`, up to the thousandth user, and then returns only the users from that range that match the search string and have permission for the project or issue.
141
     * This means the operation usually returns fewer users than specified in `maxResults`.
142
     * To get all the users who match the search string and have permission for the project or issue, use "Get all users" and filter the records in your code
143
     * 
144
     * Privacy controls are applied to the response based on the users' preferences.
145
     * This could mean, for example, that the user's email address is hidden.
146
     * See the "Profile visibility overview" for more details
147
     * 
148
     * This operation can be accessed anonymously
149
     * 
150
     * **"Permissions" required:**
151
     * 
152
     *  - *Administer Jira* "global permission", to get users for any project
153
     *  - *Administer Projects* "project permission" for a project, to get users for that project.
154
     * 
155
     * @link https://developer.atlassian.com/cloud/jira/platform/profile-visibility/
156
     * @link https://confluence.atlassian.com/x/x4dKLg
157
     * @link https://confluence.atlassian.com/x/yodKLg
158
     * 
159
     * @param string $permissions A comma separated list of permissions.
160
     *                            Permissions can be specified as any:
161
     *                             - permission returned by "Get all permissions"
162
     *                             - custom project permission added by Connect apps
163
     *                             - (deprecated) one of the following:
164
     *                                
165
     *                                 - ASSIGNABLE\_USER
166
     *                                 - ASSIGN\_ISSUE
167
     *                                 - ATTACHMENT\_DELETE\_ALL
168
     *                                 - ATTACHMENT\_DELETE\_OWN
169
     *                                 - BROWSE
170
     *                                 - CLOSE\_ISSUE
171
     *                                 - COMMENT\_DELETE\_ALL
172
     *                                 - COMMENT\_DELETE\_OWN
173
     *                                 - COMMENT\_EDIT\_ALL
174
     *                                 - COMMENT\_EDIT\_OWN
175
     *                                 - COMMENT\_ISSUE
176
     *                                 - CREATE\_ATTACHMENT
177
     *                                 - CREATE\_ISSUE
178
     *                                 - DELETE\_ISSUE
179
     *                                 - EDIT\_ISSUE
180
     *                                 - LINK\_ISSUE
181
     *                                 - MANAGE\_WATCHER\_LIST
182
     *                                 - MODIFY\_REPORTER
183
     *                                 - MOVE\_ISSUE
184
     *                                 - PROJECT\_ADMIN
185
     *                                 - RESOLVE\_ISSUE
186
     *                                 - SCHEDULE\_ISSUE
187
     *                                 - SET\_ISSUE\_SECURITY
188
     *                                 - TRANSITION\_ISSUE
189
     *                                 - VIEW\_VERSION\_CONTROL
190
     *                                 - VIEW\_VOTERS\_AND\_WATCHERS
191
     *                                 - VIEW\_WORKFLOW\_READONLY
192
     *                                 - WORKLOG\_DELETE\_ALL
193
     *                                 - WORKLOG\_DELETE\_OWN
194
     *                                 - WORKLOG\_EDIT\_ALL
195
     *                                 - WORKLOG\_EDIT\_OWN
196
     *                                 - WORK\_ISSUE
197
     * @param string $query A query string that is matched against user attributes, such as `displayName` and `emailAddress`, to find relevant users.
198
     *                      The string can match the prefix of the attribute's value.
199
     *                      For example, *query=john* matches a user with a `displayName` of *John Smith* and a user with an `emailAddress` of *johnson@example.com*.
200
     *                      Required, unless `accountId` is specified.
201
     * @param string $username This parameter is no longer available.
202
     *                         See the "deprecation notice" for details.
203
     *                         @link https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide
204
     * @param string $accountId A query string that is matched exactly against user `accountId`.
205
     *                          Required, unless `query` is specified.
206
     * @param string $issueKey The issue key for the issue.
207
     * @param string $projectKey The project key for the project (case sensitive).
208
     * @param int $startAt The index of the first item to return in a page of results (page offset).
209
     * @param int $maxResults The maximum number of items to return per page.
210
     */
211
    public function findUsersWithAllPermissions(
×
212
        string $permissions,
213
        ?string $query = null,
214
        ?string $username = null,
215
        ?string $accountId = null,
216
        ?string $issueKey = null,
217
        ?string $projectKey = null,
218
        ?int $startAt = 0,
219
        ?int $maxResults = 50,
220
    ): true {
221
        return $this->call(
×
222
            uri: '/rest/api/3/user/permission/search',
×
223
            method: 'get',
×
224
            query: compact('permissions', 'query', 'username', 'accountId', 'issueKey', 'projectKey', 'startAt', 'maxResults'),
×
225
            success: 200,
×
226
            schema: true,
×
227
        );
×
228
    }
229

230
    /**
231
     * Returns a list of users whose attributes match the query term.
232
     * The returned object includes the `html` field where the matched query term is highlighted with the HTML strong tag.
233
     * A list of account IDs can be provided to exclude users from the results
234
     * 
235
     * This operation takes the users in the range defined by `maxResults`, up to the thousandth user, and then returns only the users from that range that match the query term.
236
     * This means the operation usually returns fewer users than specified in `maxResults`.
237
     * To get all the users who match the query term, use "Get all users" and filter the records in your code
238
     * 
239
     * Privacy controls are applied to the response based on the users' preferences.
240
     * This could mean, for example, that the user's email address is hidden.
241
     * See the "Profile visibility overview" for more details
242
     * 
243
     * This operation can be accessed anonymously
244
     * 
245
     * **"Permissions" required:** *Browse users and groups* "global permission".
246
     * Anonymous calls and calls by users without the required permission return search results for an exact name match only.
247
     * 
248
     * @link https://developer.atlassian.com/cloud/jira/platform/profile-visibility/
249
     * @link https://confluence.atlassian.com/x/x4dKLg
250
     * 
251
     * @param string $query A query string that is matched against user attributes, such as `displayName`, and `emailAddress`, to find relevant users.
252
     *                      The string can match the prefix of the attribute's value.
253
     *                      For example, *query=john* matches a user with a `displayName` of *John Smith* and a user with an `emailAddress` of *johnson@example.com*.
254
     * @param int $maxResults The maximum number of items to return.
255
     *                        The total number of matched users is returned in `total`.
256
     * @param bool $showAvatar Include the URI to the user's avatar.
257
     * @param ?list<string> $exclude This parameter is no longer available.
258
     *                               See the "deprecation notice" for details.
259
     *                               @link https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide
260
     * @param ?list<string> $excludeAccountIds A list of account IDs to exclude from the search results.
261
     *                                         This parameter accepts a comma-separated list.
262
     *                                         Multiple account IDs can also be provided using an ampersand-separated list.
263
     *                                         For example, `excludeAccountIds=5b10a2844c20165700ede21g,5b10a0effa615349cb016cd8&excludeAccountIds=5b10ac8d82e05b22cc7d4ef5`.
264
     *                                         Cannot be provided with `exclude`.
265
     * @param string $avatarSize 
266
     * @param bool $excludeConnectUsers 
267
     */
268
    public function findUsersForPicker(
×
269
        string $query,
270
        ?int $maxResults = 50,
271
        ?bool $showAvatar = false,
272
        ?array $exclude = null,
273
        ?array $excludeAccountIds = null,
274
        ?string $avatarSize = null,
275
        ?bool $excludeConnectUsers = false,
276
    ): Schema\FoundUsers {
277
        return $this->call(
×
278
            uri: '/rest/api/3/user/picker',
×
279
            method: 'get',
×
280
            query: compact('query', 'maxResults', 'showAvatar', 'exclude', 'excludeAccountIds', 'avatarSize', 'excludeConnectUsers'),
×
281
            success: 200,
×
282
            schema: Schema\FoundUsers::class,
×
283
        );
×
284
    }
285

286
    /**
287
     * Returns a list of active users that match the search string and property
288
     * 
289
     * This operation first applies a filter to match the search string and property, and then takes the filtered users in the range defined by `startAt` and `maxResults`, up to the thousandth user.
290
     * To get all the users who match the search string and property, use "Get all users" and filter the records in your code
291
     * 
292
     * This operation can be accessed anonymously
293
     * 
294
     * Privacy controls are applied to the response based on the users' preferences.
295
     * This could mean, for example, that the user's email address is hidden.
296
     * See the "Profile visibility overview" for more details
297
     * 
298
     * **"Permissions" required:** *Browse users and groups* "global permission".
299
     * Anonymous calls or calls by users without the required permission return empty search results.
300
     * 
301
     * @link https://developer.atlassian.com/cloud/jira/platform/profile-visibility/
302
     * @link https://confluence.atlassian.com/x/x4dKLg
303
     * 
304
     * @param string $query A query string that is matched against user attributes ( `displayName`, and `emailAddress`) to find relevant users.
305
     *                      The string can match the prefix of the attribute's value.
306
     *                      For example, *query=john* matches a user with a `displayName` of *John Smith* and a user with an `emailAddress` of *johnson@example.com*.
307
     *                      Required, unless `accountId` or `property` is specified.
308
     * @param string $username 
309
     * @param string $accountId A query string that is matched exactly against a user `accountId`.
310
     *                          Required, unless `query` or `property` is specified.
311
     * @param int $startAt The index of the first item to return in a page of filtered results (page offset).
312
     * @param int $maxResults The maximum number of items to return per page.
313
     * @param string $property A query string used to search properties.
314
     *                         Property keys are specified by path, so property keys containing dot (.) or equals (=) characters cannot be used.
315
     *                         The query string cannot be specified using a JSON object.
316
     *                         Example: To search for the value of `nested` from `{"something":{"nested":1,"other":2}}` use `thepropertykey.something.nested=1`.
317
     *                         Required, unless `accountId` or `query` is specified.
318
     */
319
    public function findUsers(
×
320
        ?string $query = null,
321
        ?string $username = null,
322
        ?string $accountId = null,
323
        ?int $startAt = 0,
324
        ?int $maxResults = 50,
325
        ?string $property = null,
326
    ): true {
327
        return $this->call(
×
328
            uri: '/rest/api/3/user/search',
×
329
            method: 'get',
×
330
            query: compact('query', 'username', 'accountId', 'startAt', 'maxResults', 'property'),
×
331
            success: 200,
×
332
            schema: true,
×
333
        );
×
334
    }
335

336
    /**
337
     * Finds users with a structured query and returns a "paginated" list of user details
338
     * 
339
     * This operation takes the users in the range defined by `startAt` and `maxResults`, up to the thousandth user, and then returns only the users from that range that match the structured query.
340
     * This means the operation usually returns fewer users than specified in `maxResults`.
341
     * To get all the users who match the structured query, use "Get all users" and filter the records in your code
342
     * 
343
     * **"Permissions" required:** *Browse users and groups* "global permission"
344
     * 
345
     * The query statements are:
346
     * 
347
     *  - `is assignee of PROJ` Returns the users that are assignees of at least one issue in project *PROJ*
348
     *  - `is assignee of (PROJ-1, PROJ-2)` Returns users that are assignees on the issues *PROJ-1* or *PROJ-2*
349
     *  - `is reporter of (PROJ-1, PROJ-2)` Returns users that are reporters on the issues *PROJ-1* or *PROJ-2*
350
     *  - `is watcher of (PROJ-1, PROJ-2)` Returns users that are watchers on the issues *PROJ-1* or *PROJ-2*
351
     *  - `is voter of (PROJ-1, PROJ-2)` Returns users that are voters on the issues *PROJ-1* or *PROJ-2*
352
     *  - `is commenter of (PROJ-1, PROJ-2)` Returns users that have posted a comment on the issues *PROJ-1* or *PROJ-2*
353
     *  - `is transitioner of (PROJ-1, PROJ-2)` Returns users that have performed a transition on issues *PROJ-1* or *PROJ-2*
354
     *  - `[propertyKey].entity.property.path is "property value"` Returns users with the entity property value.
355
     * For example, if user property `location` is set to value `{"office": {"country": "AU", "city": "Sydney"}}`, then it's possible to use `[location].office.city is "Sydney"` to match the user
356
     * 
357
     * The list of issues can be extended as needed, as in *(PROJ-1, PROJ-2, ...
358
     * PROJ-n)*.
359
     * Statements can be combined using the `AND` and `OR` operators to form more complex queries.
360
     * For example:
361
     * 
362
     * `is assignee of PROJ AND [propertyKey].entity.property.path is "property value"`
363
     * 
364
     * @link https://confluence.atlassian.com/x/x4dKLg
365
     * 
366
     * @param string $query The search query.
367
     * @param int $startAt The index of the first item to return in a page of results (page offset).
368
     * @param int $maxResults The maximum number of items to return per page.
369
     */
370
    public function findUsersByQuery(
×
371
        string $query,
372
        ?int $startAt = 0,
373
        ?int $maxResults = 100,
374
    ): Schema\PageBeanUser {
375
        return $this->call(
×
376
            uri: '/rest/api/3/user/search/query',
×
377
            method: 'get',
×
378
            query: compact('query', 'startAt', 'maxResults'),
×
379
            success: 200,
×
380
            schema: Schema\PageBeanUser::class,
×
381
        );
×
382
    }
383

384
    /**
385
     * Finds users with a structured query and returns a "paginated" list of user keys
386
     * 
387
     * This operation takes the users in the range defined by `startAt` and `maxResults`, up to the thousandth user, and then returns only the users from that range that match the structured query.
388
     * This means the operation usually returns fewer users than specified in `maxResults`.
389
     * To get all the users who match the structured query, use "Get all users" and filter the records in your code
390
     * 
391
     * **"Permissions" required:** *Browse users and groups* "global permission"
392
     * 
393
     * The query statements are:
394
     * 
395
     *  - `is assignee of PROJ` Returns the users that are assignees of at least one issue in project *PROJ*
396
     *  - `is assignee of (PROJ-1, PROJ-2)` Returns users that are assignees on the issues *PROJ-1* or *PROJ-2*
397
     *  - `is reporter of (PROJ-1, PROJ-2)` Returns users that are reporters on the issues *PROJ-1* or *PROJ-2*
398
     *  - `is watcher of (PROJ-1, PROJ-2)` Returns users that are watchers on the issues *PROJ-1* or *PROJ-2*
399
     *  - `is voter of (PROJ-1, PROJ-2)` Returns users that are voters on the issues *PROJ-1* or *PROJ-2*
400
     *  - `is commenter of (PROJ-1, PROJ-2)` Returns users that have posted a comment on the issues *PROJ-1* or *PROJ-2*
401
     *  - `is transitioner of (PROJ-1, PROJ-2)` Returns users that have performed a transition on issues *PROJ-1* or *PROJ-2*
402
     *  - `[propertyKey].entity.property.path is "property value"` Returns users with the entity property value.
403
     * For example, if user property `location` is set to value `{"office": {"country": "AU", "city": "Sydney"}}`, then it's possible to use `[location].office.city is "Sydney"` to match the user
404
     * 
405
     * The list of issues can be extended as needed, as in *(PROJ-1, PROJ-2, ...
406
     * PROJ-n)*.
407
     * Statements can be combined using the `AND` and `OR` operators to form more complex queries.
408
     * For example:
409
     * 
410
     * `is assignee of PROJ AND [propertyKey].entity.property.path is "property value"`
411
     * 
412
     * @link https://confluence.atlassian.com/x/x4dKLg
413
     * 
414
     * @param string $query The search query.
415
     * @param int $startAt The index of the first item to return in a page of results (page offset).
416
     * @param int $maxResult The maximum number of items to return per page.
417
     */
418
    public function findUserKeysByQuery(
×
419
        string $query,
420
        ?int $startAt = 0,
421
        ?int $maxResult = 100,
422
    ): Schema\PageBeanUserKey {
423
        return $this->call(
×
424
            uri: '/rest/api/3/user/search/query/key',
×
425
            method: 'get',
×
426
            query: compact('query', 'startAt', 'maxResult'),
×
427
            success: 200,
×
428
            schema: Schema\PageBeanUserKey::class,
×
429
        );
×
430
    }
431

432
    /**
433
     * Returns a list of users who fulfill these criteria:
434
     * 
435
     *  - their user attributes match a search string
436
     *  - they have permission to browse issues
437
     * 
438
     * Use this resource to find users who can browse:
439
     * 
440
     *  - an issue, by providing the `issueKey`
441
     *  - any issue in a project, by providing the `projectKey`
442
     * 
443
     * This operation takes the users in the range defined by `startAt` and `maxResults`, up to the thousandth user, and then returns only the users from that range that match the search string and have permission to browse issues.
444
     * This means the operation usually returns fewer users than specified in `maxResults`.
445
     * To get all the users who match the search string and have permission to browse issues, use "Get all users" and filter the records in your code
446
     * 
447
     * Privacy controls are applied to the response based on the users' preferences.
448
     * This could mean, for example, that the user's email address is hidden.
449
     * See the "Profile visibility overview" for more details
450
     * 
451
     * This operation can be accessed anonymously
452
     * 
453
     * **"Permissions" required:** *Browse users and groups* "global permission".
454
     * Anonymous calls and calls by users without the required permission return empty search results.
455
     * 
456
     * @link https://developer.atlassian.com/cloud/jira/platform/profile-visibility/
457
     * @link https://confluence.atlassian.com/x/x4dKLg
458
     * 
459
     * @param string $query A query string that is matched against user attributes, such as `displayName` and `emailAddress`, to find relevant users.
460
     *                      The string can match the prefix of the attribute's value.
461
     *                      For example, *query=john* matches a user with a `displayName` of *John Smith* and a user with an `emailAddress` of *johnson@example.com*.
462
     *                      Required, unless `accountId` is specified.
463
     * @param string $username This parameter is no longer available.
464
     *                         See the "deprecation notice" for details.
465
     *                         @link https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide
466
     * @param string $accountId A query string that is matched exactly against user `accountId`.
467
     *                          Required, unless `query` is specified.
468
     * @param string $issueKey The issue key for the issue.
469
     *                         Required, unless `projectKey` is specified.
470
     * @param string $projectKey The project key for the project (case sensitive).
471
     *                           Required, unless `issueKey` is specified.
472
     * @param int $startAt The index of the first item to return in a page of results (page offset).
473
     * @param int $maxResults The maximum number of items to return per page.
474
     */
475
    public function findUsersWithBrowsePermission(
×
476
        ?string $query = null,
477
        ?string $username = null,
478
        ?string $accountId = null,
479
        ?string $issueKey = null,
480
        ?string $projectKey = null,
481
        ?int $startAt = 0,
482
        ?int $maxResults = 50,
483
    ): true {
484
        return $this->call(
×
485
            uri: '/rest/api/3/user/viewissue/search',
×
486
            method: 'get',
×
487
            query: compact('query', 'username', 'accountId', 'issueKey', 'projectKey', 'startAt', 'maxResults'),
×
488
            success: 200,
×
489
            schema: true,
×
490
        );
×
491
    }
492
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc