API Reference required to get the worklogs of all the users under master/admin account with details

Rashi Goyal September 24, 2020

Hi All,

I want to generate the report using core PHP for all users under the master account having less than 8 hours logged. But on Google, I am unable to find the exact API for this requirement.

Can you please share the reference for the same? I need this on an urgent basis.

I have gone through the API document already but there is no API matching my requirements.

Details required:

  1. Full Name
  2. Jira User Name
  3. Email ID
  4. Project Manager
  5. Skill Set

Note: I need all user's work-log under the master account, not for the single user. Please answer asap using CURL or any  other solution . I am creating this in core php

Regards,

Rashi

1 answer

0 votes
Michael Raj September 28, 2020

Hi @Rashi Goyal ,

I have such solution in VBA and I'm doing it in a few steps. Maybe you can try something similar:

1. collect list of issues with specified worklogDate (code below)

2. list contains only basic info about issue and its worklogs (up to 20)

3. if there are issues with more than 20 worklogs macro goes one by one and collect all the worklogs

4. Jira returns issues with all worklogs so I need to cut them only to one date

 

Main API request looks like this (maxResults=0 gives me information on issues volume):

rest/api/2/search?jql=worklogDate%20%3D%202020-07-22%20&fields=issuetype,worklog&startAt=0&maxResults=0

 

This could work for you as there is no limitation to specified user.

Other details you require you have to collect from issue's details.

Good luck!

Michael

Rashi Goyal September 29, 2020

Hi @Michael Raj ,

Thanks for the answer.

Can you please check my below-given code? WorklogDate filter is not working, rest everything is working fine. 

$url = "https://netsmartz.atlassian.net/rest/api/2/search";

$r = '{
"jql": "project = NFLTV AND worklogDate=2020-09-29",
"maxResults": 1,
"fields": [
"summary",
"status",
"assignee",
"worklog"
]
}';

$this->curl_method($url, $r);
die('------');

Please suggest the solution for the same. I am using POST for this.

Just let me know where I am going wrong. I just want my worklogDate filter to work. Please suggest the solution asap for this.

 

Thanks in advance 

Rashi

Michael Raj September 29, 2020

Hi @Rashi Goyal ,

First of all, in Jira Service Desk try to search with JQL using "worklogDate" option. Is that search valid? When it's correct in JSD, it will work in API.

I'm using GET method.

 

Untitled.png

 

Best,

Michael

Rashi Goyal October 1, 2020

@Michael Raj thanks 

The last link shared by you was asked by me only.

I got the solution.

  

Suggest an answer

Log in or Sign up to answer