Learn R Programming

nJira

SQL like query interface for Jira in R language

This package provides a SQL like query interface to fetch data from any Jira installation. The data is fetched into R dataframe (using Jira REST API)

Key features:

  • Data is fetched using Jira REST API therefore can be used over web without needing to connect to any database.

  • Function to authenticate into Jira instance using jira.login()

  • Function to fetch METADATA from Jira instance using jira.metadata()

  • Function to QUERY jira data with SQL like syntax using jira.query()

Installation

To get the current development version from github:

# install.packages("devtools")
library(devtools)
devtools::install_github("nikhilchoudhry/nJira")

Getting Started

You should have an account in the Jira instance to query its data. You can use the same log-in credentials that you use on your Jira website.

Assuming your Jira credentials are as follows

Authenticate in Jira using the following command:

jira.login(jira.env = "https://issues.apache.org/jira", jira.user = "jiraTestUser", jira.pwd = "jiraTestPwd")

Fetch the Metadata of Jira using the following command:

jiraMetadata <- jira.metadata()

Query Jira tables and fields (lookup via metadata) using the following command:


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", fields = "id AS IssueId, toString AS Status, 
COUNT(fromString) AS Count", where = "id = 'HIVE-22692' AND field = 'status'", 
groupby = "id,toString")

Code of Conduct

Copy Link

Version

Install

install.packages('nJira')

Monthly Downloads

57

Version

0.1.1

License

MIT + file LICENSE

Maintainer

Nikhil Choudhry

Last Published

March 2nd, 2020

Functions in nJira (0.1.1)

rk.where

Process Where Clause
rk.metadata

Processing Meta Data
jira.metadata

Jira Tables and Field Details
rk.groupby

Process GroupBy Clause
rk.query

Data Processing Query
rk.fields

Process Fields Clause
jira.query

Jira Query Interface
jira.login

Jira Login Function