Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Users' email also during fetching worklog results

Ankita Singh November 12, 2018

Hello,

Currently while fetching worklog details of all user for a certain time period I'm not getting user's email address.

 

How to get the same . Please suggest ASAP.

1 answer

1 accepted

0 votes
Answer accepted
AhmadDanial
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 12, 2018

Hello, Ankita.

I would like to understand a little better on how you fetched the worklog result you mentioned here. Can you please confirm if you are fetching the details from a third-party add-on (for example Worklogs - Time Reports for Jira) or rather a default feature in JIRA itself?

It will be great if you can provide more information (screen shot(s) for example) to this so I will be able to see if it is possible to achieve the requirement that you have. Thanks.

Ankita Singh November 13, 2018

Hello Ahmad,

Thanks for ur response. 

Currently what I'm doing is using 'https://api.tempo.io/2/worklogs/' for getting worklog results. There is no option of email in the response. Please see the response below :

The response of this API is :

  • issueKey: required (string)
  • timeSpentSeconds: required (number)
  • startDate: required (date-only)
  • startTime: required (time-only)
  • description: (string)
  • authorUsername: required (string)
  • attributes: (array of Work Attribute Value)

    Items: Work Attribute Value

    • key: required (string)
    • value: required (any)                                                                                           
AhmadDanial
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 13, 2018

Hello, Ankita.

You are most welcome. As I am unable to open the link you provided, can I confirm if you are using Tempo's Timesheets API to pull these information? Otherwise, can you provide us with the specific third-party addon you are using so we can properly tag this question for further assistance?

Ankita Singh November 13, 2018

Hello Ahmad,

I'm referring https://tempo-io.github.io/tempo-api-docs/#worklogs this documentation for getting the user worklog information (using API jira tempo api token for authentication purpose).  And while using this api I'm only getting username not their email address.

So I wanted to know is there any way to get the email address of the users through jira tempo api ?

Susanne Götz _Tempo_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 14, 2018

Hi Ankita,

When using the Tempo REST API to retrieve worklogs, it is not possible to include the email address of the worklog owner.

Users are created and stored within the JIRA database and information about them can be retreived with the JIRA REST call (GET /rest/api/3/user, see also https://developer.atlassian.com/cloud/jira/platform/rest/v3).

Regards,
Susanne Götz
Tempo team

Like Ankita Singh likes this
Ankita Singh November 14, 2018

Hello Susanne,

Get to work with this and get the required result. https://mydomain.atlassian.net/rest/api/2/user/search?startAt=0&maxResults=1000&username=% 

Thanks for your help.

Ankita Singh November 14, 2018

Hello Susanne,

Get to work with this https://mydomainname.atlassian.net/rest/api/2/user/search?startAt=0&maxResults=1000&username=% to get all users' emails.

Thanks for the help.

AhmadDanial
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 14, 2018

Hi, Ankita and Susanne.

Good job on this! Thanks for sharing the solution to the rest of the community. Kudos to you both! 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events