Skip to content

Commit

Permalink
Merge branch 'release/1.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
arBmind committed Feb 26, 2019
2 parents f5cc93b + 19c4cb5 commit ff3cf36
Show file tree
Hide file tree
Showing 72 changed files with 1,124 additions and 448 deletions.
10 changes: 10 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
* text=auto
*.rb text eol=lf
*.sh text eol=lf
*.yml text eol=lf
*.slim text eol=lf
*.coffee text eol=lf
*.scss text eol=lf
*.rake text eol=lf
*.json text eol=lf
Gemfile text eol=lf
5 changes: 5 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Metrics/LineLength:
Max: 120

Style:
Enabled: false
59 changes: 46 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,62 @@ cache:
- workspace/redmine/vendor/bundle

rvm:
- 2.0.0
- 2.1.10
- 2.2.7
- 2.3.4

env:
global:
- PLUGIN=redmine_hourglass
- REDMINE=test_redmine
- PLUGIN=redmine_hourglass
- REDMINE=test_redmine
- TRACE=--trace

matrix:
include:
- name: Ruby 2.0 / Redmine 3.2
rvm: 2.0.0
env: REDMINE_VERSION=3.2.9
- name: Ruby 2.0 / Redmine 3.3
rvm: 2.0.0
env: REDMINE_VERSION=3.3.9

- name: Ruby 2.1 / Redmine 3.3
rvm: 2.1.10
env: REDMINE_VERSION=3.3.9
- name: Ruby 2.1 / Redmine 3.4
rvm: 2.1.10
env: REDMINE_VERSION=3.4.9

- name: Ruby 2.2 / Redmine 3.3
rvm: 2.2.10
env: REDMINE_VERSION=3.3.9
- name: Ruby 2.2 / Redmine 3.4
rvm: 2.2.10
env: REDMINE_VERSION=3.4.9

- name: Ruby 2.3 / Redmine 3.4.1
rvm: 2.3.8
env: REDMINE_VERSION=3.4.1
- name: Ruby 2.3 / Redmine 3.4.9
rvm: 2.3.8
env: REDMINE_VERSION=3.4.9

- name: Ruby 2.5 / Redmine 4
rvm: 2.5.3
env: REDMINE_VERSION=4.0.2

- name: Ruby 2.6 / Redmine 4
rvm: 2.6.1
env: REDMINE_VERSION=4.0.2

matrix:
- REDMINE_VERSION=3.2.7 TRACE=--trace
- REDMINE_VERSION=3.3.4 TRACE=--trace
- REDMINE_VERSION=3.4.1 TRACE=--trace
- REDMINE_VERSION=3.4.2 TRACE=--trace
allow_failures:
- env: REDMINE_VERSION=4.0.2

before_install:
- source .travis/clone_redmine.sh
- gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true
- gem install bundler -v '< 2'

install:
- export BUNDLE_GEMFILE=$PATH_TO_REDMINE/Gemfile
- cd $PATH_TO_REDMINE
- bundle install --jobs=3 --retry=3 --path=$PATH_TO_PLUGIN/vendor/bundle
- bundle install --without rmagick --jobs=3 --retry=3 --path=$PATH_TO_PLUGIN/vendor/bundle
- bundle exec rake $TRACE db:migrate
- bundle exec rake $TRACE redmine:load_default_data REDMINE_LANG=en
- bundle exec rake $TRACE $GENERATE_SECRET
Expand Down
2 changes: 1 addition & 1 deletion .travis/clone_redmine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ case $REDMINE_VERSION in
export MIGRATE_PLUGINS=db:migrate_plugins
export REDMINE_TARBALL=https://github.com/redmine/redmine/archive/$REDMINE_VERSION.tar.gz
;;
2.*|3.*)
2.*|3.*|4.*)
export PATH_TO_PLUGINS=./plugins # for redmine >= 2.0
export GENERATE_SECRET=generate_secret_token
export MIGRATE_PLUGINS=redmine:plugins:migrate
Expand Down
35 changes: 29 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,49 @@
# Change Log

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
We are basically in feature parity to the redmine time tracker plugins [latest version](https://github.com/hicknhack-software/redmine_time_tracker). Notable changes to this version are listed below.
## [1.1.0] - TBA
The first enhancement release aims to enhance the user experience even further.

### Added
- [please add new features]

### Changed
- [please add noteworthy changes]

### Removed
- [please add dropped features]


## [1.0.0] - 2019.02.26

This is the first mature release after a long beta testing period.
We added plenty of new features which were long time overdue.
Some of the things were requested several years before and were finally possible.

### Added
- functionality is available as an api, so desktop and mobile clients are possible
- functionality is available as an API, so desktop and mobile clients are possible
- rounding can be configured to only affect sums
- proper support for grouping entries in list views
- project specific plugin settings
- time trackers can now be queried
- direct links from running time tracker to issue and project
- error messages for client side validations
- a qr code on the overview page intended to help integrating the upcoming companion app
- there is now version filter for time trackers
- you can now set up activity default per user, which will be automatically used for time trackers and bookings

### Changed
- rounding is now only for time bookings instead of time logs
- enhanced access rights
- changed data structure massively, if anyone relied on the database tables, please update your code
- we improved the timezone handling cause there was a synchronisation problem between client and server

### Removed
- dropped support for redmine below version 3.2
- dropped support for ruby below 2.0.0
- dropped support for Redmine below version 3.2
- dropped support for Ruby below 2.0.0
- removed the extra report tab, it's now merged in the time bookings tab
- removed the continue feature for time bookings (if you want this back, consider giving a +1 [here](https://github.com/hicknhack-software/redmine_hourglass/issues/3))
- ability to remove time logs with time bookings, you now need to remove the time booking first
17 changes: 9 additions & 8 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
source 'https://rubygems.org'

#asset pipeline
# asset pipeline
gem 'uglifier'
gem 'coffee-script'
gem 'sass'
gem 'coffee-script', '~> 2.4.1'
gem 'sass', '~> 3.5.1'

# access control
gem 'pundit'
gem 'pundit', '~> 1.1.0'

# this is useful for unix based systems which don't have a js runtime installed
# if you are on windows and this makes problems, simply remove the line
gem 'therubyracer', :platform => :ruby

#views
gem 'slim'
# views
gem 'slim', '~> 3.0.8'
gem 'js-routes', '~> 1.3'
gem 'momentjs-rails', '>= 2.10.7'

gem 'rswag' # api docs
gem 'rswag', '<2.0' # api docs
gem 'rspec-core'
gem 'rqrcode', '~> 0.10.1'

group :development, :test do
gem 'rubycritic', require: false
gem 'rspec-rails', '~> 3.5', '>= 3.5.2'
gem 'factory_bot_rails'
gem 'factory_bot_rails', '< 5.0'
gem 'zonebie'
gem 'timecop'
gem 'faker', '1.7.3'
Expand Down
87 changes: 68 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,65 +3,110 @@
[![Build Status](https://travis-ci.org/hicknhack-software/redmine_hourglass.png)](https://travis-ci.org/hicknhack-software/redmine_hourglass)
[![Join the chat at https://gitter.im/hicknhack-software/redmine_hourglass](https://badges.gitter.im/hicknhack-software/redmine_hourglass.svg)](https://gitter.im/hicknhack-software/redmine_hourglass?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Hourglass is a Redmine plugin to aid in tracking spent time on projects and issues. It allows users to start / stop a timer with an optional reference to what they are working on.
Hourglass is a Redmine plugin to aid in tracking spent time on projects and issues. It allows users to start / stop a timer with an optional reference to what they are working on.

It allows various queries for time entries as well as possibilities to update existing entries.
It allows various queries for time entries as well as possibilities to update existing entries.

Hourglass can be configured on a global base as well as per project.
Hourglass can be configured on a global base as well as per project.

See [CHANGELOG.md](CHANGELOG.md) for the latest features.

_Note: This is a complete rewrite of the [Redmine Time Tracker Plugin](https://github.com/hicknhack-software/redmine_time_tracker). While it has feature parity (atleast we hope we didn't forget anything), the code base has changed positively, so further additions are no longer a pain to do._

_We already did some additions to the existing version, see [CHANGELOG.md](CHANGELOG.md) for details._
## Migrate from old Time Tracker plugin

_Note: This is a complete rewrite of the [Redmine Time Tracker Plugin](https://github.com/hicknhack-software/redmine_time_tracker). While it has feature parity (atleast we hope we didn't forget anything), the code base has changed positively, so further additions are no longer a pain to do._

## Migrate
___To ease migrating we added a function to import time entries from the redmine_time_tracker. You can find this in the plugin settings and as a rake task. For more information about migrating from the old time tracker take a look on the [Migration Guide](https://github.com/hicknhack-software/redmine_hourglass/wiki/Migration-Guide)___


## Companion App

We made an app to ease use of the time tracker on mobile (android only for now), check it out:

- [Hourglass for Android](https://play.google.com/store/apps/details?id=hnh.software.hourglass)

The Binaries are made available as downloads in the [Releases](https://github.com/hicknhack-software/redmine_hourglass/releases) section


## Features

- Per user time tracking
- Integrates well with redmine by reusing time entries
- Integrates well with Redmine by reusing time entries
- Overview of spent time for users
- Track project unrelated time
- Book tracked time on issues
- Detailed statistics for team management
- Status monitor of currently running trackers
- Detailed list views with redmine queries integrated
- Detailed list views with Redmine queries integrated
- Report generation for projects with graphical time representation with customizable company logo
- Project specific settings


## Requirements
* Ruby >= 2.0.0
* Redmine >= 3.0.0

* Ruby 2.0.0 - 2.3.x
* Redmine 3.2.0 - 3.4.x
* Redmine 4.0.x support is in the works
* An [ExecJS](https://github.com/sstephenson/execjs) compatible runtime, the gemfile includes [therubyracer](https://github.com/cowboyd/therubyracer) for unix based systems and windows ships with a default js interpreter (from Win 7 upwards), so most people should be set. If you happen to have problems like for example [#29](https://github.com/hicknhack-software/redmine_hourglass/issues/29), take a look on the linked ExecJS and install one of the mentioned runtimes.

See [.travis.yml](.travis.yml) for details about supported version. If a newer version doesn't appear in there, feel free to open an issue and report your experience with that redmine or ruby version.
See [.travis.yml](.travis.yml) for details about supported versions.
If a newer version doesn't appear in there, feel free to open an issue and report your experience with that Redmine or Ruby version.


## Installation

1. Download and put the plugin code in `plugins/redmine_hourglass`. For example by issuing `git clone https://github.com/hicknhack-software/redmine_hourglass.git` in the `plugins` directory.
1. Run `bundle install` to install necessary gems.
1. Run `rake redmine:plugins:migrate RAILS_ENV=production`
1. Run `rake redmine:plugins:assets RAILS_ENV=production`. (If you redmine is deployed in a subfolder like `www.example.com/redmine` you need to add `RAILS_RELATIVE_URL_ROOT=/redmine` to that task like this `rake redmine:plugins:assets RAILS_ENV=production RAILS_RELATIVE_URL_ROOT=/redmine`)
1. (Re)start your redmine
1. The plugin is now installed and can be used.
1. Place the source code of this plugin at the `plugins/redmine_hourglass` folder.
Either by:
- Download a release from [Releases](https://github.com/hicknhack-software/redmine_hourglass/releases) and extract it into your Redmine.
- Or clone the repository:
```bash
git clone https://github.com/hicknhack-software/redmine_hourglass.git plugins/redmine_hourglass
```
1. Install required Gems by:
```bash
bundle install
```
1. Update the database schema with:
```bash
bundle exec rake redmine:plugins:migrate RAILS_ENV=production
```
1. Precompile the assets.
- If your Redmine is accessed with a path on your domain, like `www.example.com/redmine` use this option:
```bash
bundle exec rake redmine:plugins:assets RAILS_ENV=production RAILS_RELATIVE_URL_ROOT=/redmine
```
- If your Redmine is on the root you might simply run:
```bash
bundle exec rake redmine:plugins:assets RAILS_ENV=production
```
1. (Re)start your Redmine
1. Done. *Please read the "First time usage" section below.*


## Update

The process is roughly the same as installing. Make sure you have the desired version in the `plugins` directory and run the steps above (except 1).

If you had it installed via git before, the first step is simply doing `git pull` in the `plugins/redmine_hourglass` directory.

## Usage

## First time usage

1. Login as an administrator and setup the permissions for your roles
- developers should have the rights to track time

![Developer Rights](doc/images/DeveloperRights.png)

- managers should have the rights to fix times

![Manager Rights](doc/images/ManagerRights.png)

1. Enable the "Hourglass" module for your project
1. You should now see the Time Tracking link in the top menu
- works well in combination with the built in `Time tracking`

![Project Modules](doc/images/ProjectModules.png)

1. You should now see the Time Tracking link in the top menu.

To track time directly on an issue, you can use the context menu (right click in the issues list) in
the issue list to start or stop the timer or press the "Start Tracking" button on the top right, next to the default "Book Time" Redmine button.
Expand Down Expand Up @@ -89,10 +134,14 @@ A booking is time that is actually connected to a task (project or issue). To cr

The plugin offers a list of settings at the Redmine roles and permission settings page. Also you can set the size and file for a logo to be displayed at the report in the Redmine plugin settings, enable rounding behaviour and interval as well as snapping percentage. You can also refine this settings per project if you have different accounting rules per project.

![Project Settings](doc/images/ProjectSettings.png)


## Contributing

Bug reports and pull requests are welcome on [GitHub](https://github.com/hicknhack-software/redmine_hourglass). Please check the [contribution guide](CONTRIBUTING.md).This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to our [code of conduct](CODE_OF_CONDUCT.md).


## License

The plugin is available released under the terms of [GPL](https://www.gnu.org/licenses/gpl).
Binary file added app/assets/images/icons/time_continue.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/assets/javascripts/application.coffee
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#= require moment
#= require timeFields
#= require forms
#= require lists
#= require timer
Expand Down

0 comments on commit ff3cf36

Please sign in to comment.