jira.query: Jira Query Interface

Description Usage Arguments Details Value Examples

View source: R/njira.r

Description

Query Jira using SQL like query syntax. The query response from Jira REST API is returned as a dataframe.

Usage

1
jira.query(table, fields = NULL, where = NULL, groupby = NULL)

Arguments

table

Name of Jira table from which data will be fetched.

fields

Comma separated names of the fields from the specified table whose values will be fetched.

where

specifies the where clause of the query. You can also pass your Jira JQL as-is in the where clause.

groupby

specifies the list of fields on which the data is grouped.

Details

For querying Jira 'history' table, the where clause must specify issue 'id'
Example : where = "id = 'HIVE-22692'"

Value

Data frame of results returned by the Jira query.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
issues <- jira.query(table = "issues", fields = "id AS IssueId, Created, Status, Priority", 
where = "project = 'HIVE' AND created >= '2019-01-01' AND created <= '2019-12-31' AND 
Status IN ('Open', 'Closed', 'Resolved')")

issues <- jira.query(table = "issues", fields = "id AS IssueId, Created", 
where = "'cf[10021]' = 'ABCD' AND Created > '2019-01-01'")

history <- jira.query(table = "history", where = "id = 'HIVE-22692'")

history <- jira.query(table = "history", fields = "id AS IssueId, toString AS Status, 
COUNT(fromString) AS Count", where = "id = 'HIVE-22692' AND field = 'status'", 
groupby = "id,toString")

nikhilchoudhry/nJira documentation built on March 7, 2020, 12:48 a.m.