Feature #31864

Issue/TimeEntry API does not report root_id

Added by Adrian Fey over 3 years ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:REST API
Target version:-
Resolution:

Description

I would expect, that the Issues API exposes all fields, which I can find in the corresponding tables when accessing the database directly.

For my current project I am missing the root_id field, which I require to build a report which indents child issues.

Use case:
I want to make a report about all Tickets, that have been worked on during a time period.
Currently my approach would be:
  1. Get all TimeEntrys with Spent_on in my timeframe
  2. Get all Issues for those TimeEntrys
  3. Truncate all Issues where issue_id <> root_id (can't be done currently, because information is not provided via API)
  4. For all the root issues then again grab all children and build a tree

This by far isn't ideal request count wise, but everything else would require to have the root_issue_id information also on TimeEntrys.

If TimeEntrys would also provide root_id of the issue, then I could simply:
  1. Get all TimeEntrys with Spent_on between my timeframe
  2. Concat all root_ids to a comma separated string and retrieve all root issues in one request
  3. recursively grab the children, if existing, and build the tree

An even better approach might be to extend the Api for Issues to Include TimeEntrys and vice versa.
That way one would be very flexible in making reports, which depend on time_spent during periods.

Also available in: Atom PDF