turbot / steampipe-plugin-jira

Use SQL to instantly query Jira. Open source CLI. No DB required.
https://hub.steampipe.io/plugins/turbot/jira
Apache License 2.0
22 stars 14 forks source link

Strange result sets using epic_key in jira_issue table #75

Closed johngarner-dwp closed 1 year ago

johngarner-dwp commented 1 year ago

Describe the bug When querying key and epic_key using project_key column key the epic_key returns NULL.

select key, 
epic_key, 
project_key 
from jira_issue 
where project_key = 'BDT' LIMIT 10;

Result set

+----------+----------+-------------+
| key      | epic_key | project_key |
+----------+----------+-------------+
| BDT-4357 | <null>   | BDT         |
| BDT-4360 | <null>   | BDT         |
| BDT-4361 | <null>   | BDT         |
| BDT-4362 | <null>   | BDT         |
| BDT-4364 | <null>   | BDT         |
| BDT-4365 | <null>   | BDT         |
| BDT-4363 | <null>   | BDT         |
| BDT-4366 | <null>   | BDT         |
| BDT-4358 | <null>   | BDT         |
| BDT-4359 | <null>   | BDT         |
+----------+----------+-------------+

When querying key and epic_key using specific keys (as returned above) the epic_key is returned.

select key,
epic_key,
project_key
from jira_issue 
where key in ('BDT-4366',
'BDT-4357',
'BDT-4365',
'BDT-4363',
'BDT-4364',
'BDT-4360',
'BDT-4361',
'BDT-4359',
'BDT-4362',
'BDT-4358');

Result set

+----------+----------+-------------+
| key      | epic_key | project_key |
+----------+----------+-------------+
| BDT-4358 | BDT-2717 | BDT         |
| BDT-4365 | BDT-4364 | BDT         |
| BDT-4366 | BDT-4364 | BDT         |
| BDT-4364 | <null>   | BDT         |
| BDT-4363 | BDT-4362 | BDT         |
| BDT-4359 | BDT-4177 | BDT         |
| BDT-4357 | BDT-4177 | BDT         |
| BDT-4361 | BDT-4177 | BDT         |
| BDT-4360 | BDT-3654 | BDT         |
| BDT-4362 | <null>   | BDT         |
+----------+----------+-------------+

When query again later (in cli or from command line), the results are what they are expected to be for the first query.

+----------+----------+-------------+
| key      | epic_key | project_key |
+----------+----------+-------------+
| BDT-4357 | BDT-4177 | BDT         |
| BDT-4360 | BDT-3654 | BDT         |
| BDT-4361 | BDT-4177 | BDT         |
| BDT-4362 | <null>   | BDT         |
| BDT-4364 | <null>   | BDT         |
| BDT-4365 | BDT-4364 | BDT         |
| BDT-4363 | BDT-4362 | BDT         |
| BDT-4366 | BDT-4364 | BDT         |
| BDT-4358 | BDT-2717 | BDT         |
| BDT-4359 | BDT-4177 | BDT         |
+----------+----------+-------------+

Steampipe version (steampipe -v)

❯ steampipe -v
Steampipe v0.18.6

Plugin version (steampipe plugin list)

❯ steampipe plugin list
+----------------------------------------------------+---------+-------------+
| Installed Plugin                                   | Version | Connections |
+----------------------------------------------------+---------+-------------+
| hub.steampipe.io/plugins/theapsgroup/gitlab@latest | 0.2.2   | gitlab      |
| hub.steampipe.io/plugins/turbot/aws@latest         | 0.94.0  | aws         |
| hub.steampipe.io/plugins/turbot/jira@latest        | 0.8.0   | jira        |
| hub.steampipe.io/plugins/turbot/steampipe@latest   | 0.6.0   | steampipe   |
+----------------------------------------------------+---------+-------------+

To reproduce See above.

Expected behavior The first query should not return null.

johngarner-dwp commented 1 year ago

This appears to be similar behaviour to issue 67.

misraved commented 1 year ago

Thanks @johngarner-dwp for raising this issue with a good set of query results 👍. Apologies for the delayed response, we are looking to start working on this issue shortly, will add the observations in this thread 👍.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.