turbot / steampipe-plugin-jira Goto Github PK
View Code? Open in Web Editor NEWUse SQL to instantly query Jira. Open source CLI. No DB required.
Home Page: https://hub.steampipe.io/plugins/turbot/jira
License: Apache License 2.0
Use SQL to instantly query Jira. Open source CLI. No DB required.
Home Page: https://hub.steampipe.io/plugins/turbot/jira
License: Apache License 2.0
Per my discussion with Cody on 10/26/2022, requesting added capability to authenticate to on-prem Jira instance with personal access token (PAT) as shown in https://github.com/andygrunwald/go-jira/blob/main/onpremise/examples/bearerauth/main.go#L15-L18
Describe the bug
When using CSV output some of the rows appear to be truncated.
❯ steampipe query
Welcome to Steampipe v0.18.6
For more information, type .help
> .output csv
select key,
epic_key,
substring(summary,1,30) "summary",
assignee_display_name,
components,
labels,
priority,
created,
reporter_display_name,
status
from jira_issue
where project_key = 'PKEY'
and status <> 'Done'
and reporter_display_name in ('Reporter 1','Reporter 2')
order by priority desc, length(title), title asc;
An example of the problem returned rows (as displayed) are...
08T12:35:21+01:00,Reporter 1,Backlog
07-04T14:55:21+01:00,Reporter 1,Backlog
14:40:21Z,Reporter 1,Backlog
,"[""16805"",""16725""]","[""Label 1"",""Label 2"",""Label 3"",""Label 4""]",High,2022-12-16T12:49:54Z,Reporter 1,Backlog
This appears to be mostly on the created
column but there are other occurrences that are on assignee_display_name
column.
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
As above.
Expected behavior
Complete rows with all queried column data returned.
Additional context
None.
Is your feature request related to a problem? Please describe.
I want to be able to know what the resolution date of an issue is to help calculate cycle time, when a bug was closed, etc
Describe the solution you'd like
To have the "resolved" field exposed
Describe alternatives you've considered
Currently using "updated" field. However updated is different from "resolved", as an update could mean changing of description, adding of labels, etc which is different from resolution date
Additional context
Information on the JQL field here
do not use the Get all workflows deprecated api call
Describe the bug
select * from jira_board
only returns the first page of boards I have access to.
If I use the REST API directly, i see these values
{
"maxResults": 50,
"startAt": 0,
"total": 168,
"isLast": false,
"values": [
...
I've confirmed that i'm able to use the startAt
parameter to see all 168 boards using the REST API from the command line. The subsequent pages just aren't being fetched by the plugin, it only sees the first page of 50 results.
Steampipe version (steampipe -v
)
Steampipe v0.23.2
Plugin version (steampipe plugin list
)
0.14.0
To reproduce
select count()* from jira_board
Expected behavior
The query should return the full number of boards I have access to, instead of just the first 50.
Additional context
Describe the bug
When querying issues, no filter is passed to the API and all issues are requested from the JIRA API.
With a large number of issues, this can take a very long time, and maybe never succeed.
I had to add traces to the plugin to understand what was going on:
2022-02-23 16:09:43.334 UTC [DEBUG] steampipe-plugin-jira.plugin: [DEBUG] Steampipe API Request Details:
2022-02-23 16:09:43.334 UTC [DEBUG] steampipe-plugin-jira.plugin: ---[ REQUEST ]---------------------------------------
2022-02-23 16:09:43.334 UTC [DEBUG] steampipe-plugin-jira.plugin: GET /rest/api/2/search?startAt=0&maxResults=1000&expand=names HTTP/1.1
2022-02-23 16:09:43.334 UTC [DEBUG] steampipe-plugin-jira.plugin: Host: mydomain.atlassian.net
2022-02-23 16:09:43.334 UTC [DEBUG] steampipe-plugin-jira.plugin: User-Agent: Go-http-client/1.1
2022-02-23 16:09:43.334 UTC [DEBUG] steampipe-plugin-jira.plugin: Content-Type: application/json
2022-02-23 16:09:43.334 UTC [DEBUG] steampipe-plugin-jira.plugin: Accept-Encoding: gzip
2022-02-23 16:09:43.334 UTC [DEBUG] steampipe-plugin-jira.plugin:
2022-02-23 16:09:43.334 UTC [DEBUG] steampipe-plugin-jira.plugin:
2022-02-23 16:09:43.334 UTC [DEBUG] steampipe-plugin-jira.plugin: -----------------------------------------------------
2022-02-23 16:09:47.480 UTC [DEBUG] steampipe-plugin-jira.plugin: [DEBUG] Steampipe API Response Details:
2022-02-23 16:09:47.480 UTC [DEBUG] steampipe-plugin-jira.plugin: ---[ RESPONSE ]--------------------------------------
2022-02-23 16:09:47.480 UTC [DEBUG] steampipe-plugin-jira.plugin: HTTP/2.0 200 OK
2022-02-23 16:09:47.480 UTC [DEBUG] steampipe-plugin-jira.plugin: Atl-Traceid: ******
2022-02-23 16:09:47.480 UTC [DEBUG] steampipe-plugin-jira.plugin: Cache-Control: no-cache, no-store, no-transform
2022-02-23 16:09:47.480 UTC [DEBUG] steampipe-plugin-jira.plugin: Content-Type: application/json;charset=UTF-8
2022-02-23 16:09:47.480 UTC [DEBUG] steampipe-plugin-jira.plugin: Date: Wed, 23 Feb 2022 16:09:46 GMT
2022-02-23 16:09:47.480 UTC [DEBUG] steampipe-plugin-jira.plugin: Expect-Ct: report-uri="https://web-security-reports.services.atlassian.com/expect-ct-report/global-proxy", enforce, max-age=86400
2022-02-23 16:09:47.480 UTC [DEBUG] steampipe-plugin-jira.plugin: Server: AtlassianProxy/1.19.3.1
2022-02-23 16:09:47.480 UTC [DEBUG] steampipe-plugin-jira.plugin: Set-Cookie: atlassian.xsrf.token=******; path=/; SameSite=None; Secure
2022-02-23 16:09:47.480 UTC [DEBUG] steampipe-plugin-jira.plugin: Strict-Transport-Security: max-age=315360000; includeSubDomains; preload
2022-02-23 16:09:47.480 UTC [DEBUG] steampipe-plugin-jira.plugin: Timing-Allow-Origin: *
2022-02-23 16:09:47.480 UTC [DEBUG] steampipe-plugin-jira.plugin: Vary: Accept-Encoding
2022-02-23 16:09:47.480 UTC [DEBUG] steampipe-plugin-jira.plugin: X-Aaccountid: ******
2022-02-23 16:09:47.480 UTC [DEBUG] steampipe-plugin-jira.plugin: X-Arequestid: ******
2022-02-23 16:09:47.480 UTC [DEBUG] steampipe-plugin-jira.plugin: X-Content-Type-Options: nosniff
2022-02-23 16:09:47.480 UTC [DEBUG] steampipe-plugin-jira.plugin: X-Envoy-Upstream-Service-Time: 2753
2022-02-23 16:09:47.480 UTC [DEBUG] steampipe-plugin-jira.plugin: X-Xss-Protection: 1; mode=block
2022-02-23 16:09:47.480 UTC [DEBUG] steampipe-plugin-jira.plugin:
2022-02-23 16:09:47.480 UTC [DEBUG] steampipe-plugin-jira.plugin: {
2022-02-23 16:09:47.480 UTC [DEBUG] steampipe-plugin-jira.plugin: "expand": "schema,names",
2022-02-23 16:09:47.480 UTC [DEBUG] steampipe-plugin-jira.plugin: "startAt": 0,
2022-02-23 16:09:47.480 UTC [DEBUG] steampipe-plugin-jira.plugin: "maxResults": 100,
2022-02-23 16:09:47.480 UTC [DEBUG] steampipe-plugin-jira.plugin: "total": 505555,
2022-02-23 16:09:47.480 UTC [DEBUG] steampipe-plugin-jira.plugin: "issues": [
2022-02-23 16:09:47.480 UTC [DEBUG] steampipe-plugin-jira.plugin: {
...
Steampipe version (steampipe -v
)
v0.12.2
Plugin version (steampipe plugin list
)
v0.1.0
To reproduce
steampipe query "select id, key from jira_issue where key = 'MYPROJECT-42';"
Relevant code is https://github.com/turbot/steampipe-plugin-jira/blob/v0.1.0/jira/table_jira_issue.go#L221-L225
Expected behavior
A filter should be added to the JIRA API request to avoid retrieving all issues.
Additional context
N/A
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.
Is your feature request related to a problem? Please describe.
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-user-properties/#api-group-user-properties
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Describe the bug
https://hub.steampipe.io/plugins/turbot/jira, the example query starting with >
hence breaking to execute copied of content
> select
display_name,
account_type as type,
active as status,
account_id
from
jira_user;
Steampipe version (steampipe -v
)
Example: v0.3.0
Plugin version (steampipe plugin list
)
Example: v0.5.0
To reproduce
Steps to reproduce the behavior (please include relevant code and/or commands).
Expected behavior
A clear and concise description of what you expected to happen.
Additional context
Add any other context about the problem here.
References
Confluence comes default service part of JIRA, providing some management query around it will be helpful.
Describe the bug
If an issue has no sprints, the sprint information from the SDK comes back as a string instead of map of strings
Steampipe version (steampipe -v
)
v0.20.9
Plugin version (steampipe plugin list
)
v0.10.1
To reproduce
See above
Expected behavior
Sprint IDs should return null instead of erroring
Additional context
Add any other context about the problem here.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
https://developer.atlassian.com/cloud/jira/software/rest/api-group-backlog/#api-group-backlog
Describe the bug
select * from jira_user
doesn't display all records and returns an inconsistent number of records every time it is run (even without clearing the cache)
Additional information
select count(*) from jira.jira_user
does display the correct number of usersorder by
causes a 429 error every time. Example:select * from jira.jira_user order by display_name
Error: table 'jira_user' column 'group_names' requires hydrate data from getUserGroups, which failed with error 429 Too Many Requests: local_rate_limited: request failed. Please analyze the request body for more details. Status code: 429.
MaxConcurrency
seems to fix the issue. I reduced it from 50 to 5 and consistently get all records.Steampipe version (steampipe -v
)
Example: v0.16.4
Plugin version (steampipe plugin list
)
Example: v0.6.1
Describe the bug
Whenever I run a query against ira_backlog_issue, I get the error message
Warning: executeQueries: query 1 of 1 failed: ERROR: rpc error: code = Unknown desc = request failed. Please analyze the request body for more details. Status code: 400 (SQLSTATE HV000)
I cannot find any information from the underlying go-jira lib request object despite setting STEAMPIPE_LOG_LEVEL to trace.
The equivalent curl command works from the CLI
curl --request GET --user email:token --url "https://domain.atlassian.net/rest/agile/1.0/board/70/backlog?startAt=140&maxResults=1&expand=names" --header "Accept: application/json"
Steampipe version (steampipe -v
)
v0.15.1
Plugin version (steampipe plugin list
)
v0.5.0
To reproduce
I had some help from the Slack group but I don't see why the default queries would fail for me.
I have noticed 400 or 403 status codes with the following tables
jira_backlog_issue: 400
jira_advanced_setting: 403
jira_group: 403
jira_project_role: 403
jira_sprint: 400
jira_workflow: 403
Expected behavior
I would expect to run the default queries against my Atlassian domain using my username and token.
Additional context
The underying library's message about checking the request body is frustrating if there is nothing to check
Hi all,
References
It would be useful to have access to the following Jira Tables:
HTH! Thanks!
References
Add any related links that will help us understand the resource, including vendor documentation, related GitHub issues, and Go SDK documentation.
References
Add any related links that will help us understand the resource, including vendor documentation, related GitHub issues, and Go SDK documentation.
Describe the bug
When running SELECT * from jira.jira_user WHERE active = true, I get 2 users. There should be like 115.
As additional context:
When I query the table, it only contains about 50 entries. A quick eyeball of the entries indicates that the only 2 that have "active" set to true are the same two that showed up when I ran the above query
My assumption:
Jira uses a paged list
Each of those jira_user tables is a different page in the list
When I run the SQL query, it only queries the first page in the list
Now my question: what can be done about it?
Steampipe version (steampipe -v
)
Example: v0.13.6
Plugin version (steampipe plugin list
)
Example: v0.0.2
To reproduce
Steps to reproduce the behavior (please include relevant code and/or commands).
Expected behavior
A clear and concise description of what you expected to happen.
Additional context
Add any other context about the problem here.
Describe the bug
To add the connection configuration using env variables is not available as in other plugins, the documentation only defines through the jira.spc
. Environment variables should be an option.
Steampipe version (steampipe -v
)
v0.17.4
Plugin version (steampipe plugin list
)
v0.8.0
To reproduce
The documentation is not defining the env variables available to be exported, also, there is no reference in the code docs.
Expected behavior
Passing the configuration (base_url, username and password) using env variables should be an option like in other plugins like AWS, Azure, GCP, Github, etc.
Describe the bug
When I do this query:
select * from jira_issue where status='Open' limit 10
it works.
But when I do:
select * from jira_issue where status='open' limit 10
it returns 0 results.
The lower case open
should still return the same results as JIRA JQL is case insensitive. I tried it by calling
the rest/api/2/search
JIRA api directly and it works as expected, but not via steampipe.
Steampipe version (steampipe -v
)
v0.20.9
Plugin version (steampipe plugin list
)
v0.10.1
To reproduce
Do a lower case search on any JIRA field:
select * from jira_issue where status='open' limit 10
for example, to see 0 results.
Expected behavior
The above query should return results including open tickets.
References
Add any related links that will help us understand the resource, including vendor documentation, related GitHub issues, and Go SDK documentation.
References
if its possible to query the user profile settings, to confirm whether the users are enabled with 2 factor authentication or not.
https://id.atlassian.com/manage-profile/security
Maybe we can have separate tables for advanced settings and global settings.
Describe the bug
If I attempt to execute a query against "jira_issue" using the "epic_key" in my "where clause" it does not yield any results. However, if I first query against jira_issue using "key" and then try by "epic_key" it works as expected.
Caveat: I am using a forked plugin, because I am going against an enterprise installation and needed to change the api endpoint path to version "rest/api/2/" and not "rest/api/3/". I assume this works against Jira cloud but scratching my head as to why I need to issue a preemptive query to get it working as expected. I realize this is not the version that was tested on for the original plugin, and perhaps that's my tough luck, but just trying to understand the behavior, because the API is still very similar and works in many cases OOTB.
Steampipe version (steampipe -v
)
Example: v0.16.4
Plugin version (steampipe plugin list
)
v0.6.0 (forked to use rest/api/2/)
To reproduce
Login to CLI - steampipe query
Execute query:
select
i.id as issue_id,
i.status as issue_status,
i.created as issue_created,
i.creator_display_name,
i.assignee_display_name,
e.id as epic_id,
e.name as epic_name,
i.summary as issue_summary
from
ccoyjira.jira_epic as e,
ccoyjira.jira_issue as i
where
i.epic_key = e.key
and e.key = 'APIGOV-19479'
The above does not yield any results.
Quit the CLI - .quit
Login to CLI again - steampipe query
execute a different query first - select * from ccoyjira.jira_issue where key = 'APIGOV-22292'
re-execute the query from first login:
select
i.id as issue_id,
i.status as issue_status,
i.created as issue_created,
i.creator_display_name,
i.assignee_display_name,
e.id as epic_id,
e.name as epic_name,
i.summary as issue_summary
from
ccoyjira.jira_epic as e,
ccoyjira.jira_issue as i
where
i.epic_key = e.key
and e.key = 'APIGOV-19479'
Now, this yields the expected 48 rows.
Expected behavior
I'd expect it should work the first time without having to issue an initial query. I realize that this must work against Jira Cloud version 3, but I am struggling to understand why it sort of works with this forked version. I have the LOG LEVEL set to TRACE, but can't seem to determine meaningful discrepancies between the logs that explains why it doesn't work under 1 scenario but does in another.
Describe the bug
A clear and concise description of what the bug is.
Steampipe version (steampipe -v
)
Example: v0.13.6
Plugin version (steampipe plugin list
)
Example: v0.0.2
To reproduce
Steps to reproduce the behavior (please include relevant code and/or commands).
Expected behavior
A clear and concise description of what you expected to happen.
Additional context
Add any other context about the problem here.
Hi there,
Can you please add a data for "Issue Links" within the jira_issue table ?
The API is:
Kind Regards
-Alex
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.