https://github.com/veelenga/jira_report
:paperclip: Cli tool that prints jira activity report.
https://github.com/veelenga/jira_report
Last synced: 2 months ago
JSON representation
:paperclip: Cli tool that prints jira activity report.
- Host: GitHub
- URL: https://github.com/veelenga/jira_report
- Owner: veelenga
- License: mit
- Created: 2014-09-08T14:50:22.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-06-24T18:27:33.000Z (almost 10 years ago)
- Last Synced: 2025-03-07T18:46:59.955Z (3 months ago)
- Language: Ruby
- Homepage: http://veelenga.github.io/jira_report/
- Size: 816 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
#Jira Report [](https://rubygems.org/gems/jira_report) [](https://travis-ci.org/veelenga/jira_report)
Queries user activities from jira for specified period of time and prints it to console.
##Installation
```
$ gem install jira_report
```##Usage
Just run it. `jira-report` will ask your jira site address, who you are and what's your password:
```
$ jira-report
Jira site address: https://jira.company.com
Username for 'https://jira.company.com': admin
Password for 'https://jira.company.com':
Connecting to 'https://jira.company.com'. Pls wait...What was [admin] doing:
Created: 2
WFM-7180 - Provide static context for log property in BasicHashAnalyzer
TST-5862 - Unable to install Nginx on HP-UX with Java 6Resolved: 8
GSM-364 - Migration of existing scenario
WFM-5865 - NullPointerException while finding categories
TST-5864 - Some NGinx installation improvements
TST-5863 - NGinx minimal dependency
SDK-7139 - Move common interfaces and classes from into individual jar
SDK-7138 - Move common interfaces and classes from into individual dll
TST-7111 - Event.getDonotNotify doesn't indicate about agent's state
TST-6985 - TST classes should have static Log fieldsReopened: 0
Closed: 5
TST-6943 - Remove redundant org.apache.log4j dependency from common part
TST-5862 - Unable to install NGinx on HP-UX with Java 6
TST-5857 - Put back support for Jdk 1.6
TST-5840 - NGinx fails to handle interaction initiated
GSM-364 - Migration of existing units
````url`, `username`, `password` and some other parameters can be added to [configuration file](#configuration). Also you can use mixed approach (keep some options in file, others enter from command line). For example if you do not want to keep password in configuration file, just don't, you will be asked.
Also you can use it directly in ruby code:
```ruby
require 'jira_report'def print_issues(issues)
issues.each do |issue|
puts " #{issue['key']} - #{issue['fields']['summary']}"
end
endreporter = JiraReport::Reporter.new('jira.company.com', 'admin', 's3cr3t')
# returns all created issues by 'my_jira_name'
all_created = reporter.created('my_jira_name')# returns closed issues by 'admin' last week
weekly_closed = reporter.closed('admin', '-1w')# returns reopened issues by 'usr' in period starting
# from two weeks ago and ending one week ago.
reopened = reporter.reopened('usr', '-2w', '-1w')print_issues(weekly_closed)
```##Configuration
Path to configuration file can be specified by `-c` command line argument. `~/.jira-report` is default.There are three main options in config file to query jira:
```
url=jira.company.com
username=username
password=s3cr3t
```You may pass all those options (or some of them) in command line mode.
Period is set by two options `period_from` and `period_till`. Both options support [advanced jira searching](https://confluence.atlassian.com/display/JIRA/Advanced+Searching) and accept dates, jira functions, aliasing. For example:
```
period_from=-1w
period_till=now()
```If those options not specified in configuration file, last week activities will be queried (just as in example above).
You can look at configuration file [sample](https://github.com/veelenga/jira_report/blob/master/example/jira-report.sample) in repository.