Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add table jira_issue_worklog Closes #89 #104

Merged
merged 13 commits into from
Nov 15, 2023
Merged

Conversation

ParthaI
Copy link
Contributor

@ParthaI ParthaI commented Nov 10, 2023

Example query results

Results
> select distinct
  w.issue_id,
  w.id,
  w.time_spent,
  w.updated as worklog_updated_at,
  i.duedate,
  i.priority,
  i.project_name,
  i.key
from
  jira_issue_worklog as w,
  jira_issue as i
where
  i.id = trim(w.issue_id)
and
  w.updated >= now() - interval '1' day;
+----------+-------+------------+---------------------------+---------+----------+----------------------+--------+
| issue_id | id    | time_spent | worklog_updated_at        | duedate | priority | project_name         | key    |
+----------+-------+------------+---------------------------+---------+----------+----------------------+--------+
| 10006    | 10003 | 8m         | 2023-11-10T11:41:34+05:30 | <null>  | Medium   | Demo service project | DESK-7 |
| 10006    | 10004 | 13m        | 2023-11-10T11:41:44+05:30 | <null>  | Medium   | Demo service project | DESK-7 |
| 10008    | 10000 | 3h 20m     | 2023-11-09T22:15:40+05:30 | <null>  | Medium   | testing              | TES-2  |
| 10008    | 10001 | 16m        | 2023-11-09T22:16:46+05:30 | <null>  | Medium   | testing              | TES-2  |
| 10008    | 10002 | 8m         | 2023-11-09T22:17:37+05:30 | <null>  | Medium   | testing              | TES-2  |
+----------+-------+------------+---------------------------+---------+----------+----------------------+--------+

> SELECT
  issue_id,
  SUM(time_spent_seconds) AS total_time_spent_seconds
FROM
  jira_issue_worklog
GROUP BY
  issue_id;
+----------+--------------------------+
| issue_id | total_time_spent_seconds |
+----------+--------------------------+
| 10006    | 1260                     |
| 10008    | 13440                    |
+----------+--------------------------+

Copy link
Contributor

@madhushreeray30 madhushreeray30 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@prithage Please have a look at the comments, thanks!

docs/tables/jira_issue_worklog.md Outdated Show resolved Hide resolved
docs/tables/jira_issue_worklog.md Outdated Show resolved Hide resolved
jira/table_jira_issue_worklog.go Outdated Show resolved Hide resolved
jira/table_jira_issue_worklog.go Outdated Show resolved Hide resolved
jira/table_jira_issue_worklog.go Outdated Show resolved Hide resolved
@madhushreeray30 madhushreeray30 merged commit cf576ae into main Nov 15, 2023
1 check passed
@madhushreeray30 madhushreeray30 deleted the add-jira-issue-worklog branch November 15, 2023 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants