I'm using jira rest client api 5.1.0, but due to GDPR change I have a problem with search user.
What is substitution for this:
Promise<Iterable<User>> findUsers(String username, @Nullable Integer startAt, @Nullable Integer maxResults,
@Nullable Boolean includeActive, @Nullable Boolean includeInactive);
GET path/search?searchTerm=mar
Response:
{ "statusCode": "ERROR",
"message": "java.util.concurrent.ExecutionException: com.google.api.client.http.HttpResponseException: 400\n{\"errorMessages\":[\"The query parameter 'username' is not supported in GDPR strict mode.\"],\"errors\":{}
}"
How can I search for users now to fill assignee field?
Even "lastname" and "firstname" are removed from the search in this "strict mode" (and the deprecation notice does not mention them, only the username).
We need this search to work: how can we disable the strict mode?
Hello Claudio,
I believe it is not possible to disable the Strict mode once the GDPR is implemented. This is a security policy required in Jira application, where the accountId is the unique user identifier.
You can check in my last answer how you can get the AccountId of the users by its username.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As it turned out, it's just a matter of using the `query` parameter with the `/search` path and we are back in business. Just avoid using `username`.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you please give some example of using 'query' parameter to search user?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
https://yourcompany.atlassian.net/rest/api/3/user/search?query=someone@somewhere.com
(we can easily add the "somewhere.com" address in our case, not sure about you).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Claudio Cicali, thank you for the answer. May I ask you which method from rest client api you are using behind this endpoint ?
I'm using this one, and it is affected with gdpr change:
Promise<Iterable<User>> findUsers(String username, @Nullable Integer startAt, @Nullable Integer maxResults,
@Nullable Boolean includeActive, @Nullable Boolean includeInactive);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Mia Simundic hey, we are not using the client but just an HTTP client call; I can't help you with that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Team Nautilus
Thank you for reaching out.
As you can see in this deprecation notice, Jira REST API has started to use the AccountId parameter as the unique identifier instead of 'Username' and 'userKey'. Can you please check if the AccountId parameter works for you?
If you are not being able to return any information with that parameter, please ask for help is in the Atlassian Developer Community:
https://community.developer.atlassian.com/
The mentioned portal was specifically created for development questions, where you will find articles and suggestions from other third-party partners and Atlassian developers. Feel free to open a new topic about your question there if my answer was not helpful.
Let us know if you have any other questions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok. tnank you.
What will be with Jira assignee and reporter fields?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Mia Simundic
As you can see in the deprecation notice provided above, the Assignee and reporter fields will also use the AccountId (id) instead of name.
Let us know if you see any different behavior when running your REST API.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If I am jira user, and I want to add assignee to the ticket, what can I write in assignee field - accountId? If username is depricated, how can jira user add assignee or reporter?
If it is not possible to search users by usernames, but it is possible by accountId, end user of jira doesn't know accountId of jira whom he wants to add assignee.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Team Nautilus
If you don't know the accountId of your users, you can simply search by their usernames using the REST API below and the AccountId will be returned to you:
If you want to run it directly in your browser, you can run the URL below, replacing "yourdomain" and "yourusername" with the domain of your site and the usernames of the users you want to know its accountId, respectively:
https://yourdomain.atlassian.net/rest/api/3/user/bulk/migration?username=yourusername
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.