How can I get the user information by JRJC lib as the username is being deprecated

Soraya Suphasaen April 25, 2019

As per the GDPR API Migration period will be end on 29 April 2019.

By 29 April 2019, we will remove personal data from the API that is used to identify users, such as username and userKey, and instead use the Atlassian account ID (accountId). 

Currently I'm using the JIRA Rest Java Client API library v.5.1.2-2bd0a62e that is the latest version on MVNRepository and I use the code below to get the user information.

Promise<User> promise = restClientPlus.getUserClient().getUser(username);

I also use the username to get issues and worklogs using the code below.

SearchResult searchResult = restClientPlus.getSearchClient().searchJql("(worklogAuthor = " + username +" ) "
+ "and (worklogDate >= "+startDate+" and worklogDate <= " + endDate + ")", 500, null, REQUIRED_ISSUE_FIELDS).claim();

It is almost the end of the migration period, I still cannot see the accountId in User object and I would like to use accountId instead of username but I don't know how to get its value by using JRJC lib.

My Questions are:

1. When will you release the new version of JRJC lib?

2. How can I get the accountId by using getUserClient().getUser()?

0 answers

Suggest an answer

Log in or Sign up to answer