issues
search
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
Added an example queries to the table jira_issue table to fetch linked issue details
#124
Closed
ParthaI
closed
6 months ago
ParthaI
commented
6 months ago
Example query results
Results
``` > select ji.id, ji.title, ji.project_key, ji.status, il.issue_link_id, il.issue_link_self, il.issue_link_type_name, il.inward_issue_id, il.inward_issue_key, il.inward_issue_status_name, il.inward_issue_summary, il.inward_issue_priority_name from jira_issue ji, lateral jsonb_array_elements(ji.fields -> 'issuelinks') as il_data, lateral ( select il_data ->> 'id' as issue_link_id, il_data ->> 'self' as issue_link_self, il_data -> 'type' ->> 'name' as issue_link_type_name, il_data -> 'inwardIssue' ->> 'id' as inward_issue_id, il_data -> 'inwardIssue' ->> 'key' as inward_issue_key, il_data -> 'inwardIssue' -> 'fields' -> 'status' ->> 'name' as inward_issue_status_name, il_data -> 'inwardIssue' -> 'fields' ->> 'summary' as inward_issue_summary, il_data -> 'inwardIssue' -> 'fields' -> 'priority' ->> 'name' as inward_issue_priority_name ) as il +-------+---------+-------------+--------+---------------+----------------------------------------------------------------+----------------------+-----------------+------------------+--------------------------+----------------------+----------------------------+ | id | title | project_key | status | issue_link_id | issue_link_self | issue_link_type_name | inward_issue_id | inward_issue_key | inward_issue_status_name | inward_issue_summary | inward_issue_priority_name | +-------+---------+-------------+--------+---------------+----------------------------------------------------------------+----------------------+-----------------+------------------+--------------------------+----------------------+----------------------------+ | 10049 | TEST6-9 | TEST6 | Open | 10013 | https://turbot-turbot.atlassian.net/rest/api/2/issueLink/10013 | Blocks | 10041 | TEST6-3 | Open | test | Medium | | 10041 | TEST6-3 | TEST6 | Open | 10013 | https://turbot-turbot.atlassian.net/rest/api/2/issueLink/10013 | Blocks |
|
|
|
|
| +-------+---------+-------------+--------+---------------+----------------------------------------------------------------+----------------------+-----------------+------------------+--------------------------+----------------------+----------------------------+ ```
Example query results
Results
``` > select ji.id, ji.title, ji.project_key, ji.status, il.issue_link_id, il.issue_link_self, il.issue_link_type_name, il.inward_issue_id, il.inward_issue_key, il.inward_issue_status_name, il.inward_issue_summary, il.inward_issue_priority_name from jira_issue ji, lateral jsonb_array_elements(ji.fields -> 'issuelinks') as il_data, lateral ( select il_data ->> 'id' as issue_link_id, il_data ->> 'self' as issue_link_self, il_data -> 'type' ->> 'name' as issue_link_type_name, il_data -> 'inwardIssue' ->> 'id' as inward_issue_id, il_data -> 'inwardIssue' ->> 'key' as inward_issue_key, il_data -> 'inwardIssue' -> 'fields' -> 'status' ->> 'name' as inward_issue_status_name, il_data -> 'inwardIssue' -> 'fields' ->> 'summary' as inward_issue_summary, il_data -> 'inwardIssue' -> 'fields' -> 'priority' ->> 'name' as inward_issue_priority_name ) as il +-------+---------+-------------+--------+---------------+----------------------------------------------------------------+----------------------+-----------------+------------------+--------------------------+----------------------+----------------------------+ | id | title | project_key | status | issue_link_id | issue_link_self | issue_link_type_name | inward_issue_id | inward_issue_key | inward_issue_status_name | inward_issue_summary | inward_issue_priority_name | +-------+---------+-------------+--------+---------------+----------------------------------------------------------------+----------------------+-----------------+------------------+--------------------------+----------------------+----------------------------+ | 10049 | TEST6-9 | TEST6 | Open | 10013 | https://turbot-turbot.atlassian.net/rest/api/2/issueLink/10013 | Blocks | 10041 | TEST6-3 | Open | test | Medium | | 10041 | TEST6-3 | TEST6 | Open | 10013 | https://turbot-turbot.atlassian.net/rest/api/2/issueLink/10013 | Blocks |