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

[jira] wrong calculated is_removed value in sprint_issues table #1938

Closed
narrowizard opened this issue May 19, 2022 · 2 comments
Closed

[jira] wrong calculated is_removed value in sprint_issues table #1938

narrowizard opened this issue May 19, 2022 · 2 comments
Assignees
Labels
type/bug This issue is a bug

Comments

@narrowizard
Copy link
Collaborator

Describe the bug

Some data marked as is_removed in sprint_issues table is actually not removed from the sprint.

Expected behavior

Data in sprint_issues should represent the latest status of issue in sprint info.

Additional context

changelogs

postgres@172:lake> select "from", "to", created_date from changelogs where issue_id = 'jira:JiraIssue:1:18611' and field_name = 'Sprint';
+--------+-------+----------------------------+
| from   | to    | created_date               |
|--------+-------+----------------------------|
| 冲刺9  |       | 2022-04-01 14:09:21.886+08 |
|        | 冲刺9 | 2022-04-01 14:28:50.108+08 |
+--------+-------+----------------------------+

sprints

postgres@172:lake> select id, name, started_date, completed_date, status from sprints where id = 'jira:JiraSprint:1:144';
+-----------------------+--------+----------------------------+----------------------------+----------+
| id                    | name   | started_date               | completed_date             | status   |
|-----------------------+--------+----------------------------+----------------------------+----------|
| jira:JiraSprint:1:144 | 冲刺9  | 2022-04-06 13:41:58.762+08 | 2022-04-18 09:31:35.413+08 | CLOSED   |
+-----------------------+--------+----------------------------+----------------------------+----------+

issues

postgres@172:lake> select created_date, resolution_date, status from issues where id = 'jira:JiraIssue:1:18611';
+----------------------------+----------------------------+----------+
| created_date               | resolution_date            | status   |
|----------------------------+----------------------------+----------|
| 2022-04-01 13:53:20.963+08 | 2022-04-15 16:55:13.665+08 | DONE     |
+----------------------------+----------------------------+----------+

sprint_issues

postgres@172:lake> select is_removed, added_date, removed_date from sprint_issues where sprint_id = 'jira:JiraSprint:1:144' and issue_id = 'jira:JiraIssue:1:18611';
+--------------+----------------------------+----------------------------+
| is_removed   | added_date                 | removed_date               |
|--------------+----------------------------+----------------------------|
| True         | 2022-04-01 13:53:20.963+08 | 2022-04-01 14:09:21.886+08 |
+--------------+----------------------------+----------------------------+
@narrowizard narrowizard added the type/bug This issue is a bug label May 19, 2022
@fatelei
Copy link
Contributor

fatelei commented May 19, 2022

assign to me

fatelei added a commit to fatelei/incubator-devlake that referenced this issue May 20, 2022
@narrowizard
Copy link
Collaborator Author

narrowizard commented May 24, 2022

Another case is still failed

changelogs

postgres@172:lake> select "from", "to", created_date from changelogs where issue_id = 'jira:JiraIssue:1:18619' and field_name = 'Sprint' order by created_date asc;
+--------+-------+----------------------------+
| from   | to    | created_date               |
|--------+-------+----------------------------|
| 冲刺9  | 冲刺8 | 2022-04-01 14:29:57.127+08 |
| 冲刺8  |       | 2022-04-02 09:20:07.687+08 |
|        | 冲刺9 | 2022-04-02 09:20:12.147+08 |
+--------+-------+----------------------------+

sprints

postgres@172:lake> select id, name, started_date, completed_date, status from sprints where id = 'jira:JiraSprint:1:144';
+-----------------------+--------+----------------------------+----------------------------+----------+
| id                    | name   | started_date               | completed_date             | status   |
|-----------------------+--------+----------------------------+----------------------------+----------|
| jira:JiraSprint:1:144 | 冲刺9  | 2022-04-06 13:41:58.762+08 | 2022-04-18 09:31:35.413+08 | CLOSED   |
+-----------------------+--------+----------------------------+----------------------------+----------+

issues

postgres@172:lake> select created_date, resolution_date, status from issues where id = 'jira:JiraIssue:1:18619';
+----------------------------+----------------------------+----------+
| created_date               | resolution_date            | status   |
|----------------------------+----------------------------+----------|
| 2022-04-01 14:29:53.117+08 | 2022-04-18 09:16:03.494+08 | DONE     |
+----------------------------+----------------------------+----------+

sprint_issues

postgres@172:lake> select is_removed, added_date, removed_date from sprint_issues where sprint_id = 'jira:JiraSprint:1:144' and issue_id = 'jira:JiraIssue:1:18619';
+--------------+----------------------------+----------------------------+
| is_removed   | added_date                 | removed_date               |
|--------------+----------------------------+----------------------------|
| True         | 2022-04-01 14:29:53.117+08 | 2022-04-01 14:29:57.127+08 |
+--------------+----------------------------+----------------------------+

Clean removed_date if is_removed is false

Case fixed confirm info

postgres@172:lake> select is_removed, added_date, removed_date from sprint_issues where sprint_id = 'jira:JiraSprint:1:144' and issue_id = 'jira:JiraIssue:1:18611';
+--------------+----------------------------+----------------------------+
| is_removed   | added_date                 | removed_date               |
|--------------+----------------------------+----------------------------|
| False        | 2022-04-01 13:53:20.963+08 | 2022-04-01 14:09:21.886+08 |
+--------------+----------------------------+----------------------------+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug This issue is a bug
Projects
None yet
Development

No branches or pull requests

2 participants