├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── README.md
├── Screenshot_risks.png
├── Screenshot_status.png
├── app
├── controllers
│ ├── .gitkeep
│ ├── risk_statuses_controller.rb
│ └── risks_controller.rb
├── helpers
│ ├── .gitkeep
│ └── risks_helper.rb
├── models
│ ├── .gitkeep
│ ├── risk.rb
│ └── risk_status.rb
└── views
│ ├── .gitkeep
│ ├── issues
│ ├── _risk.html.erb
│ └── _risk_form.html.erb
│ ├── risk_statuses
│ ├── _form.html.erb
│ ├── edit.html.erb
│ └── new.html.erb
│ ├── risks
│ ├── _form.html.erb
│ ├── edit.html.erb
│ ├── index.html.erb
│ ├── new.html.erb
│ └── show.html.erb
│ └── settings
│ ├── _risks.html.erb
│ └── risks
│ └── _status.html.erb
├── assets
├── images
│ └── .gitkeep
├── javascripts
│ ├── .gitkeep
│ └── jquery.colorPicker.min.js
└── stylesheets
│ ├── .gitkeep
│ ├── colorPicker.css
│ └── risks.css
├── config
├── locales
│ └── en.yml
└── routes.rb
├── db
└── migrate
│ ├── .gitkeep
│ ├── 001_create_risks.rb
│ ├── 002_remove_number_from_risks.rb
│ ├── 003_remove_action_from_risks.rb
│ ├── 004_add_risk_to_issues.rb
│ ├── 005_create_risk_statuses.rb
│ ├── 006_add_default_risk_statuses.rb
│ ├── 007_add_default_risk_status_to_risks.rb
│ └── 008_change_risk_status_monitor_to_active.rb
├── init.rb
├── lib
├── redmine_risk_management.rb
├── redmine_risk_management
│ ├── hooks
│ │ └── views_issues_hook.rb
│ └── patches
│ │ ├── issue_patch.rb
│ │ └── project_patch.rb
└── tasks
│ └── .gitkeep
└── test
├── fixtures
├── .gitkeep
├── attachments.yml
├── custom_fields.yml
├── custom_fields_projects.yml
├── custom_fields_trackers.yml
├── custom_values.yml
├── enabled_modules.yml
├── enumerations.yml
├── issue_categories.yml
├── issue_statuses.yml
├── issues.yml
├── journal_details.yml
├── journals.yml
├── member_roles.yml
├── members.yml
├── projects.yml
├── projects_trackers.yml
├── queries.yml
├── risk_statuses.yml
├── risks.yml
├── roles.yml
├── time_entries.yml
├── trackers.yml
├── users.yml
├── versions.yml
└── workflows.yml
├── functional
├── .gitkeep
├── issues_controller_test.rb
└── risks_controller_test.rb
├── integration
└── .gitkeep
├── test_helper.rb
└── unit
├── .gitkeep
├── risk_status_test.rb
└── risk_test.rb
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Change Log
2 | All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).
3 |
4 | ## [0.4](https://github.com/imaginary-cloud/redmine_risk_management/tree/0.4) - 2018-05-16
5 |
6 | ### Fixed
7 |
8 | - Update README
9 |
10 | ### Added
11 |
12 | - Support for redmine 3.x
13 | - Changelog
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # [Imaginary Cloud's](https://www.imaginarycloud.com) Code of Conduct
2 |
3 | To make sure that we provide an open and welcoming environment, we enforce in our projects a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
4 |
5 | ## Behavior
6 |
7 | How to create a positive environment:
8 |
9 | * Using welcoming and inclusive language;
10 | * Being respectful of differing viewpoints and experiences;
11 | * Gracefully accepting constructive criticism;
12 | * Focusing on what is best for the community;
13 | * Showing empathy towards other community members.
14 |
15 | Unacceptable behavior by participants include:
16 |
17 | * The use of sexualized language or imagery and unwelcome sexual attention or advances;
18 | * Trolling, insulting/derogatory comments, and personal or political attacks;
19 | * Public or private harassment;
20 | * Publishing others' private information, such as a physical or electronic address, without explicit permission;
21 | * Other conduct which could reasonably be considered inappropriate in a professional setting.
22 |
23 | ## Responsibilities
24 |
25 | We are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
26 |
27 | We have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that we deem inappropriate, threatening, offensive, or harmful.
28 |
29 | ## Scope
30 |
31 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
32 |
33 | ## Enforcement
34 |
35 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at info@imaginarycloud. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
36 |
37 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
38 |
39 | ## Attribution
40 |
41 | This Code of Conduct is inspired by the [Contributor Covenant](http://contributor-covenant.org/version/1/4), version 1.4.
42 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # [Imaginary Cloud's](https://www.imaginarycloud.com) Contribution Guidelines
2 |
3 | We accept pull requests from everyone and you're very welcome to do it. Just be sure that you're following the Imaginary Clouds's Code of Conduct and everything will run smoothly thereafter.
4 |
5 | ## General Guidelines
6 |
7 | * Fork the repository;
8 | * Run tests: make redmine:plugins:test NAME=redmine_risk_management;
9 | * Add test;
10 | * Make the test pass;
11 | * Test change on redmine (follow README installation guide);
12 | * Push to fork and submit a pull request.
13 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Redmine Risk Management
2 |
3 | V0.0.4 (5-Jun-2018)
4 |
5 | Risk management is a plugin for [Redmine](http://www.redmine.org/) (a project management web application), allowing to manage the risks for a given project.
6 |
7 | ## Installation
8 |
9 | 1. Download tarball
10 | 2. `cd {redmine_root}/plugins/`
11 | 3. `mkdir redmine_risk_management`
12 | 4. Extract files to {redmine_root}/plugins/redmine_risk_management/
13 | 5. `rake redmine:plugins:migrate NAME=redmine_risk_management RAILS_ENV={Environment}`
14 |
15 | ## How to use
16 |
17 | First you can create custom status going to the plugin administration page.
18 |
19 | 
20 |
21 | To create a risk for a project you need to click in Risks tab under the project detail page.
22 |
23 |
24 | 
25 |
26 | ## Keywords
27 |
28 | Risk Management, Risk, Impact, Management, Redmine, Plugin
29 |
30 | ## Support
31 |
32 | Support will only be given to the following versions or above:
33 |
34 | * Redmine version 2.6.10
35 | * Ruby version 2.2.0
36 | * Rails version 3.2.22
37 |
38 | Note: Redmine 2.6.5 does not support Ruby 2.2. Redmine 2.6.6 supports it (#19652). [Link](http://www.redmine.org/projects/redmine/wiki/RedmineInstall/252#Requirements)
39 |
40 | ## License
41 |
42 | Copyright © 2010-2018 [Imaginary Cloud](https://www.imaginarycloud.com). This library is licensed under the MIT license.
43 |
44 | ## About Imaginary Cloud
45 |
46 | 
47 |
48 | We apply our own Product Design Process to bring great digital products to life. Visit [our website](https://www.imaginarycloud.com) to find out about our other projects or [contact us](https://www.imaginarycloud.com/contacts) if there's an idea that you want to turn into an outstanding product, we'll take it from there!
49 |
--------------------------------------------------------------------------------
/Screenshot_risks.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaginary-cloud/redmine_risk_management/b070788fd63bc5b2ddea18a671a9640465c7b229/Screenshot_risks.png
--------------------------------------------------------------------------------
/Screenshot_status.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaginary-cloud/redmine_risk_management/b070788fd63bc5b2ddea18a671a9640465c7b229/Screenshot_status.png
--------------------------------------------------------------------------------
/app/controllers/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaginary-cloud/redmine_risk_management/b070788fd63bc5b2ddea18a671a9640465c7b229/app/controllers/.gitkeep
--------------------------------------------------------------------------------
/app/controllers/risk_statuses_controller.rb:
--------------------------------------------------------------------------------
1 | class RiskStatusesController < ApplicationController
2 | layout 'admin'
3 |
4 | before_filter :require_admin
5 |
6 | def index
7 | @issue_statuses = RiskStatus.ordered
8 | render action: :index, layout: false if request.xhr?
9 | end
10 |
11 | def new
12 | @risk_status = RiskStatus.new
13 | end
14 |
15 | def create
16 | @risk_status = RiskStatus.new
17 | @risk_status.safe_attributes = params[:risk_status]
18 |
19 | if @risk_status.save
20 | flash[:notice] = t(:notice_successful_create)
21 | redirect_to plugin_settings_path(:redmine_risk_management)
22 | else
23 | render action: :new
24 | end
25 | end
26 |
27 | def edit
28 | @risk_status = RiskStatus.find(params[:id])
29 | end
30 |
31 | def update
32 | @risk_status = RiskStatus.find(params[:id])
33 |
34 | if @risk_status.update_attributes(params[:risk_status])
35 | flash[:notice] = t(:notice_successful_update)
36 | redirect_to plugin_settings_path(:redmine_risk_management)
37 | else
38 | render action: :edit
39 | end
40 | end
41 |
42 | def destroy
43 | RiskStatus.find(params[:id]).destroy
44 | flash[:notice] = t(:notice_successful_delete)
45 | redirect_to plugin_settings_path(:redmine_risk_management)
46 | rescue
47 | flash[:error] = t(:error_unable_delete_risk_status)
48 | redirect_to plugin_settings_path(:redmine_risk_management)
49 | end
50 |
51 | end
52 |
--------------------------------------------------------------------------------
/app/controllers/risks_controller.rb:
--------------------------------------------------------------------------------
1 | class RisksController < ApplicationController
2 | unloadable
3 |
4 | before_filter :find_project_by_project_id
5 | before_filter :find_risk, except: [:index, :new, :create]
6 | before_filter :check_project_permission
7 |
8 | def index
9 | @query = Risk.includes(:issues, :risk_status)
10 |
11 | @limit = Risk::PER_PAGE
12 | @risks_count = @query.count
13 | @risks_pages = Paginator.new @risks_count, @limit, params[:page]
14 | @offset ||= @risks_pages.offset
15 |
16 | @risks = @query.where(project_id: @project).offset(@offset).limit(@limit)
17 | end
18 |
19 | def new
20 | @risk = Risk.new
21 | @risk_statuses = RiskStatus.ordered
22 | end
23 |
24 | def create
25 | @risk = Risk.new
26 | @risk.safe_attributes = params[:risk]
27 | @risk.project = @project
28 | @risk.user = User.current
29 |
30 | if @risk.save
31 | flash[:notice] = t(:notice_successful_create)
32 | respond_to do |format|
33 | format.html { redirect_to [@project, @risk] }
34 | format.api { head :ok }
35 | end
36 | else
37 | respond_to do |format|
38 | format.html { render action: :new }
39 | format.api { render_validation_errors(@risk) }
40 | end
41 | @risk_statuses = RiskStatus.ordered
42 | end
43 | end
44 |
45 | def show
46 | @issues = @risk.issues
47 | end
48 |
49 | def edit
50 | @risk_statuses = RiskStatus.ordered
51 | end
52 |
53 | def update
54 | @risk.safe_attributes = params[:risk]
55 |
56 | if @risk.save
57 | flash[:notice] = t(:notice_successful_update)
58 | respond_to do |format|
59 | format.html { redirect_to [@project, @risk] }
60 | format.api { head :ok }
61 | end
62 | else
63 | respond_to do |format|
64 | format.html { render action: :edit }
65 | format.api { render_validation_errors(@risk) }
66 | end
67 | @risk_statuses = RiskStatus.ordered
68 | end
69 | end
70 |
71 | def destroy
72 | if @risk.destroy
73 | flash[:notice] = t(:notice_successful_delete)
74 | else
75 | flash[:error] = t(:notice_unsuccessful_delete)
76 | end
77 |
78 | respond_to do |format|
79 | format.html { redirect_to project_risks_path(@project) }
80 | format.api { head :ok }
81 | end
82 | end
83 |
84 |
85 | private
86 |
87 | def find_risk
88 | @risk = Risk.includes(:project).find(params[:id])
89 | end
90 |
91 | def check_project_permission
92 | if @risk && @risk.project != @project
93 | render_403
94 | end
95 | end
96 |
97 | end
98 |
--------------------------------------------------------------------------------
/app/helpers/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaginary-cloud/redmine_risk_management/b070788fd63bc5b2ddea18a671a9640465c7b229/app/helpers/.gitkeep
--------------------------------------------------------------------------------
/app/helpers/risks_helper.rb:
--------------------------------------------------------------------------------
1 | module RisksHelper
2 |
3 | def options_with_lower_and_highier
4 | [
5 | ['1 (lower)', 1],
6 | ['2', 2],
7 | ['3', 3],
8 | ['4 (higher)', 4]
9 | ]
10 | end
11 |
12 | def risk_table_columns
13 | %w{ ID Title Description Probability Impact Criticality Rationale }
14 | end
15 |
16 | def risk_linkable_columns
17 | %w{ ID Title }
18 | end
19 |
20 | end
--------------------------------------------------------------------------------
/app/models/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaginary-cloud/redmine_risk_management/b070788fd63bc5b2ddea18a671a9640465c7b229/app/models/.gitkeep
--------------------------------------------------------------------------------
/app/models/risk.rb:
--------------------------------------------------------------------------------
1 | class Risk < ActiveRecord::Base
2 | unloadable
3 |
4 | include Redmine::SafeAttributes
5 |
6 | PER_PAGE = 30
7 | RATIONALES = ['Monitor', 'Plan Mitigation', 'Mitigate']
8 |
9 | belongs_to :project
10 | belongs_to :risk_status
11 | belongs_to :user
12 | has_many :issues, dependent: :destroy
13 |
14 | validates_presence_of :title, :description
15 | validates_numericality_of :criticality, allow_nil: true
16 | validates_numericality_of :probability, :impact, greater_than: 0, less_than: 5
17 | validates_inclusion_of :rationale, in: RATIONALES, allow_nil: true
18 |
19 | before_save :set_criticality_rationale
20 |
21 | attr_accessible :title, :description, :probability, :impact, :risk_status_id
22 |
23 | safe_attributes 'title', 'description', 'probability', 'impact', 'risk_status_id'
24 |
25 | private
26 |
27 | def set_criticality_rationale
28 | self.criticality = self.probability * self.impact
29 | self.rationale =
30 | case self.criticality
31 | when 1..4 then RATIONALES.first
32 | when 5..8 then RATIONALES.second
33 | else RATIONALES.third
34 | end
35 | end
36 |
37 | end
38 |
--------------------------------------------------------------------------------
/app/models/risk_status.rb:
--------------------------------------------------------------------------------
1 | class RiskStatus < ActiveRecord::Base
2 | unloadable
3 |
4 | include Redmine::SafeAttributes
5 |
6 | STATUS_TYPE = ['open', 'closed']
7 |
8 | acts_as_list :scope => 'status_type = \'#{status_type}\''
9 |
10 | has_many :risks
11 |
12 | validates :name, presence: true, uniqueness: true
13 |
14 | safe_attributes 'name', 'color', 'status_type', 'is_default', 'position'
15 |
16 | scope :ordered, -> { order('status_type DESC, position') }
17 |
18 | attr_accessible :name, :color_name, :status_type, :is_default, :position
19 |
20 | before_destroy :check_integrity
21 | after_save :update_default
22 |
23 | def color_name
24 | return "#" + "%06x" % self.color unless self.color.nil?
25 | end
26 |
27 | def color_name=(clr)
28 | self.color = clr.from(1).hex
29 | end
30 |
31 | def self.default
32 | where(is_default: true).first
33 | end
34 |
35 |
36 | private
37 |
38 | def check_integrity
39 | raise "Can't delete risk status" if Risk.where(risk_status_id: self.id).any?
40 | end
41 |
42 | def update_default
43 | RiskStatus.update_all({ is_default: false }, ['id <> ?', id]) if self.is_default?
44 | end
45 | end
--------------------------------------------------------------------------------
/app/views/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaginary-cloud/redmine_risk_management/b070788fd63bc5b2ddea18a671a9640465c7b229/app/views/.gitkeep
--------------------------------------------------------------------------------
/app/views/issues/_risk.html.erb:
--------------------------------------------------------------------------------
1 | <% if @issue.risk %>
2 |
3 | <%= stylesheet_link_tag 'risks', plugin: 'redmine_risk_management' %>
4 |
5 |
6 |
7 | <%= link_to "#{t(:label_risk)} ##{@issue.risk.id}:", [@project, @issue.risk] %>
8 | <%= @issue.risk.title %>
9 |
10 |
11 |
12 | <% end %>
--------------------------------------------------------------------------------
/app/views/issues/_risk_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= labelled_fields_for(@issue) do |f| %>
2 |
3 | <%= f.hidden_field :risk_id %>
4 | <%= f.label :risk_id, t('label_risk') %>
5 | <%= text_field_tag :risk_id_disabled, @issue.risk_id, size: 10, disabled: :disabled %>
6 |
7 | <% end %>
--------------------------------------------------------------------------------
/app/views/risk_statuses/_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= error_messages_for 'risk_status' %>
2 |
3 |
4 |
5 |
6 | <%= t(:field_name) %>
7 | *
8 |
9 | <%= text_field 'risk_status', 'name' %>
10 |
11 |
12 |
13 |
14 | <%= t(:field_color) %>
15 |
16 | <%= text_field 'risk_status', 'color_name', class: 'colorpicker' %>
17 |
18 |
19 |
20 |
21 | <%= t(:field_status_type) %>
22 |
23 | <%= select_tag 'risk_status[status_type]', options_for_select(RiskStatus::STATUS_TYPE, @risk_status.status_type) %>
24 |
25 |
26 |
27 |
28 | <%= t(:field_is_default) %>
29 |
30 | <%= check_box 'risk_status', 'is_default' %>
31 |
32 |
33 |
34 | <% content_for :header_tags do %>
35 | <%= javascript_include_tag 'jquery.colorPicker.min.js', plugin: 'redmine_risk_management' %>
36 | <%= stylesheet_link_tag 'colorPicker.css', plugin: 'redmine_risk_management' %>
37 | <% end %>
38 |
39 |
40 |
--------------------------------------------------------------------------------
/app/views/risk_statuses/edit.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= link_to t(:label_plugins), admin_plugins_path %> »
3 | <%= link_to 'Redmine CRM plugin', plugin_settings_path(:redmine_risk_management) %> »
4 | <%= @risk_status.name %>
5 |
6 |
7 | <%= labelled_form_for @risk_status, class: 'tabular' do |f| %>
8 | <%= render partial: 'form' %>
9 | <%= submit_tag t(:button_save) %>
10 | <% end %>
11 |
--------------------------------------------------------------------------------
/app/views/risk_statuses/new.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= link_to t(:label_plugins), admin_plugins_path %> »
3 | <%= link_to 'Redmine CRM plugin', plugin_settings_path(:redmine_risk_management) %> »
4 | <%= t(:label_new) %>
5 |
6 |
7 | <%= form_tag risk_statuses_path(@risk_status), html: { method: :post, class: 'tabular' } do %>
8 | <%= render partial: 'form' %>
9 | <%= submit_tag t(:button_create) %>
10 | <% end %>
11 |
--------------------------------------------------------------------------------
/app/views/risks/_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= error_messages_for 'risk' %>
2 |
3 |
4 |
5 |
<%= f.text_field :title, size: 100, maxlength: 255, required: true %>
6 |
7 |
8 | <%= f.label_for_field :description, required: true %>
9 | <%= f.text_area :description, cols: 60, no_label: true,
10 | rows: (@risk.description.blank? ? 10 : [[10, @risk.description.length / 50].max, 100].min),
11 | class: 'wiki-edit' %>
12 | <%= wikitoolbar_for 'risk_description' %>
13 |
14 |
15 |
<%= f.select :probability, options_with_lower_and_highier, required: true %>
16 |
<%= f.select :impact, options_with_lower_and_highier, required: true %>
17 |
<%= f.select :risk_status_id,
18 | options_from_collection_for_select(@risk_statuses, :id, :name, @risk.risk_status_id || @risk_statuses.default.try(:id)),
19 | required: true %>
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/app/views/risks/edit.html.erb:
--------------------------------------------------------------------------------
1 | <%= t(:label_risks_edit) %>
2 |
3 | <%= labelled_form_for [@project, @risk], html: { id: 'risk_form' } do |f| %>
4 | <%= render partial: 'form', locals: { f: f } %>
5 | <%= submit_tag t(:button_save) -%>
6 | <% end -%>
--------------------------------------------------------------------------------
/app/views/risks/index.html.erb:
--------------------------------------------------------------------------------
1 | <%= stylesheet_link_tag 'risks', plugin: 'redmine_risk_management' %>
2 |
3 |
4 | <%= link_to t('label_risks_new'), new_project_risk_path(@project), class: 'icon icon-add' %>
5 |
6 |
7 | <%= t('label_risk_plural') %>
8 |
9 | <% if @risks.empty? %>
10 | <%= l(:label_no_data) %>
11 | <% else %>
12 |
60 |
61 | <% end %>
62 |
--------------------------------------------------------------------------------
/app/views/risks/new.html.erb:
--------------------------------------------------------------------------------
1 | <%= t(:label_risks_new) %>
2 |
3 | <%= labelled_form_for :risk, @risk, url: project_risks_path(@project), :html => { method: :post, id: 'risk_form' } do |f| %>
4 | <%= render partial: 'form', locals: { f: f } %>
5 | <%= submit_tag t(:button_create) -%>
6 | <% end -%>
7 |
--------------------------------------------------------------------------------
/app/views/risks/show.html.erb:
--------------------------------------------------------------------------------
1 | <%= stylesheet_link_tag 'risks', plugin: 'redmine_risk_management' %>
2 |
3 |
4 | <%= link_to t(:button_edit), edit_project_risk_path(@project, @risk), class: 'icon icon-edit' %>
5 | <%= link_to t(:button_delete), [@project, @risk], confirm: t(:text_are_you_sure), method: :delete, class: 'icon icon-del' %>
6 |
7 |
8 | <%= "#{t('label_risk')} ##{@risk.id}" %>
9 |
10 |
11 |
12 |
13 |
14 | Status:
15 | <%= @risk.risk_status.name %>
16 |
17 |
18 |
19 | <%= avatar(@risk.user, size: '50') %>
20 |
21 |
<%= @risk.title %>
22 |
23 |
24 | <%= authoring @risk.created_at, @risk.user %>.
25 | <% if @risk.created_at != @risk.updated_at %>
26 | <%= l(:label_updated_time, time_tag(@risk.updated_at)).html_safe %>.
27 | <% end %>
28 |
29 |
30 |
31 | <% %w{ probability impact criticality rationale }.each do |attribute| %>
32 |
33 |
34 | <%= t("field_#{attribute}") %>:
35 | <%= @risk.send(attribute) %>
36 |
37 |
38 | <% end %>
39 |
40 |
41 |
42 |
43 |
<%= t(:field_description)%>
44 |
<%= textilizable @risk, :description %>
45 |
46 |
47 |
48 |
49 |
50 | <%= link_to t(:button_add), new_project_issue_path(@project, 'issue[risk_id]' => @risk) %>
51 |
52 |
<%= t(:label_risks_issues)%>
53 |
54 | <% if @issues.present? %>
55 |
56 | <% @issues.each do |issue| %>
57 |
58 | <%= link_to "#{h issue.tracker.name} ##{issue.id}", issue %>:
59 | <%= issue.subject %>
60 |
61 | <% end -%>
62 |
63 | <% end -%>
64 |
65 |
66 |
--------------------------------------------------------------------------------
/app/views/settings/_risks.html.erb:
--------------------------------------------------------------------------------
1 | <% html_title l(:label_settings), l(:label_risk_plural) -%>
2 |
3 | <%
4 | tabs = [
5 | {
6 | name: 'status',
7 | partial: 'settings/risks/status',
8 | label: :label_risks_status_plural
9 | }
10 | ]
11 | %>
12 |
13 | <%= render_tabs tabs %>
14 |
--------------------------------------------------------------------------------
/app/views/settings/risks/_status.html.erb:
--------------------------------------------------------------------------------
1 | <%= stylesheet_link_tag 'risks', plugin: 'redmine_risk_management' %>
2 |
3 |
4 | <%= link_to t(:label_new), new_risk_status_path, :class => 'icon icon-add' %>
5 |
6 |
7 | <%= t(:label_risks_status_plural)%>
8 |
9 |
10 |
11 |
12 | <%= t(:field_status) %>
13 | <%= t(:field_is_default) %>
14 | <%= t(:field_status_type) %>
15 | <%= t(:button_sort) %>
16 |
17 |
18 |
19 |
20 |
21 | <% for risk_status in RiskStatus.ordered %>
22 | ">
23 |
24 |
25 | <%= link_to risk_status.name, edit_risk_status_path(risk_status) %>
26 |
27 | <%= checked_image risk_status.is_default? %>
28 | <%= risk_status.status_type %>
29 |
30 | <%= reorder_links 'risk_status',
31 | { controller: :risk_statuses, action: :update, id: risk_status },
32 | :put %>
33 |
34 |
35 | <%= delete_link risk_status_path(risk_status) %>
36 |
37 |
38 | <% end %>
39 |
40 |
41 |
--------------------------------------------------------------------------------
/assets/images/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaginary-cloud/redmine_risk_management/b070788fd63bc5b2ddea18a671a9640465c7b229/assets/images/.gitkeep
--------------------------------------------------------------------------------
/assets/javascripts/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaginary-cloud/redmine_risk_management/b070788fd63bc5b2ddea18a671a9640465c7b229/assets/javascripts/.gitkeep
--------------------------------------------------------------------------------
/assets/javascripts/jquery.colorPicker.min.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Really Simple Color Picker in jQuery
3 | *
4 | * Licensed under the MIT (MIT-LICENSE.txt) licenses.
5 | *
6 | * Copyright (c) 2008-2012
7 | * Lakshan Perera (www.laktek.com) & Daniel Lacy (daniellacy.com)
8 | *
9 | * Permission is hereby granted, free of charge, to any person obtaining a copy
10 | * of this software and associated documentation files (the "Software"), to
11 | * deal in the Software without restriction, including without limitation the
12 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
13 | * sell copies of the Software, and to permit persons to whom the Software is
14 | * furnished to do so, subject to the following conditions:
15 | *
16 | * The above copyright notice and this permission notice shall be included in
17 | * all copies or substantial portions of the Software.
18 | *
19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
25 | * IN THE SOFTWARE.
26 | */(function(a){var b,c,d=0,e={control:a('
'),palette:a('
'),swatch:a('
'),hexLabel:a('Hex '),hexField:a(' ')},f="transparent",g;a.fn.colorPicker=function(b){return this.each(function(){var c=a(this),g=a.extend({},a.fn.colorPicker.defaults,b),h=a.fn.colorPicker.toHex(c.val().length>0?c.val():g.pickerDefault),i=e.control.clone(),j=e.palette.clone().attr("id","colorPicker_palette-"+d),k=e.hexLabel.clone(),l=e.hexField.clone(),m=j[0].id,n;a.each(g.colors,function(b){n=e.swatch.clone(),g.colors[b]===f?(n.addClass(f).text("X"),a.fn.colorPicker.bindPalette(l,n,f)):(n.css("background-color","#"+this),a.fn.colorPicker.bindPalette(l,n)),n.appendTo(j)}),k.attr("for","colorPicker_hex-"+d),l.attr({id:"colorPicker_hex-"+d,value:h}),l.bind("keydown",function(b){if(b.keyCode===13){var d=a.fn.colorPicker.toHex(a(this).val());a.fn.colorPicker.changeColor(d?d:c.val())}b.keyCode===27&&a.fn.colorPicker.hidePalette()}),l.bind("keyup",function(b){var d=a.fn.colorPicker.toHex(a(b.target).val());a.fn.colorPicker.previewColor(d?d:c.val())}),a('
').append(k).appendTo(j),j.find(".colorPicker_hexWrap").append(l),a("body").append(j),j.hide(),i.css("background-color",h),i.bind("click",function(){a.fn.colorPicker.togglePalette(a("#"+m),a(this))}),b&&b.onColorChange?i.data("onColorChange",b.onColorChange):i.data("onColorChange",function(){}),c.after(i),c.bind("change",function(){c.next(".colorPicker-picker").css("background-color",a.fn.colorPicker.toHex(a(this).val()))}),c.val(h).hide(),d++})},a.extend(!0,a.fn.colorPicker,{toHex:function(a){if(a.match(/[0-9A-F]{6}|[0-9A-F]{3}$/i))return a.charAt(0)==="#"?a:"#"+a;if(!a.match(/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/))return!1;var b=[parseInt(RegExp.$1,10),parseInt(RegExp.$2,10),parseInt(RegExp.$3,10)],c=function(a){if(a.length<2)for(var b=0,c=2-a.length;b0)return;a.fn.colorPicker.hidePalette()},hidePalette:function(){a(document).unbind("mousedown",a.fn.colorPicker.checkMouse),a(".colorPicker-palette").hide()},showPalette:function(c){var d=b.prev("input").val();c.css({top:b.offset().top+b.outerHeight(),left:b.offset().left}),a("#color_value").val(d),c.show(),a(document).bind("mousedown",a.fn.colorPicker.checkMouse)},togglePalette:function(d,e){e&&(b=e),c=d,c.is(":visible")?a.fn.colorPicker.hidePalette():a.fn.colorPicker.showPalette(d)},changeColor:function(c){b.css("background-color",c),b.prev("input").val(c).change(),a.fn.colorPicker.hidePalette(),b.data("onColorChange").call(b,a(b).prev("input").attr("id"),c)},previewColor:function(a){b.css("background-color",a)},bindPalette:function(c,d,e){e=e?e:a.fn.colorPicker.toHex(d.css("background-color")),d.bind({click:function(b){g=e,a.fn.colorPicker.changeColor(e)},mouseover:function(b){g=c.val(),a(this).css("border-color","#598FEF"),c.val(e),a.fn.colorPicker.previewColor(e)},mouseout:function(d){a(this).css("border-color","#000"),c.val(b.css("background-color")),c.val(g),a.fn.colorPicker.previewColor(g)}})}}),a.fn.colorPicker.defaults={pickerDefault:"FFFFFF",colors:["000000","993300","333300","000080","333399","333333","800000","FF6600","808000","008000","008080","0000FF","666699","808080","FF0000","FF9900","99CC00","339966","33CCCC","3366FF","800080","999999","FF00FF","FFCC00","FFFF00","00FF00","00FFFF","00CCFF","993366","C0C0C0","FF99CC","FFCC99","FFFF99","CCFFFF","99CCFF","FFFFFF"],addColors:[]}})(jQuery)
--------------------------------------------------------------------------------
/assets/stylesheets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaginary-cloud/redmine_risk_management/b070788fd63bc5b2ddea18a671a9640465c7b229/assets/stylesheets/.gitkeep
--------------------------------------------------------------------------------
/assets/stylesheets/colorPicker.css:
--------------------------------------------------------------------------------
1 | div.colorPicker-picker {
2 | height: 16px;
3 | width: 16px;
4 | padding: 0 !important;
5 | border: 1px solid #ccc;
6 | cursor: pointer;
7 | line-height: 16px;
8 | }
9 |
10 | div.colorPicker-palette {
11 | width: 110px;
12 | position: absolute;
13 | border: 1px solid #598FEF;
14 | background-color: #EFEFEF;
15 | padding: 2px;
16 | z-index: 9999;
17 | }
18 | div.colorPicker_hexWrap {width: 100%; float:left }
19 | div.colorPicker_hexWrap label {font-size: 95%; color: #2F2F2F; margin: 5px 2px; width: 25%}
20 | div.colorPicker_hexWrap input {margin: 5px 2px; padding: 0; font-size: 95%; border: 1px solid #000; width: 65%; }
21 |
22 | div.colorPicker-swatch {
23 | height: 12px;
24 | width: 12px;
25 | border: 1px solid #000;
26 | margin: 2px;
27 | float: left;
28 | cursor: pointer;
29 | line-height: 12px;
30 | }
--------------------------------------------------------------------------------
/assets/stylesheets/risks.css:
--------------------------------------------------------------------------------
1 | /* ISSUES PAGES
2 | =============================================================================*/
3 | .issue .box.risk {
4 | margin-top: 10px;
5 | padding: 10px;
6 | }
7 | .issue .box.risk p { margin: 0; }
8 |
9 |
10 | /* RISKS PAGES
11 | =============================================================================*/
12 | #content > .risk {
13 | border-left: 4px solid !important;
14 | padding: 20px !important;
15 | }
16 |
17 | table.list.risks {
18 | border-collapse: collapse;
19 | }
20 |
21 | table.list.risks th:first-of-type,
22 | table.list.risks td:first-of-type {
23 | border-left: 4px solid !important;
24 | padding: 0;
25 | width: 4px;
26 | }
27 |
28 | table.list.risks th:first-of-type {
29 | background: #FFF;
30 | border-color: #FFF !important;
31 | }
32 |
33 | table.risks td.title,
34 | table.risks td.description {
35 | text-align: left;
36 | }
37 |
38 | table.risks td.title { width: 20%; }
39 | table.risks td.description { width: 40%; }
40 |
41 | table.risks td a {
42 | color: #666;
43 | display: block;
44 | }
45 |
46 | table.attributes strong {
47 | display: inline-block;
48 | width: 100px;
49 | }
50 |
51 | table.risk_statuses .color {
52 | border: 1px solid #D7D7D7;
53 | float: left;
54 | display: block;
55 | height: 15px;
56 | margin: 1px 5px 0 0;
57 | width: 15px;
58 | }
59 |
60 | .risk .risk-status {
61 | line-height: 1.5em;
62 | margin: 0 0 20px 0;
63 | padding: 10px;
64 | }
65 | .risk .risk-status p {
66 | color: #FFF;
67 | margin: 0;
68 | }
69 |
70 |
71 | /* TAGS ---------------------------------------------------------------------*/
72 | .tag-label-color {
73 | border-radius: 15px;
74 | float: left;
75 | margin: 7px 0;
76 | padding: 7px 8px;
77 | }
78 |
79 | .tag-label-color > span {
80 | color: #FFF;
81 | float: left;
82 | font: 10px Verdana, sans-serif;
83 | }
--------------------------------------------------------------------------------
/config/locales/en.yml:
--------------------------------------------------------------------------------
1 | en:
2 | error_unable_delete_risk_status: 'Unable to delete risk status'
3 |
4 | field_criticality: Criticality
5 | field_description: Description
6 | field_impact: Impact
7 | field_probability: Probability
8 | field_rationale: Rationale
9 | field_risk_status: Risk status
10 | field_status_type: Status type
11 | field_title: Title
12 |
13 | label_risk: Risk
14 | label_risk_plural: Risks
15 | label_risks_new: New risk
16 | label_risks_edit: Edit risk
17 | label_risks_issues: Issues
18 | label_risks_status: Status
19 | label_risks_status_plural: Statuses
20 | label_risks_status_type: Status types
21 |
--------------------------------------------------------------------------------
/config/routes.rb:
--------------------------------------------------------------------------------
1 | resources :projects do
2 | resources :risks
3 | end
4 |
5 | resources :risk_statuses
--------------------------------------------------------------------------------
/db/migrate/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaginary-cloud/redmine_risk_management/b070788fd63bc5b2ddea18a671a9640465c7b229/db/migrate/.gitkeep
--------------------------------------------------------------------------------
/db/migrate/001_create_risks.rb:
--------------------------------------------------------------------------------
1 | class CreateRisks < ActiveRecord::Migration
2 | def change
3 | create_table :risks do |t|
4 | t.integer :number
5 | t.string :title
6 | t.text :description
7 | t.integer :probability
8 | t.integer :impact
9 | t.integer :criticality
10 | t.string :rationale
11 | t.text :action
12 | t.integer :project_id
13 | t.integer :user_id
14 | t.timestamps
15 | end
16 |
17 | add_index :risks, :project_id
18 | add_index :risks, :user_id
19 | end
20 | end
21 |
--------------------------------------------------------------------------------
/db/migrate/002_remove_number_from_risks.rb:
--------------------------------------------------------------------------------
1 | class RemoveNumberFromRisks < ActiveRecord::Migration
2 | def self.up
3 | remove_column :risks, :number
4 | end
5 |
6 | def self.down
7 | add_column :risks, :number, :integer
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/db/migrate/003_remove_action_from_risks.rb:
--------------------------------------------------------------------------------
1 | class RemoveActionFromRisks < ActiveRecord::Migration
2 | def self.up
3 | remove_column :risks, :action
4 | end
5 |
6 | def self.down
7 | add_column :risks, :action, :text
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/db/migrate/004_add_risk_to_issues.rb:
--------------------------------------------------------------------------------
1 | class AddRiskToIssues < ActiveRecord::Migration
2 | def change
3 | add_column :issues, :risk_id, :integer
4 | add_index :issues, :risk_id
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/db/migrate/005_create_risk_statuses.rb:
--------------------------------------------------------------------------------
1 | class CreateRiskStatuses < ActiveRecord::Migration
2 | def change
3 | create_table :risk_statuses do |t|
4 | t.string :name
5 | t.integer :position
6 | t.boolean :is_default, default: false
7 | t.integer :color, default: 11184810
8 | t.string :status_type, default: 'open'
9 | end
10 |
11 | add_column :risks, :risk_status_id, :integer
12 | add_index :risks, :risk_status_id
13 | end
14 | end
--------------------------------------------------------------------------------
/db/migrate/006_add_default_risk_statuses.rb:
--------------------------------------------------------------------------------
1 | class AddDefaultRiskStatuses < ActiveRecord::Migration
2 | def change
3 | risk_statuses = {
4 | 'Identified' => { is_default: true, color: '3373751' },
5 | 'Monitored' => { color: '15773006' },
6 | 'Occurred' => { color: '14242639' },
7 | 'Dismissed' => { color: '6076508', status_type: 'closed' }
8 | }
9 |
10 | risk_statuses.each do |key, value|
11 | RiskStatus.create({ name: key }.merge(value))
12 | end
13 | end
14 | end
--------------------------------------------------------------------------------
/db/migrate/007_add_default_risk_status_to_risks.rb:
--------------------------------------------------------------------------------
1 | class AddDefaultRiskStatusToRisks < ActiveRecord::Migration
2 |
3 | def change
4 | default_risk_status = RiskStatus.default
5 | Risk.where(risk_status_id: nil).update_all(risk_status_id: default_risk_status.id)
6 | end
7 |
8 | end
--------------------------------------------------------------------------------
/db/migrate/008_change_risk_status_monitor_to_active.rb:
--------------------------------------------------------------------------------
1 | class ChangeRiskStatusMonitorToActive < ActiveRecord::Migration
2 |
3 | def change
4 | risk_status = RiskStatus.find_by_name 'Monitored'
5 | if risk_status
6 | risk_status.update_attributes(name: 'Active')
7 | else
8 | RiskStatus.create(name: 'Active', color: '15773006')
9 | end
10 | end
11 |
12 | end
--------------------------------------------------------------------------------
/init.rb:
--------------------------------------------------------------------------------
1 | require 'redmine_risk_management'
2 |
3 | Redmine::Plugin.register :redmine_risk_management do
4 | name 'Redmine Risk Management plugin'
5 | author 'Imaginary Cloud (http://imaginarycloud.com)'
6 | description 'Risk management plugin for Redmine'
7 | version '0.4'
8 | url 'https://github.com/imaginary-cloud/redmine_risk_management'
9 | author_url 'mailto:info@imaginarycloud.com'
10 |
11 | settings default: {
12 | status: ['Identified', 'Monitored', 'Occurred', 'Dismissed']
13 | }, partial: 'settings/risks'
14 |
15 | project_module :risks do
16 | permission :view_risks, { risks: [:index, :show] }, { public: true }
17 | permission :add_risks, { risks: [:new, :create] }, { public: true }
18 | permission :edit_risks, { risks: [:edit, :update] }, { public: true }
19 | permission :delete_risks, { risks: :destroy }, { public: true }
20 | end
21 |
22 | menu :project_menu, :risks, { controller: :risks, action: :index },
23 | caption: :label_risk_plural, before: :settings, param: :project_id
24 | end
25 |
--------------------------------------------------------------------------------
/lib/redmine_risk_management.rb:
--------------------------------------------------------------------------------
1 | ActionDispatch::Reloader.to_prepare do
2 | require_dependency 'redmine_risk_management/hooks/views_issues_hook'
3 | require_dependency 'redmine_risk_management/patches/issue_patch'
4 | require_dependency 'redmine_risk_management/patches/project_patch'
5 | end
--------------------------------------------------------------------------------
/lib/redmine_risk_management/hooks/views_issues_hook.rb:
--------------------------------------------------------------------------------
1 | module RedmineRiskManagement
2 | module Hooks
3 |
4 | class ViewsIssuesHook < Redmine::Hook::ViewListener
5 | render_on :view_issues_form_details_bottom, partial: 'issues/risk_form'
6 | render_on :view_issues_show_details_bottom, partial: 'issues/risk'
7 | end
8 |
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/lib/redmine_risk_management/patches/issue_patch.rb:
--------------------------------------------------------------------------------
1 | module RedmineRiskManagement
2 | module Patches
3 |
4 | module IssuePatch
5 | def self.included(base) # :nodoc:
6 | base.class_eval do
7 | unloadable # Send unloadable so it will not be unloaded in development
8 | belongs_to :risk
9 |
10 | safe_attributes 'risk_id'
11 | end
12 | end
13 | end
14 |
15 | end
16 | end
17 |
18 | unless Issue.included_modules.include?(RedmineRiskManagement::Patches::IssuePatch)
19 | Issue.send(:include, RedmineRiskManagement::Patches::IssuePatch)
20 | end
21 |
--------------------------------------------------------------------------------
/lib/redmine_risk_management/patches/project_patch.rb:
--------------------------------------------------------------------------------
1 | module RedmineRiskManagement
2 | module Patches
3 |
4 | module ProjectPatch
5 | def self.included(base) # :nodoc:
6 | base.class_eval do
7 | unloadable # Send unloadable so it will not be unloaded in development
8 | has_many :risks, dependent: :destroy
9 | end
10 | end
11 | end
12 |
13 | end
14 | end
15 |
16 | unless Project.included_modules.include?(RedmineRiskManagement::Patches::ProjectPatch)
17 | Project.send(:include, RedmineRiskManagement::Patches::ProjectPatch)
18 | end
19 |
--------------------------------------------------------------------------------
/lib/tasks/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaginary-cloud/redmine_risk_management/b070788fd63bc5b2ddea18a671a9640465c7b229/lib/tasks/.gitkeep
--------------------------------------------------------------------------------
/test/fixtures/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaginary-cloud/redmine_risk_management/b070788fd63bc5b2ddea18a671a9640465c7b229/test/fixtures/.gitkeep
--------------------------------------------------------------------------------
/test/fixtures/attachments.yml:
--------------------------------------------------------------------------------
1 | ---
2 | attachments_001:
3 | created_on: 2006-07-19 21:07:27 +02:00
4 | downloads: 0
5 | content_type: text/plain
6 | disk_filename: 060719210727_error281.txt
7 | disk_directory: "2006/07"
8 | container_id: 3
9 | digest: b91e08d0cf966d5c6ff411bd8c4cc3a2
10 | id: 1
11 | container_type: Issue
12 | filesize: 28
13 | filename: error281.txt
14 | author_id: 2
15 | attachments_002:
16 | created_on: 2007-01-27 15:08:27 +01:00
17 | downloads: 0
18 | content_type: text/plain
19 | disk_filename: 060719210727_document.txt
20 | disk_directory: "2006/07"
21 | container_id: 1
22 | digest: b91e08d0cf966d5c6ff411bd8c4cc3a2
23 | id: 2
24 | container_type: Document
25 | filesize: 28
26 | filename: document.txt
27 | author_id: 2
28 | attachments_003:
29 | created_on: 2006-07-19 21:07:27 +02:00
30 | downloads: 0
31 | content_type: image/gif
32 | disk_filename: 060719210727_logo.gif
33 | disk_directory: "2006/07"
34 | container_id: 4
35 | digest: b91e08d0cf966d5c6ff411bd8c4cc3a2
36 | id: 3
37 | container_type: WikiPage
38 | filesize: 280
39 | filename: logo.gif
40 | description: This is a logo
41 | author_id: 2
42 | attachments_004:
43 | created_on: 2006-07-19 21:07:27 +02:00
44 | container_type: Issue
45 | container_id: 3
46 | downloads: 0
47 | disk_filename: 060719210727_source.rb
48 | disk_directory: "2006/07"
49 | digest: b91e08d0cf966d5c6ff411bd8c4cc3a2
50 | id: 4
51 | filesize: 153
52 | filename: source.rb
53 | author_id: 2
54 | description: This is a Ruby source file
55 | content_type: application/x-ruby
56 | attachments_005:
57 | created_on: 2006-07-19 21:07:27 +02:00
58 | container_type: Issue
59 | container_id: 3
60 | downloads: 0
61 | disk_filename: 060719210727_changeset_iso8859-1.diff
62 | disk_directory: "2006/07"
63 | digest: b91e08d0cf966d5c6ff411bd8c4cc3a2
64 | id: 5
65 | filesize: 687
66 | filename: changeset_iso8859-1.diff
67 | author_id: 2
68 | content_type: text/x-diff
69 | attachments_006:
70 | created_on: 2006-07-19 21:07:27 +02:00
71 | container_type: Issue
72 | container_id: 3
73 | downloads: 0
74 | disk_filename: 060719210727_archive.zip
75 | disk_directory: "2006/07"
76 | digest: b91e08d0cf966d5c6ff411bd8c4cc3a2
77 | id: 6
78 | filesize: 157
79 | filename: archive.zip
80 | author_id: 2
81 | content_type: application/octet-stream
82 | attachments_007:
83 | created_on: 2006-07-19 21:07:27 +02:00
84 | container_type: Issue
85 | container_id: 4
86 | downloads: 0
87 | disk_filename: 060719210727_archive.zip
88 | disk_directory: "2006/07"
89 | digest: b91e08d0cf966d5c6ff411bd8c4cc3a2
90 | id: 7
91 | filesize: 157
92 | filename: archive.zip
93 | author_id: 1
94 | content_type: application/octet-stream
95 | attachments_008:
96 | created_on: 2006-07-19 21:07:27 +02:00
97 | container_type: Project
98 | container_id: 1
99 | downloads: 0
100 | disk_filename: 060719210727_project_file.zip
101 | disk_directory: "2006/07"
102 | digest: b91e08d0cf966d5c6ff411bd8c4cc3a2
103 | id: 8
104 | filesize: 320
105 | filename: project_file.zip
106 | author_id: 2
107 | content_type: application/octet-stream
108 | attachments_009:
109 | created_on: 2006-07-19 21:07:27 +02:00
110 | container_type: Version
111 | container_id: 1
112 | downloads: 0
113 | disk_filename: 060719210727_archive.zip
114 | disk_directory: "2006/07"
115 | digest: b91e08d0cf966d5c6ff411bd8c4cc3a2
116 | id: 9
117 | filesize: 452
118 | filename: version_file.zip
119 | author_id: 2
120 | content_type: application/octet-stream
121 | attachments_010:
122 | created_on: 2006-07-19 21:07:27 +02:00
123 | container_type: Issue
124 | container_id: 2
125 | downloads: 0
126 | disk_filename: 060719210727_picture.jpg
127 | disk_directory: "2006/07"
128 | digest: b91e08d0cf966d5c6ff411bd8c4cc3a2
129 | id: 10
130 | filesize: 452
131 | filename: picture.jpg
132 | author_id: 2
133 | content_type: image/jpeg
134 | attachments_011:
135 | created_on: 2007-02-12 15:08:27 +01:00
136 | container_type: Document
137 | container_id: 1
138 | downloads: 0
139 | disk_filename: 060719210727_picture.jpg
140 | disk_directory: "2006/07"
141 | digest: b91e08d0cf966d5c6ff411bd8c4cc3a2
142 | id: 11
143 | filesize: 452
144 | filename: picture.jpg
145 | author_id: 2
146 | content_type: image/jpeg
147 | attachments_012:
148 | created_on: 2006-07-19 21:07:27 +02:00
149 | container_type: Version
150 | container_id: 1
151 | downloads: 0
152 | disk_filename: 060719210727_version_file.zip
153 | disk_directory: "2006/07"
154 | digest: b91e08d0cf966d5c6ff411bd8c4cc3a2
155 | id: 12
156 | filesize: 452
157 | filename: version_file.zip
158 | author_id: 2
159 | content_type: application/octet-stream
160 | attachments_013:
161 | created_on: 2006-07-19 21:07:27 +02:00
162 | container_type: Message
163 | container_id: 1
164 | downloads: 0
165 | disk_filename: 060719210727_foo.zip
166 | disk_directory: "2006/07"
167 | digest: b91e08d0cf966d5c6ff411bd8c4cc3a2
168 | id: 13
169 | filesize: 452
170 | filename: foo.zip
171 | author_id: 2
172 | content_type: application/octet-stream
173 | attachments_014:
174 | created_on: 2006-07-19 21:07:27 +02:00
175 | container_type: Issue
176 | container_id: 3
177 | downloads: 0
178 | disk_filename: 060719210727_changeset_utf8.diff
179 | disk_directory: "2006/07"
180 | digest: b91e08d0cf966d5c6ff411bd8c4cc3a2
181 | id: 14
182 | filesize: 687
183 | filename: changeset_utf8.diff
184 | author_id: 2
185 | content_type: text/x-diff
186 | attachments_015:
187 | id: 15
188 | created_on: 2010-07-19 21:07:27 +02:00
189 | container_type: Issue
190 | container_id: 14
191 | downloads: 0
192 | disk_filename: 060719210727_changeset_utf8.diff
193 | disk_directory: "2006/07"
194 | digest: b91e08d0cf966d5c6ff411bd8c4cc3a2
195 | filesize: 687
196 | filename: private.diff
197 | author_id: 2
198 | content_type: text/x-diff
199 | description: attachement of a private issue
200 | attachments_016:
201 | content_type: image/png
202 | downloads: 0
203 | created_on: 2010-11-23 16:14:50 +09:00
204 | disk_filename: 101123161450_testfile_1.png
205 | disk_directory: "2010/11"
206 | container_id: 14
207 | digest: 8e0294de2441577c529f170b6fb8f638
208 | id: 16
209 | container_type: Issue
210 | description: ""
211 | filename: testfile.png
212 | filesize: 2654
213 | author_id: 2
214 | attachments_017:
215 | content_type: image/png
216 | downloads: 0
217 | created_on: 2010-12-23 16:14:50 +09:00
218 | disk_filename: 101223161450_testfile_2.png
219 | disk_directory: "2010/12"
220 | container_id: 14
221 | digest: 6bc2963e8d7ea0d3e68d12d1fba3d6ca
222 | id: 17
223 | container_type: Issue
224 | description: ""
225 | filename: testfile.PNG
226 | filesize: 3582
227 | author_id: 2
228 | attachments_018:
229 | content_type: image/png
230 | downloads: 0
231 | created_on: 2011-01-23 16:14:50 +09:00
232 | disk_filename: 101123161450_testfile_1.png
233 | disk_directory: "2010/11"
234 | container_id: 14
235 | digest: 8e0294de2441577c529f170b6fb8f638
236 | id: 18
237 | container_type: Issue
238 | description: ""
239 | filename: testテスト.png
240 | filesize: 2654
241 | author_id: 2
242 | attachments_019:
243 | content_type: image/png
244 | downloads: 0
245 | created_on: 2011-02-23 16:14:50 +09:00
246 | disk_filename: 101223161450_testfile_2.png
247 | disk_directory: "2010/12"
248 | container_id: 14
249 | digest: 6bc2963e8d7ea0d3e68d12d1fba3d6ca
250 | id: 19
251 | container_type: Issue
252 | description: ""
253 | filename: Testテスト.PNG
254 | filesize: 3582
255 | author_id: 2
256 | attachments_020:
257 | content_type: text/plain
258 | downloads: 0
259 | created_on: 2012-05-12 16:14:50 +09:00
260 | disk_filename: 120512161450_root_attachment.txt
261 | disk_directory:
262 | container_id: 14
263 | digest: b0fe2abdb2599743d554a61d7da7ff74
264 | id: 20
265 | container_type: Issue
266 | description: ""
267 | filename: root_attachment.txt
268 | filesize: 54
269 | author_id: 2
270 |
--------------------------------------------------------------------------------
/test/fixtures/custom_fields.yml:
--------------------------------------------------------------------------------
1 | ---
2 | custom_fields_001:
3 | name: Database
4 | regexp: ""
5 | is_for_all: true
6 | is_filter: true
7 | type: IssueCustomField
8 | possible_values:
9 | - MySQL
10 | - PostgreSQL
11 | - Oracle
12 | id: 1
13 | is_required: false
14 | field_format: list
15 | default_value: ""
16 | editable: true
17 | position: 2
18 | custom_fields_002:
19 | name: Searchable field
20 | min_length: 1
21 | regexp: ""
22 | is_for_all: true
23 | is_filter: true
24 | type: IssueCustomField
25 | max_length: 100
26 | possible_values: ""
27 | id: 2
28 | is_required: false
29 | field_format: string
30 | searchable: true
31 | default_value: "Default string"
32 | editable: true
33 | position: 1
34 | custom_fields_003:
35 | name: Development status
36 | regexp: ""
37 | is_for_all: false
38 | is_filter: true
39 | type: ProjectCustomField
40 | possible_values:
41 | - Stable
42 | - Beta
43 | - Alpha
44 | - Planning
45 | id: 3
46 | is_required: false
47 | field_format: list
48 | default_value: ""
49 | editable: true
50 | position: 1
51 | custom_fields_004:
52 | name: Phone number
53 | regexp: ""
54 | is_for_all: false
55 | type: UserCustomField
56 | possible_values: ""
57 | id: 4
58 | is_required: false
59 | field_format: string
60 | default_value: ""
61 | editable: true
62 | position: 1
63 | custom_fields_005:
64 | name: Money
65 | regexp: ""
66 | is_for_all: false
67 | type: UserCustomField
68 | possible_values: ""
69 | id: 5
70 | is_required: false
71 | field_format: float
72 | default_value: ""
73 | editable: true
74 | position: 2
75 | custom_fields_006:
76 | name: Float field
77 | regexp: ""
78 | is_for_all: true
79 | type: IssueCustomField
80 | possible_values: ""
81 | id: 6
82 | is_required: false
83 | field_format: float
84 | default_value: ""
85 | editable: true
86 | position: 3
87 | custom_fields_007:
88 | name: Billable
89 | regexp: ""
90 | is_for_all: false
91 | is_filter: true
92 | type: TimeEntryActivityCustomField
93 | possible_values: ""
94 | id: 7
95 | is_required: false
96 | field_format: bool
97 | default_value: ""
98 | editable: true
99 | position: 1
100 | custom_fields_008:
101 | name: Custom date
102 | regexp: ""
103 | is_for_all: true
104 | is_filter: false
105 | type: IssueCustomField
106 | possible_values: ""
107 | id: 8
108 | is_required: false
109 | field_format: date
110 | default_value: ""
111 | editable: true
112 | position: 4
113 | custom_fields_009:
114 | name: Project 1 cf
115 | regexp: ""
116 | is_for_all: false
117 | is_filter: true
118 | type: IssueCustomField
119 | possible_values: ""
120 | id: 9
121 | is_required: false
122 | field_format: date
123 | default_value: ""
124 | editable: true
125 | position: 5
126 | custom_fields_010:
127 | name: Overtime
128 | regexp: ""
129 | is_for_all: false
130 | is_filter: false
131 | type: TimeEntryCustomField
132 | possible_values: ""
133 | id: 10
134 | is_required: false
135 | field_format: bool
136 | default_value: 0
137 | editable: true
138 | position: 1
139 | custom_fields_011:
140 | id: 11
141 | name: Binary
142 | type: CustomField
143 | possible_values:
144 | - !binary |
145 | SGXDqWzDp2prc2Tigqw2NTTDuQ==
146 | - Other value
147 | field_format: list
148 |
--------------------------------------------------------------------------------
/test/fixtures/custom_fields_projects.yml:
--------------------------------------------------------------------------------
1 | ---
2 | custom_fields_projects_001:
3 | custom_field_id: 9
4 | project_id: 1
5 |
--------------------------------------------------------------------------------
/test/fixtures/custom_fields_trackers.yml:
--------------------------------------------------------------------------------
1 | ---
2 | custom_fields_trackers_001:
3 | custom_field_id: 1
4 | tracker_id: 1
5 | custom_fields_trackers_002:
6 | custom_field_id: 2
7 | tracker_id: 1
8 | custom_fields_trackers_003:
9 | custom_field_id: 2
10 | tracker_id: 3
11 | custom_fields_trackers_004:
12 | custom_field_id: 6
13 | tracker_id: 1
14 | custom_fields_trackers_005:
15 | custom_field_id: 6
16 | tracker_id: 2
17 | custom_fields_trackers_006:
18 | custom_field_id: 6
19 | tracker_id: 3
20 | custom_fields_trackers_007:
21 | custom_field_id: 8
22 | tracker_id: 1
23 | custom_fields_trackers_008:
24 | custom_field_id: 8
25 | tracker_id: 2
26 | custom_fields_trackers_009:
27 | custom_field_id: 8
28 | tracker_id: 3
29 |
--------------------------------------------------------------------------------
/test/fixtures/custom_values.yml:
--------------------------------------------------------------------------------
1 | ---
2 | custom_values_006:
3 | customized_type: Issue
4 | custom_field_id: 2
5 | customized_id: 3
6 | id: 6
7 | value: "125"
8 | custom_values_007:
9 | customized_type: Project
10 | custom_field_id: 3
11 | customized_id: 1
12 | id: 7
13 | value: Stable
14 | custom_values_001:
15 | customized_type: Principal
16 | custom_field_id: 4
17 | customized_id: 3
18 | id: 1
19 | value: ""
20 | custom_values_002:
21 | customized_type: Principal
22 | custom_field_id: 4
23 | customized_id: 4
24 | id: 2
25 | value: 01 23 45 67 89
26 | custom_values_003:
27 | customized_type: Principal
28 | custom_field_id: 4
29 | customized_id: 2
30 | id: 3
31 | value: "01 42 50 00 00"
32 | custom_values_004:
33 | customized_type: Issue
34 | custom_field_id: 2
35 | customized_id: 1
36 | id: 4
37 | value: "125"
38 | custom_values_005:
39 | customized_type: Issue
40 | custom_field_id: 2
41 | customized_id: 2
42 | id: 5
43 | value: ""
44 | custom_values_008:
45 | customized_type: Issue
46 | custom_field_id: 1
47 | customized_id: 3
48 | id: 8
49 | value: "MySQL"
50 | custom_values_009:
51 | customized_type: Issue
52 | custom_field_id: 2
53 | customized_id: 7
54 | id: 9
55 | value: "this is a stringforcustomfield search"
56 | custom_values_010:
57 | customized_type: Issue
58 | custom_field_id: 6
59 | customized_id: 1
60 | id: 10
61 | value: "2.1"
62 | custom_values_011:
63 | customized_type: Issue
64 | custom_field_id: 6
65 | customized_id: 2
66 | id: 11
67 | value: "2.05"
68 | custom_values_012:
69 | customized_type: Issue
70 | custom_field_id: 6
71 | customized_id: 3
72 | id: 12
73 | value: "11.65"
74 | custom_values_013:
75 | customized_type: Issue
76 | custom_field_id: 6
77 | customized_id: 7
78 | id: 13
79 | value: ""
80 | custom_values_014:
81 | customized_type: Issue
82 | custom_field_id: 6
83 | customized_id: 5
84 | id: 14
85 | value: "-7.6"
86 | custom_values_015:
87 | customized_type: Enumeration
88 | custom_field_id: 7
89 | customized_id: 10
90 | id: 15
91 | value: true
92 | custom_values_016:
93 | customized_type: Enumeration
94 | custom_field_id: 7
95 | customized_id: 11
96 | id: 16
97 | value: '1'
98 | custom_values_017:
99 | customized_type: Issue
100 | custom_field_id: 8
101 | customized_id: 1
102 | id: 17
103 | value: '2009-12-01'
104 |
--------------------------------------------------------------------------------
/test/fixtures/enabled_modules.yml:
--------------------------------------------------------------------------------
1 | ---
2 | enabled_modules_001:
3 | name: issue_tracking
4 | project_id: 1
5 | id: 1
6 | enabled_modules_002:
7 | name: time_tracking
8 | project_id: 1
9 | id: 2
10 | enabled_modules_003:
11 | name: news
12 | project_id: 1
13 | id: 3
14 | enabled_modules_004:
15 | name: documents
16 | project_id: 1
17 | id: 4
18 | enabled_modules_005:
19 | name: files
20 | project_id: 1
21 | id: 5
22 | enabled_modules_006:
23 | name: wiki
24 | project_id: 1
25 | id: 6
26 | enabled_modules_007:
27 | name: repository
28 | project_id: 1
29 | id: 7
30 | enabled_modules_008:
31 | name: boards
32 | project_id: 1
33 | id: 8
34 | enabled_modules_009:
35 | name: repository
36 | project_id: 3
37 | id: 9
38 | enabled_modules_010:
39 | name: wiki
40 | project_id: 3
41 | id: 10
42 | enabled_modules_011:
43 | name: issue_tracking
44 | project_id: 2
45 | id: 11
46 | enabled_modules_012:
47 | name: time_tracking
48 | project_id: 3
49 | id: 12
50 | enabled_modules_013:
51 | name: issue_tracking
52 | project_id: 3
53 | id: 13
54 | enabled_modules_014:
55 | name: issue_tracking
56 | project_id: 5
57 | id: 14
58 | enabled_modules_015:
59 | name: wiki
60 | project_id: 2
61 | id: 15
62 | enabled_modules_016:
63 | name: boards
64 | project_id: 2
65 | id: 16
66 | enabled_modules_017:
67 | name: calendar
68 | project_id: 1
69 | id: 17
70 | enabled_modules_018:
71 | name: gantt
72 | project_id: 1
73 | id: 18
74 | enabled_modules_019:
75 | name: calendar
76 | project_id: 2
77 | id: 19
78 | enabled_modules_020:
79 | name: gantt
80 | project_id: 2
81 | id: 20
82 | enabled_modules_021:
83 | name: calendar
84 | project_id: 3
85 | id: 21
86 | enabled_modules_022:
87 | name: gantt
88 | project_id: 3
89 | id: 22
90 | enabled_modules_023:
91 | name: calendar
92 | project_id: 5
93 | id: 23
94 | enabled_modules_024:
95 | name: gantt
96 | project_id: 5
97 | id: 24
98 | enabled_modules_025:
99 | name: news
100 | project_id: 2
101 | id: 25
102 | enabled_modules_026:
103 | name: repository
104 | project_id: 2
105 | id: 26
106 |
--------------------------------------------------------------------------------
/test/fixtures/enumerations.yml:
--------------------------------------------------------------------------------
1 | ---
2 | enumerations_001:
3 | name: Uncategorized
4 | id: 1
5 | type: DocumentCategory
6 | active: true
7 | position: 1
8 | enumerations_002:
9 | name: User documentation
10 | id: 2
11 | type: DocumentCategory
12 | active: true
13 | position: 2
14 | enumerations_003:
15 | name: Technical documentation
16 | id: 3
17 | type: DocumentCategory
18 | active: true
19 | position: 3
20 | enumerations_004:
21 | name: Low
22 | id: 4
23 | type: IssuePriority
24 | active: true
25 | position: 1
26 | position_name: lowest
27 | enumerations_005:
28 | name: Normal
29 | id: 5
30 | type: IssuePriority
31 | is_default: true
32 | active: true
33 | position: 2
34 | position_name: default
35 | enumerations_006:
36 | name: High
37 | id: 6
38 | type: IssuePriority
39 | active: true
40 | position: 3
41 | position_name: high3
42 | enumerations_007:
43 | name: Urgent
44 | id: 7
45 | type: IssuePriority
46 | active: true
47 | position: 4
48 | position_name: high2
49 | enumerations_008:
50 | name: Immediate
51 | id: 8
52 | type: IssuePriority
53 | active: true
54 | position: 5
55 | position_name: highest
56 | enumerations_009:
57 | name: Design
58 | id: 9
59 | type: TimeEntryActivity
60 | position: 1
61 | active: true
62 | enumerations_010:
63 | name: Development
64 | id: 10
65 | type: TimeEntryActivity
66 | position: 2
67 | is_default: true
68 | active: true
69 | enumerations_011:
70 | name: QA
71 | id: 11
72 | type: TimeEntryActivity
73 | position: 3
74 | active: true
75 | enumerations_012:
76 | name: Default Enumeration
77 | id: 12
78 | type: Enumeration
79 | is_default: true
80 | active: true
81 | enumerations_013:
82 | name: Another Enumeration
83 | id: 13
84 | type: Enumeration
85 | active: true
86 | enumerations_014:
87 | name: Inactive Activity
88 | id: 14
89 | type: TimeEntryActivity
90 | position: 4
91 | active: false
92 | enumerations_015:
93 | name: Inactive Priority
94 | id: 15
95 | type: IssuePriority
96 | position: 6
97 | active: false
98 | enumerations_016:
99 | name: Inactive Document Category
100 | id: 16
101 | type: DocumentCategory
102 | active: false
103 | position: 4
104 |
--------------------------------------------------------------------------------
/test/fixtures/issue_categories.yml:
--------------------------------------------------------------------------------
1 | ---
2 | issue_categories_001:
3 | name: Printing
4 | project_id: 1
5 | assigned_to_id: 2
6 | id: 1
7 | issue_categories_002:
8 | name: Recipes
9 | project_id: 1
10 | assigned_to_id:
11 | id: 2
12 | issue_categories_003:
13 | name: Stock management
14 | project_id: 2
15 | assigned_to_id:
16 | id: 3
17 | issue_categories_004:
18 | name: Printing
19 | project_id: 2
20 | assigned_to_id:
21 | id: 4
22 |
--------------------------------------------------------------------------------
/test/fixtures/issue_statuses.yml:
--------------------------------------------------------------------------------
1 | ---
2 | issue_statuses_001:
3 | id: 1
4 | name: New
5 | is_default: true
6 | is_closed: false
7 | position: 1
8 | issue_statuses_002:
9 | id: 2
10 | name: Assigned
11 | is_default: false
12 | is_closed: false
13 | position: 2
14 | issue_statuses_003:
15 | id: 3
16 | name: Resolved
17 | is_default: false
18 | is_closed: false
19 | position: 3
20 | issue_statuses_004:
21 | name: Feedback
22 | id: 4
23 | is_default: false
24 | is_closed: false
25 | position: 4
26 | issue_statuses_005:
27 | id: 5
28 | name: Closed
29 | is_default: false
30 | is_closed: true
31 | position: 5
32 | issue_statuses_006:
33 | id: 6
34 | name: Rejected
35 | is_default: false
36 | is_closed: true
37 | position: 6
38 |
--------------------------------------------------------------------------------
/test/fixtures/issues.yml:
--------------------------------------------------------------------------------
1 | ---
2 | issues_001:
3 | created_on: <%= 3.days.ago.to_s(:db) %>
4 | project_id: 1
5 | updated_on: <%= 1.day.ago.to_s(:db) %>
6 | priority_id: 4
7 | subject: Can't print recipes
8 | id: 1
9 | fixed_version_id:
10 | category_id: 1
11 | description: Unable to print recipes
12 | tracker_id: 1
13 | assigned_to_id:
14 | author_id: 2
15 | status_id: 1
16 | start_date: <%= 1.day.ago.to_date.to_s(:db) %>
17 | due_date: <%= 10.day.from_now.to_date.to_s(:db) %>
18 | root_id: 1
19 | lft: 1
20 | rgt: 2
21 | lock_version: 3
22 | issues_002:
23 | created_on: 2006-07-19 21:04:21 +02:00
24 | project_id: 1
25 | updated_on: 2006-07-19 21:09:50 +02:00
26 | priority_id: 5
27 | subject: Add ingredients categories
28 | id: 2
29 | fixed_version_id: 2
30 | category_id:
31 | description: Ingredients of the recipe should be classified by categories
32 | tracker_id: 2
33 | assigned_to_id: 3
34 | author_id: 2
35 | status_id: 2
36 | start_date: <%= 2.day.ago.to_date.to_s(:db) %>
37 | due_date:
38 | root_id: 2
39 | lft: 1
40 | rgt: 2
41 | lock_version: 3
42 | done_ratio: 30
43 | issues_003:
44 | created_on: 2006-07-19 21:07:27 +02:00
45 | project_id: 1
46 | updated_on: 2006-07-19 21:07:27 +02:00
47 | priority_id: 4
48 | subject: Error 281 when updating a recipe
49 | id: 3
50 | fixed_version_id:
51 | category_id:
52 | description: Error 281 is encountered when saving a recipe
53 | tracker_id: 1
54 | assigned_to_id: 3
55 | author_id: 2
56 | status_id: 1
57 | start_date: <%= 15.day.ago.to_date.to_s(:db) %>
58 | due_date: <%= 5.day.ago.to_date.to_s(:db) %>
59 | root_id: 3
60 | lft: 1
61 | rgt: 2
62 | issues_004:
63 | created_on: <%= 5.days.ago.to_s(:db) %>
64 | project_id: 2
65 | updated_on: <%= 2.days.ago.to_s(:db) %>
66 | priority_id: 4
67 | subject: Issue on project 2
68 | id: 4
69 | fixed_version_id:
70 | category_id:
71 | description: Issue on project 2
72 | tracker_id: 1
73 | assigned_to_id: 2
74 | author_id: 2
75 | status_id: 1
76 | root_id: 4
77 | lft: 1
78 | rgt: 2
79 | issues_005:
80 | created_on: <%= 5.days.ago.to_s(:db) %>
81 | project_id: 3
82 | updated_on: <%= 2.days.ago.to_s(:db) %>
83 | priority_id: 4
84 | subject: Subproject issue
85 | id: 5
86 | fixed_version_id:
87 | category_id:
88 | description: This is an issue on a cookbook subproject
89 | tracker_id: 1
90 | assigned_to_id:
91 | author_id: 2
92 | status_id: 1
93 | root_id: 5
94 | lft: 1
95 | rgt: 2
96 | issues_006:
97 | created_on: <%= 1.minute.ago.to_s(:db) %>
98 | project_id: 5
99 | updated_on: <%= 1.minute.ago.to_s(:db) %>
100 | priority_id: 4
101 | subject: Issue of a private subproject
102 | id: 6
103 | fixed_version_id:
104 | category_id:
105 | description: This is an issue of a private subproject of cookbook
106 | tracker_id: 1
107 | assigned_to_id:
108 | author_id: 2
109 | status_id: 1
110 | start_date: <%= Date.today.to_s(:db) %>
111 | due_date: <%= 1.days.from_now.to_date.to_s(:db) %>
112 | root_id: 6
113 | lft: 1
114 | rgt: 2
115 | issues_007:
116 | created_on: <%= 10.days.ago.to_s(:db) %>
117 | project_id: 1
118 | updated_on: <%= 10.days.ago.to_s(:db) %>
119 | priority_id: 5
120 | subject: Issue due today
121 | id: 7
122 | fixed_version_id:
123 | category_id:
124 | description: This is an issue that is due today
125 | tracker_id: 1
126 | assigned_to_id:
127 | author_id: 2
128 | status_id: 1
129 | start_date: <%= 10.days.ago.to_s(:db) %>
130 | due_date: <%= Date.today.to_s(:db) %>
131 | lock_version: 0
132 | root_id: 7
133 | lft: 1
134 | rgt: 2
135 | issues_008:
136 | created_on: <%= 10.days.ago.to_s(:db) %>
137 | project_id: 1
138 | updated_on: <%= 10.days.ago.to_s(:db) %>
139 | priority_id: 5
140 | subject: Closed issue
141 | id: 8
142 | fixed_version_id:
143 | category_id:
144 | description: This is a closed issue.
145 | tracker_id: 1
146 | assigned_to_id:
147 | author_id: 2
148 | status_id: 5
149 | start_date:
150 | due_date:
151 | lock_version: 0
152 | root_id: 8
153 | lft: 1
154 | rgt: 2
155 | closed_on: <%= 3.days.ago.to_s(:db) %>
156 | issues_009:
157 | created_on: <%= 1.minute.ago.to_s(:db) %>
158 | project_id: 5
159 | updated_on: <%= 1.minute.ago.to_s(:db) %>
160 | priority_id: 5
161 | subject: Blocked Issue
162 | id: 9
163 | fixed_version_id:
164 | category_id:
165 | description: This is an issue that is blocked by issue #10
166 | tracker_id: 1
167 | assigned_to_id:
168 | author_id: 2
169 | status_id: 1
170 | start_date: <%= Date.today.to_s(:db) %>
171 | due_date: <%= 1.days.from_now.to_date.to_s(:db) %>
172 | root_id: 9
173 | lft: 1
174 | rgt: 2
175 | issues_010:
176 | created_on: <%= 1.minute.ago.to_s(:db) %>
177 | project_id: 5
178 | updated_on: <%= 1.minute.ago.to_s(:db) %>
179 | priority_id: 5
180 | subject: Issue Doing the Blocking
181 | id: 10
182 | fixed_version_id:
183 | category_id:
184 | description: This is an issue that blocks issue #9
185 | tracker_id: 1
186 | assigned_to_id:
187 | author_id: 2
188 | status_id: 1
189 | start_date: <%= Date.today.to_s(:db) %>
190 | due_date: <%= 1.days.from_now.to_date.to_s(:db) %>
191 | root_id: 10
192 | lft: 1
193 | rgt: 2
194 | issues_011:
195 | created_on: <%= 3.days.ago.to_s(:db) %>
196 | project_id: 1
197 | updated_on: <%= 1.day.ago.to_s(:db) %>
198 | priority_id: 5
199 | subject: Closed issue on a closed version
200 | id: 11
201 | fixed_version_id: 1
202 | category_id: 1
203 | description:
204 | tracker_id: 1
205 | assigned_to_id:
206 | author_id: 2
207 | status_id: 5
208 | start_date: <%= 1.day.ago.to_date.to_s(:db) %>
209 | due_date:
210 | root_id: 11
211 | lft: 1
212 | rgt: 2
213 | closed_on: <%= 1.day.ago.to_s(:db) %>
214 | issues_012:
215 | created_on: <%= 3.days.ago.to_s(:db) %>
216 | project_id: 1
217 | updated_on: <%= 1.day.ago.to_s(:db) %>
218 | priority_id: 5
219 | subject: Closed issue on a locked version
220 | id: 12
221 | fixed_version_id: 2
222 | category_id: 1
223 | description:
224 | tracker_id: 1
225 | assigned_to_id:
226 | author_id: 3
227 | status_id: 5
228 | start_date: <%= 1.day.ago.to_date.to_s(:db) %>
229 | due_date:
230 | root_id: 12
231 | lft: 1
232 | rgt: 2
233 | closed_on: <%= 1.day.ago.to_s(:db) %>
234 | issues_013:
235 | created_on: <%= 5.days.ago.to_s(:db) %>
236 | project_id: 3
237 | updated_on: <%= 2.days.ago.to_s(:db) %>
238 | priority_id: 4
239 | subject: Subproject issue two
240 | id: 13
241 | fixed_version_id:
242 | category_id:
243 | description: This is a second issue on a cookbook subproject
244 | tracker_id: 1
245 | assigned_to_id:
246 | author_id: 2
247 | status_id: 1
248 | root_id: 13
249 | lft: 1
250 | rgt: 2
251 | issues_014:
252 | id: 14
253 | created_on: <%= 15.days.ago.to_s(:db) %>
254 | project_id: 3
255 | updated_on: <%= 15.days.ago.to_s(:db) %>
256 | priority_id: 5
257 | subject: Private issue on public project
258 | fixed_version_id:
259 | category_id:
260 | description: This is a private issue
261 | tracker_id: 1
262 | assigned_to_id:
263 | author_id: 2
264 | status_id: 1
265 | is_private: true
266 | root_id: 14
267 | lft: 1
268 | rgt: 2
269 |
--------------------------------------------------------------------------------
/test/fixtures/journal_details.yml:
--------------------------------------------------------------------------------
1 | ---
2 | journal_details_001:
3 | old_value: "1"
4 | property: attr
5 | id: 1
6 | value: "2"
7 | prop_key: status_id
8 | journal_id: 1
9 | journal_details_002:
10 | old_value: "40"
11 | property: attr
12 | id: 2
13 | value: "30"
14 | prop_key: done_ratio
15 | journal_id: 1
16 | journal_details_003:
17 | old_value:
18 | property: attr
19 | id: 3
20 | value: "6"
21 | prop_key: fixed_version_id
22 | journal_id: 4
23 | journal_details_004:
24 | old_value: "This word was removed and an other was"
25 | property: attr
26 | id: 4
27 | value: "This word was and an other was added"
28 | prop_key: description
29 | journal_id: 3
30 | journal_details_005:
31 | old_value: Old value
32 | property: cf
33 | id: 5
34 | value: New value
35 | prop_key: 2
36 | journal_id: 3
37 | journal_details_006:
38 | old_value:
39 | property: attachment
40 | id: 6
41 | value: 060719210727_picture.jpg
42 | prop_key: 4
43 | journal_id: 3
44 |
--------------------------------------------------------------------------------
/test/fixtures/journals.yml:
--------------------------------------------------------------------------------
1 | ---
2 | journals_001:
3 | created_on: <%= 2.days.ago.to_date.to_s(:db) %>
4 | notes: "Journal notes"
5 | id: 1
6 | journalized_type: Issue
7 | user_id: 1
8 | journalized_id: 1
9 | journals_002:
10 | created_on: <%= 1.days.ago.to_date.to_s(:db) %>
11 | notes: "Some notes with Redmine links: #2, r2."
12 | id: 2
13 | journalized_type: Issue
14 | user_id: 2
15 | journalized_id: 1
16 | journals_003:
17 | created_on: <%= 1.days.ago.to_date.to_s(:db) %>
18 | notes: "A comment with inline image: !picture.jpg! and a reference to #1 and r2."
19 | id: 3
20 | journalized_type: Issue
21 | user_id: 2
22 | journalized_id: 2
23 | journals_004:
24 | created_on: <%= 1.days.ago.to_date.to_s(:db) %>
25 | notes: "A comment with a private version."
26 | id: 4
27 | journalized_type: Issue
28 | user_id: 1
29 | journalized_id: 6
30 | journals_005:
31 | id: 5
32 | created_on: <%= 1.days.ago.to_date.to_s(:db) %>
33 | notes: "A comment on a private issue."
34 | user_id: 2
35 | journalized_type: Issue
36 | journalized_id: 14
37 |
--------------------------------------------------------------------------------
/test/fixtures/member_roles.yml:
--------------------------------------------------------------------------------
1 | ---
2 | member_roles_001:
3 | id: 1
4 | role_id: 1
5 | member_id: 1
6 | member_roles_002:
7 | id: 2
8 | role_id: 2
9 | member_id: 2
10 | member_roles_003:
11 | id: 3
12 | role_id: 2
13 | member_id: 3
14 | member_roles_004:
15 | id: 4
16 | role_id: 2
17 | member_id: 4
18 | member_roles_005:
19 | id: 5
20 | role_id: 1
21 | member_id: 5
22 | member_roles_006:
23 | id: 6
24 | role_id: 1
25 | member_id: 6
26 | member_roles_007:
27 | id: 7
28 | role_id: 2
29 | member_id: 6
30 | member_roles_008:
31 | id: 8
32 | role_id: 1
33 | member_id: 7
34 | inherited_from: 6
35 | member_roles_009:
36 | id: 9
37 | role_id: 2
38 | member_id: 7
39 | inherited_from: 7
40 | member_roles_010:
41 | id: 10
42 | role_id: 2
43 | member_id: 9
44 | inherited_from:
45 | member_roles_011:
46 | id: 11
47 | role_id: 2
48 | member_id: 10
49 | inherited_from: 10
50 |
--------------------------------------------------------------------------------
/test/fixtures/members.yml:
--------------------------------------------------------------------------------
1 | ---
2 | members_001:
3 | created_on: 2006-07-19 19:35:33 +02:00
4 | project_id: 1
5 | id: 1
6 | user_id: 2
7 | mail_notification: true
8 | members_002:
9 | created_on: 2006-07-19 19:35:36 +02:00
10 | project_id: 1
11 | id: 2
12 | user_id: 3
13 | mail_notification: true
14 | members_003:
15 | created_on: 2006-07-19 19:35:36 +02:00
16 | project_id: 2
17 | id: 3
18 | user_id: 2
19 | mail_notification: true
20 | members_004:
21 | id: 4
22 | created_on: 2006-07-19 19:35:36 +02:00
23 | project_id: 1
24 | # Locked user
25 | user_id: 5
26 | mail_notification: true
27 | members_005:
28 | id: 5
29 | created_on: 2006-07-19 19:35:33 +02:00
30 | project_id: 5
31 | user_id: 2
32 | mail_notification: true
33 | members_006:
34 | id: 6
35 | created_on: 2006-07-19 19:35:33 +02:00
36 | project_id: 5
37 | user_id: 10
38 | mail_notification: false
39 | members_007:
40 | id: 7
41 | created_on: 2006-07-19 19:35:33 +02:00
42 | project_id: 5
43 | user_id: 8
44 | mail_notification: false
45 | members_008:
46 | created_on: 2006-07-19 19:35:33 +02:00
47 | project_id: 5
48 | id: 8
49 | user_id: 1
50 | mail_notification: true
51 | members_009:
52 | id: 9
53 | created_on: 2006-07-19 19:35:33 +02:00
54 | project_id: 2
55 | user_id: 11
56 | mail_notification: false
57 | members_010:
58 | id: 10
59 | created_on: 2006-07-19 19:35:33 +02:00
60 | project_id: 2
61 | user_id: 8
62 | mail_notification: false
63 |
--------------------------------------------------------------------------------
/test/fixtures/projects.yml:
--------------------------------------------------------------------------------
1 | ---
2 | projects_001:
3 | created_on: 2006-07-19 19:13:59 +02:00
4 | name: eCookbook
5 | updated_on: 2006-07-19 22:53:01 +02:00
6 | id: 1
7 | description: Recipes management application
8 | homepage: http://ecookbook.somenet.foo/
9 | is_public: true
10 | identifier: ecookbook
11 | parent_id:
12 | lft: 1
13 | rgt: 10
14 | projects_002:
15 | created_on: 2006-07-19 19:14:19 +02:00
16 | name: OnlineStore
17 | updated_on: 2006-07-19 19:14:19 +02:00
18 | id: 2
19 | description: E-commerce web site
20 | homepage: ""
21 | is_public: false
22 | identifier: onlinestore
23 | parent_id:
24 | lft: 11
25 | rgt: 12
26 | projects_003:
27 | created_on: 2006-07-19 19:15:21 +02:00
28 | name: eCookbook Subproject 1
29 | updated_on: 2006-07-19 19:18:12 +02:00
30 | id: 3
31 | description: eCookBook Subproject 1
32 | homepage: ""
33 | is_public: true
34 | identifier: subproject1
35 | parent_id: 1
36 | lft: 6
37 | rgt: 7
38 | projects_004:
39 | created_on: 2006-07-19 19:15:51 +02:00
40 | name: eCookbook Subproject 2
41 | updated_on: 2006-07-19 19:17:07 +02:00
42 | id: 4
43 | description: eCookbook Subproject 2
44 | homepage: ""
45 | is_public: true
46 | identifier: subproject2
47 | parent_id: 1
48 | lft: 8
49 | rgt: 9
50 | projects_005:
51 | created_on: 2006-07-19 19:15:51 +02:00
52 | name: Private child of eCookbook
53 | updated_on: 2006-07-19 19:17:07 +02:00
54 | id: 5
55 | description: This is a private subproject of a public project
56 | homepage: ""
57 | is_public: false
58 | identifier: private-child
59 | parent_id: 1
60 | lft: 2
61 | rgt: 5
62 | projects_006:
63 | created_on: 2006-07-19 19:15:51 +02:00
64 | name: Child of private child
65 | updated_on: 2006-07-19 19:17:07 +02:00
66 | id: 6
67 | description: This is a public subproject of a private project
68 | homepage: ""
69 | is_public: true
70 | identifier: project6
71 | parent_id: 5
72 | lft: 3
73 | rgt: 4
74 |
--------------------------------------------------------------------------------
/test/fixtures/projects_trackers.yml:
--------------------------------------------------------------------------------
1 | ---
2 | projects_trackers_001:
3 | project_id: 4
4 | tracker_id: 3
5 | projects_trackers_002:
6 | project_id: 1
7 | tracker_id: 1
8 | projects_trackers_003:
9 | project_id: 5
10 | tracker_id: 1
11 | projects_trackers_004:
12 | project_id: 1
13 | tracker_id: 2
14 | projects_trackers_005:
15 | project_id: 5
16 | tracker_id: 2
17 | projects_trackers_006:
18 | project_id: 5
19 | tracker_id: 3
20 | projects_trackers_007:
21 | project_id: 2
22 | tracker_id: 1
23 | projects_trackers_008:
24 | project_id: 2
25 | tracker_id: 2
26 | projects_trackers_009:
27 | project_id: 2
28 | tracker_id: 3
29 | projects_trackers_010:
30 | project_id: 3
31 | tracker_id: 2
32 | projects_trackers_011:
33 | project_id: 3
34 | tracker_id: 3
35 | projects_trackers_012:
36 | project_id: 4
37 | tracker_id: 1
38 | projects_trackers_013:
39 | project_id: 4
40 | tracker_id: 2
41 | projects_trackers_014:
42 | project_id: 1
43 | tracker_id: 3
44 | projects_trackers_015:
45 | project_id: 6
46 | tracker_id: 1
47 |
--------------------------------------------------------------------------------
/test/fixtures/queries.yml:
--------------------------------------------------------------------------------
1 | ---
2 | queries_001:
3 | id: 1
4 | type: IssueQuery
5 | project_id: 1
6 | visibility: 2
7 | name: Multiple custom fields query
8 | filters: |
9 | ---
10 | cf_1:
11 | :values:
12 | - MySQL
13 | :operator: "="
14 | status_id:
15 | :values:
16 | - "1"
17 | :operator: o
18 | cf_2:
19 | :values:
20 | - "125"
21 | :operator: "="
22 |
23 | user_id: 1
24 | column_names:
25 | queries_002:
26 | id: 2
27 | type: IssueQuery
28 | project_id: 1
29 | visibility: 0
30 | name: Private query for cookbook
31 | filters: |
32 | ---
33 | tracker_id:
34 | :values:
35 | - "3"
36 | :operator: "="
37 | status_id:
38 | :values:
39 | - "1"
40 | :operator: o
41 |
42 | user_id: 3
43 | column_names:
44 | queries_003:
45 | id: 3
46 | type: IssueQuery
47 | project_id:
48 | visibility: 0
49 | name: Private query for all projects
50 | filters: |
51 | ---
52 | tracker_id:
53 | :values:
54 | - "3"
55 | :operator: "="
56 |
57 | user_id: 3
58 | column_names:
59 | queries_004:
60 | id: 4
61 | type: IssueQuery
62 | project_id:
63 | visibility: 2
64 | name: Public query for all projects
65 | filters: |
66 | ---
67 | tracker_id:
68 | :values:
69 | - "3"
70 | :operator: "="
71 |
72 | user_id: 2
73 | column_names:
74 | queries_005:
75 | id: 5
76 | type: IssueQuery
77 | project_id:
78 | visibility: 2
79 | name: Open issues by priority and tracker
80 | filters: |
81 | ---
82 | status_id:
83 | :values:
84 | - "1"
85 | :operator: o
86 |
87 | user_id: 1
88 | column_names:
89 | sort_criteria: |
90 | ---
91 | - - priority
92 | - desc
93 | - - tracker
94 | - asc
95 | queries_006:
96 | id: 6
97 | type: IssueQuery
98 | project_id:
99 | visibility: 2
100 | name: Open issues grouped by tracker
101 | filters: |
102 | ---
103 | status_id:
104 | :values:
105 | - "1"
106 | :operator: o
107 |
108 | user_id: 1
109 | column_names:
110 | group_by: tracker
111 | sort_criteria: |
112 | ---
113 | - - priority
114 | - desc
115 | queries_007:
116 | id: 7
117 | type: IssueQuery
118 | project_id: 2
119 | visibility: 2
120 | name: Public query for project 2
121 | filters: |
122 | ---
123 | tracker_id:
124 | :values:
125 | - "3"
126 | :operator: "="
127 |
128 | user_id: 2
129 | column_names:
130 | queries_008:
131 | id: 8
132 | type: IssueQuery
133 | project_id: 2
134 | visibility: 0
135 | name: Private query for project 2
136 | filters: |
137 | ---
138 | tracker_id:
139 | :values:
140 | - "3"
141 | :operator: "="
142 |
143 | user_id: 2
144 | column_names:
145 | queries_009:
146 | id: 9
147 | type: IssueQuery
148 | project_id:
149 | visibility: 2
150 | name: Open issues grouped by list custom field
151 | filters: |
152 | ---
153 | status_id:
154 | :values:
155 | - "1"
156 | :operator: o
157 |
158 | user_id: 1
159 | column_names:
160 | group_by: cf_1
161 | sort_criteria: |
162 | ---
163 | - - priority
164 | - desc
165 |
166 |
--------------------------------------------------------------------------------
/test/fixtures/risk_statuses.yml:
--------------------------------------------------------------------------------
1 | ---
2 | risk_statuses_001:
3 | id: 1
4 | name: Risk status title
5 | color: '#000000'
6 | status_type: 'open'
7 | is_default: false
--------------------------------------------------------------------------------
/test/fixtures/risks.yml:
--------------------------------------------------------------------------------
1 | ---
2 | risks_001:
3 | id: 1
4 | title: Risk title
5 | description: Description for Risk
6 | probability: 2
7 | impact: 4
8 | criticality: 4
9 | rationale: Monitor
10 | project_id: 1
11 | user_id: 1
12 |
--------------------------------------------------------------------------------
/test/fixtures/roles.yml:
--------------------------------------------------------------------------------
1 | ---
2 | roles_001:
3 | name: Manager
4 | id: 1
5 | builtin: 0
6 | issues_visibility: all
7 | permissions: |
8 | ---
9 | - :add_project
10 | - :edit_project
11 | - :close_project
12 | - :select_project_modules
13 | - :manage_members
14 | - :manage_versions
15 | - :manage_categories
16 | - :view_issues
17 | - :add_issues
18 | - :edit_issues
19 | - :manage_issue_relations
20 | - :manage_subtasks
21 | - :add_issue_notes
22 | - :move_issues
23 | - :delete_issues
24 | - :view_issue_watchers
25 | - :add_issue_watchers
26 | - :set_issues_private
27 | - :set_notes_private
28 | - :view_private_notes
29 | - :delete_issue_watchers
30 | - :manage_public_queries
31 | - :save_queries
32 | - :view_gantt
33 | - :view_calendar
34 | - :log_time
35 | - :view_time_entries
36 | - :edit_time_entries
37 | - :delete_time_entries
38 | - :manage_news
39 | - :comment_news
40 | - :view_documents
41 | - :add_documents
42 | - :edit_documents
43 | - :delete_documents
44 | - :view_wiki_pages
45 | - :export_wiki_pages
46 | - :view_wiki_edits
47 | - :edit_wiki_pages
48 | - :delete_wiki_pages_attachments
49 | - :protect_wiki_pages
50 | - :delete_wiki_pages
51 | - :rename_wiki_pages
52 | - :add_messages
53 | - :edit_messages
54 | - :delete_messages
55 | - :manage_boards
56 | - :view_files
57 | - :manage_files
58 | - :browse_repository
59 | - :manage_repository
60 | - :view_changesets
61 | - :manage_related_issues
62 | - :manage_project_activities
63 |
64 | position: 1
65 | roles_002:
66 | name: Developer
67 | id: 2
68 | builtin: 0
69 | issues_visibility: default
70 | permissions: |
71 | ---
72 | - :edit_project
73 | - :manage_members
74 | - :manage_versions
75 | - :manage_categories
76 | - :view_issues
77 | - :add_issues
78 | - :edit_issues
79 | - :manage_issue_relations
80 | - :manage_subtasks
81 | - :add_issue_notes
82 | - :move_issues
83 | - :delete_issues
84 | - :view_issue_watchers
85 | - :save_queries
86 | - :view_gantt
87 | - :view_calendar
88 | - :log_time
89 | - :view_time_entries
90 | - :edit_own_time_entries
91 | - :manage_news
92 | - :comment_news
93 | - :view_documents
94 | - :add_documents
95 | - :edit_documents
96 | - :delete_documents
97 | - :view_wiki_pages
98 | - :view_wiki_edits
99 | - :edit_wiki_pages
100 | - :protect_wiki_pages
101 | - :delete_wiki_pages
102 | - :add_messages
103 | - :edit_own_messages
104 | - :delete_own_messages
105 | - :manage_boards
106 | - :view_files
107 | - :manage_files
108 | - :browse_repository
109 | - :view_changesets
110 |
111 | position: 2
112 | roles_003:
113 | name: Reporter
114 | id: 3
115 | builtin: 0
116 | issues_visibility: default
117 | permissions: |
118 | ---
119 | - :edit_project
120 | - :manage_members
121 | - :manage_versions
122 | - :manage_categories
123 | - :view_issues
124 | - :add_issues
125 | - :edit_issues
126 | - :manage_issue_relations
127 | - :add_issue_notes
128 | - :move_issues
129 | - :view_issue_watchers
130 | - :save_queries
131 | - :view_gantt
132 | - :view_calendar
133 | - :log_time
134 | - :view_time_entries
135 | - :manage_news
136 | - :comment_news
137 | - :view_documents
138 | - :add_documents
139 | - :edit_documents
140 | - :delete_documents
141 | - :view_wiki_pages
142 | - :view_wiki_edits
143 | - :edit_wiki_pages
144 | - :delete_wiki_pages
145 | - :add_messages
146 | - :manage_boards
147 | - :view_files
148 | - :manage_files
149 | - :browse_repository
150 | - :view_changesets
151 |
152 | position: 3
153 | roles_004:
154 | name: Non member
155 | id: 4
156 | builtin: 1
157 | issues_visibility: default
158 | permissions: |
159 | ---
160 | - :view_issues
161 | - :add_issues
162 | - :edit_issues
163 | - :manage_issue_relations
164 | - :add_issue_notes
165 | - :save_queries
166 | - :view_gantt
167 | - :view_calendar
168 | - :log_time
169 | - :view_time_entries
170 | - :comment_news
171 | - :view_documents
172 | - :view_wiki_pages
173 | - :view_wiki_edits
174 | - :edit_wiki_pages
175 | - :add_messages
176 | - :view_files
177 | - :manage_files
178 | - :browse_repository
179 | - :view_changesets
180 |
181 | position: 4
182 | roles_005:
183 | name: Anonymous
184 | id: 5
185 | builtin: 2
186 | issues_visibility: default
187 | permissions: |
188 | ---
189 | - :view_issues
190 | - :add_issue_notes
191 | - :view_gantt
192 | - :view_calendar
193 | - :view_time_entries
194 | - :view_documents
195 | - :view_wiki_pages
196 | - :view_wiki_edits
197 | - :view_files
198 | - :browse_repository
199 | - :view_changesets
200 |
201 | position: 5
202 |
203 |
--------------------------------------------------------------------------------
/test/fixtures/time_entries.yml:
--------------------------------------------------------------------------------
1 | ---
2 | time_entries_001:
3 | created_on: 2007-03-23 12:54:18 +01:00
4 | tweek: 12
5 | tmonth: 3
6 | project_id: 1
7 | comments: My hours
8 | updated_on: 2007-03-23 12:54:18 +01:00
9 | activity_id: 9
10 | spent_on: 2007-03-23
11 | issue_id: 1
12 | id: 1
13 | hours: 4.25
14 | user_id: 2
15 | tyear: 2007
16 | time_entries_002:
17 | created_on: 2007-03-23 14:11:04 +01:00
18 | tweek: 11
19 | tmonth: 3
20 | project_id: 1
21 | comments: ""
22 | updated_on: 2007-03-23 14:11:04 +01:00
23 | activity_id: 9
24 | spent_on: 2007-03-12
25 | issue_id: 1
26 | id: 2
27 | hours: 150.0
28 | user_id: 1
29 | tyear: 2007
30 | time_entries_003:
31 | created_on: 2007-04-21 12:20:48 +02:00
32 | tweek: 16
33 | tmonth: 4
34 | project_id: 1
35 | comments: ""
36 | updated_on: 2007-04-21 12:20:48 +02:00
37 | activity_id: 9
38 | spent_on: 2007-04-21
39 | issue_id: 3
40 | id: 3
41 | hours: 1.0
42 | user_id: 1
43 | tyear: 2007
44 | time_entries_004:
45 | created_on: 2007-04-22 12:20:48 +02:00
46 | tweek: 16
47 | tmonth: 4
48 | project_id: 3
49 | comments: Time spent on a subproject
50 | updated_on: 2007-04-22 12:20:48 +02:00
51 | activity_id: 10
52 | spent_on: 2007-04-22
53 | issue_id:
54 | id: 4
55 | hours: 7.65
56 | user_id: 1
57 | tyear: 2007
58 | time_entries_005:
59 | created_on: 2011-03-22 12:20:48 +02:00
60 | tweek: 12
61 | tmonth: 3
62 | project_id: 5
63 | comments: Time spent on a subproject
64 | updated_on: 2011-03-22 12:20:48 +02:00
65 | activity_id: 10
66 | spent_on: 2011-03-22
67 | issue_id:
68 | id: 5
69 | hours: 7.65
70 | user_id: 1
71 | tyear: 2011
72 |
73 |
--------------------------------------------------------------------------------
/test/fixtures/trackers.yml:
--------------------------------------------------------------------------------
1 | ---
2 | trackers_001:
3 | name: Bug
4 | id: 1
5 | is_in_chlog: true
6 | position: 1
7 | trackers_002:
8 | name: Feature request
9 | id: 2
10 | is_in_chlog: true
11 | position: 2
12 | trackers_003:
13 | name: Support request
14 | id: 3
15 | is_in_chlog: false
16 | position: 3
17 |
--------------------------------------------------------------------------------
/test/fixtures/users.yml:
--------------------------------------------------------------------------------
1 | ---
2 | users_004:
3 | created_on: 2006-07-19 19:34:07 +02:00
4 | status: 1
5 | last_login_on:
6 | language: en
7 | # password = foo
8 | salt: 3126f764c3c5ac61cbfc103f25f934cf
9 | hashed_password: 9e4dd7eeb172c12a0691a6d9d3a269f7e9fe671b
10 | updated_on: 2006-07-19 19:34:07 +02:00
11 | admin: false
12 | mail: rhill@somenet.foo
13 | lastname: Hill
14 | firstname: Robert
15 | id: 4
16 | auth_source_id:
17 | mail_notification: all
18 | login: rhill
19 | type: User
20 | users_001:
21 | created_on: 2006-07-19 19:12:21 +02:00
22 | status: 1
23 | last_login_on: 2006-07-19 22:57:52 +02:00
24 | language: en
25 | # password = admin
26 | salt: 82090c953c4a0000a7db253b0691a6b4
27 | hashed_password: b5b6ff9543bf1387374cdfa27a54c96d236a7150
28 | updated_on: 2006-07-19 22:57:52 +02:00
29 | admin: true
30 | mail: admin@somenet.foo
31 | lastname: Admin
32 | firstname: Redmine
33 | id: 1
34 | auth_source_id:
35 | mail_notification: all
36 | login: admin
37 | type: User
38 | users_002:
39 | created_on: 2006-07-19 19:32:09 +02:00
40 | status: 1
41 | last_login_on: 2006-07-19 22:42:15 +02:00
42 | language: en
43 | # password = jsmith
44 | salt: 67eb4732624d5a7753dcea7ce0bb7d7d
45 | hashed_password: bfbe06043353a677d0215b26a5800d128d5413bc
46 | updated_on: 2006-07-19 22:42:15 +02:00
47 | admin: false
48 | mail: jsmith@somenet.foo
49 | lastname: Smith
50 | firstname: John
51 | id: 2
52 | auth_source_id:
53 | mail_notification: all
54 | login: jsmith
55 | type: User
56 | users_003:
57 | created_on: 2006-07-19 19:33:19 +02:00
58 | status: 1
59 | last_login_on:
60 | language: en
61 | # password = foo
62 | salt: 7599f9963ec07b5a3b55b354407120c0
63 | hashed_password: 8f659c8d7c072f189374edacfa90d6abbc26d8ed
64 | updated_on: 2006-07-19 19:33:19 +02:00
65 | admin: false
66 | mail: dlopper@somenet.foo
67 | lastname: Lopper
68 | firstname: Dave
69 | id: 3
70 | auth_source_id:
71 | mail_notification: all
72 | login: dlopper
73 | type: User
74 | users_005:
75 | id: 5
76 | created_on: 2006-07-19 19:33:19 +02:00
77 | # Locked
78 | status: 3
79 | last_login_on:
80 | language: en
81 | hashed_password: 1
82 | updated_on: 2006-07-19 19:33:19 +02:00
83 | admin: false
84 | mail: dlopper2@somenet.foo
85 | lastname: Lopper2
86 | firstname: Dave2
87 | auth_source_id:
88 | mail_notification: all
89 | login: dlopper2
90 | type: User
91 | users_006:
92 | id: 6
93 | created_on: 2006-07-19 19:33:19 +02:00
94 | status: 0
95 | last_login_on:
96 | language: ''
97 | hashed_password: 1
98 | updated_on: 2006-07-19 19:33:19 +02:00
99 | admin: false
100 | mail: ''
101 | lastname: Anonymous
102 | firstname: ''
103 | auth_source_id:
104 | mail_notification: only_my_events
105 | login: ''
106 | type: AnonymousUser
107 | users_007:
108 | # A user who does not belong to any project
109 | id: 7
110 | created_on: 2006-07-19 19:33:19 +02:00
111 | status: 1
112 | last_login_on:
113 | language: 'en'
114 | # password = foo
115 | salt: 7599f9963ec07b5a3b55b354407120c0
116 | hashed_password: 8f659c8d7c072f189374edacfa90d6abbc26d8ed
117 | updated_on: 2006-07-19 19:33:19 +02:00
118 | admin: false
119 | mail: someone@foo.bar
120 | lastname: One
121 | firstname: Some
122 | auth_source_id:
123 | mail_notification: only_my_events
124 | login: someone
125 | type: User
126 | users_008:
127 | id: 8
128 | created_on: 2006-07-19 19:33:19 +02:00
129 | status: 1
130 | last_login_on:
131 | language: 'it'
132 | # password = foo
133 | salt: 7599f9963ec07b5a3b55b354407120c0
134 | hashed_password: 8f659c8d7c072f189374edacfa90d6abbc26d8ed
135 | updated_on: 2006-07-19 19:33:19 +02:00
136 | admin: false
137 | mail: miscuser8@foo.bar
138 | lastname: Misc
139 | firstname: User
140 | auth_source_id:
141 | mail_notification: only_my_events
142 | login: miscuser8
143 | type: User
144 | users_009:
145 | id: 9
146 | created_on: 2006-07-19 19:33:19 +02:00
147 | status: 1
148 | last_login_on:
149 | language: 'it'
150 | hashed_password: 1
151 | updated_on: 2006-07-19 19:33:19 +02:00
152 | admin: false
153 | mail: miscuser9@foo.bar
154 | lastname: Misc
155 | firstname: User
156 | auth_source_id:
157 | mail_notification: only_my_events
158 | login: miscuser9
159 | type: User
160 | groups_010:
161 | id: 10
162 | lastname: A Team
163 | type: Group
164 | groups_011:
165 | id: 11
166 | lastname: B Team
167 | type: Group
168 |
169 |
170 |
--------------------------------------------------------------------------------
/test/fixtures/versions.yml:
--------------------------------------------------------------------------------
1 | ---
2 | versions_001:
3 | created_on: 2006-07-19 21:00:07 +02:00
4 | name: "0.1"
5 | project_id: 1
6 | updated_on: 2006-07-19 21:00:07 +02:00
7 | id: 1
8 | description: Beta
9 | effective_date: 2006-07-01
10 | status: closed
11 | sharing: 'none'
12 | versions_002:
13 | created_on: 2006-07-19 21:00:33 +02:00
14 | name: "1.0"
15 | project_id: 1
16 | updated_on: 2006-07-19 21:00:33 +02:00
17 | id: 2
18 | description: Stable release
19 | effective_date: <%= 20.day.from_now.to_date.to_s(:db) %>
20 | status: locked
21 | sharing: 'none'
22 | versions_003:
23 | created_on: 2006-07-19 21:00:33 +02:00
24 | name: "2.0"
25 | project_id: 1
26 | updated_on: 2006-07-19 21:00:33 +02:00
27 | id: 3
28 | description: Future version
29 | effective_date:
30 | status: open
31 | sharing: 'none'
32 | versions_004:
33 | created_on: 2006-07-19 21:00:33 +02:00
34 | name: "2.0"
35 | project_id: 3
36 | updated_on: 2006-07-19 21:00:33 +02:00
37 | id: 4
38 | description: Future version on subproject
39 | effective_date:
40 | status: open
41 | sharing: 'tree'
42 | versions_005:
43 | created_on: 2006-07-19 21:00:07 +02:00
44 | name: "Alpha"
45 | project_id: 2
46 | updated_on: 2006-07-19 21:00:07 +02:00
47 | id: 5
48 | description: Private Alpha
49 | effective_date: 2006-07-01
50 | status: open
51 | sharing: 'none'
52 | versions_006:
53 | created_on: 2006-07-19 21:00:07 +02:00
54 | name: "Private Version of public subproject"
55 | project_id: 5
56 | updated_on: 2006-07-19 21:00:07 +02:00
57 | id: 6
58 | description: "Should be done any day now..."
59 | effective_date:
60 | status: open
61 | sharing: 'tree'
62 | versions_007:
63 | created_on: 2006-07-19 21:00:07 +02:00
64 | name: "Systemwide visible version"
65 | project_id: 2
66 | updated_on: 2006-07-19 21:00:07 +02:00
67 | id: 7
68 | description:
69 | effective_date:
70 | status: open
71 | sharing: 'system'
72 |
--------------------------------------------------------------------------------
/test/fixtures/workflows.yml:
--------------------------------------------------------------------------------
1 | ---
2 | WorkflowTransitions_189:
3 | new_status_id: 5
4 | role_id: 1
5 | old_status_id: 2
6 | id: 189
7 | tracker_id: 3
8 | type: WorkflowTransition
9 | WorkflowTransitions_001:
10 | new_status_id: 2
11 | role_id: 1
12 | old_status_id: 1
13 | id: 1
14 | tracker_id: 1
15 | type: WorkflowTransition
16 | WorkflowTransitions_002:
17 | new_status_id: 3
18 | role_id: 1
19 | old_status_id: 1
20 | id: 2
21 | tracker_id: 1
22 | type: WorkflowTransition
23 | WorkflowTransitions_003:
24 | new_status_id: 4
25 | role_id: 1
26 | old_status_id: 1
27 | id: 3
28 | tracker_id: 1
29 | type: WorkflowTransition
30 | WorkflowTransitions_110:
31 | new_status_id: 6
32 | role_id: 1
33 | old_status_id: 4
34 | id: 110
35 | tracker_id: 2
36 | type: WorkflowTransition
37 | WorkflowTransitions_004:
38 | new_status_id: 5
39 | role_id: 1
40 | old_status_id: 1
41 | id: 4
42 | tracker_id: 1
43 | type: WorkflowTransition
44 | WorkflowTransitions_030:
45 | new_status_id: 5
46 | role_id: 1
47 | old_status_id: 6
48 | id: 30
49 | tracker_id: 1
50 | type: WorkflowTransition
51 | WorkflowTransitions_111:
52 | new_status_id: 1
53 | role_id: 1
54 | old_status_id: 5
55 | id: 111
56 | tracker_id: 2
57 | type: WorkflowTransition
58 | WorkflowTransitions_005:
59 | new_status_id: 6
60 | role_id: 1
61 | old_status_id: 1
62 | id: 5
63 | tracker_id: 1
64 | type: WorkflowTransition
65 | WorkflowTransitions_031:
66 | new_status_id: 2
67 | role_id: 2
68 | old_status_id: 1
69 | id: 31
70 | tracker_id: 1
71 | type: WorkflowTransition
72 | WorkflowTransitions_112:
73 | new_status_id: 2
74 | role_id: 1
75 | old_status_id: 5
76 | id: 112
77 | tracker_id: 2
78 | type: WorkflowTransition
79 | WorkflowTransitions_006:
80 | new_status_id: 1
81 | role_id: 1
82 | old_status_id: 2
83 | id: 6
84 | tracker_id: 1
85 | type: WorkflowTransition
86 | WorkflowTransitions_032:
87 | new_status_id: 3
88 | role_id: 2
89 | old_status_id: 1
90 | id: 32
91 | tracker_id: 1
92 | type: WorkflowTransition
93 | WorkflowTransitions_113:
94 | new_status_id: 3
95 | role_id: 1
96 | old_status_id: 5
97 | id: 113
98 | tracker_id: 2
99 | type: WorkflowTransition
100 | WorkflowTransitions_220:
101 | new_status_id: 6
102 | role_id: 2
103 | old_status_id: 2
104 | id: 220
105 | tracker_id: 3
106 | type: WorkflowTransition
107 | WorkflowTransitions_007:
108 | new_status_id: 3
109 | role_id: 1
110 | old_status_id: 2
111 | id: 7
112 | tracker_id: 1
113 | type: WorkflowTransition
114 | WorkflowTransitions_033:
115 | new_status_id: 4
116 | role_id: 2
117 | old_status_id: 1
118 | id: 33
119 | tracker_id: 1
120 | type: WorkflowTransition
121 | WorkflowTransitions_060:
122 | new_status_id: 5
123 | role_id: 2
124 | old_status_id: 6
125 | id: 60
126 | tracker_id: 1
127 | type: WorkflowTransition
128 | WorkflowTransitions_114:
129 | new_status_id: 4
130 | role_id: 1
131 | old_status_id: 5
132 | id: 114
133 | tracker_id: 2
134 | type: WorkflowTransition
135 | WorkflowTransitions_140:
136 | new_status_id: 6
137 | role_id: 2
138 | old_status_id: 4
139 | id: 140
140 | tracker_id: 2
141 | type: WorkflowTransition
142 | WorkflowTransitions_221:
143 | new_status_id: 1
144 | role_id: 2
145 | old_status_id: 3
146 | id: 221
147 | tracker_id: 3
148 | type: WorkflowTransition
149 | WorkflowTransitions_008:
150 | new_status_id: 4
151 | role_id: 1
152 | old_status_id: 2
153 | id: 8
154 | tracker_id: 1
155 | type: WorkflowTransition
156 | WorkflowTransitions_034:
157 | new_status_id: 5
158 | role_id: 2
159 | old_status_id: 1
160 | id: 34
161 | tracker_id: 1
162 | type: WorkflowTransition
163 | WorkflowTransitions_115:
164 | new_status_id: 6
165 | role_id: 1
166 | old_status_id: 5
167 | id: 115
168 | tracker_id: 2
169 | type: WorkflowTransition
170 | WorkflowTransitions_141:
171 | new_status_id: 1
172 | role_id: 2
173 | old_status_id: 5
174 | id: 141
175 | tracker_id: 2
176 | type: WorkflowTransition
177 | WorkflowTransitions_222:
178 | new_status_id: 2
179 | role_id: 2
180 | old_status_id: 3
181 | id: 222
182 | tracker_id: 3
183 | type: WorkflowTransition
184 | WorkflowTransitions_223:
185 | new_status_id: 4
186 | role_id: 2
187 | old_status_id: 3
188 | id: 223
189 | tracker_id: 3
190 | type: WorkflowTransition
191 | WorkflowTransitions_009:
192 | new_status_id: 5
193 | role_id: 1
194 | old_status_id: 2
195 | id: 9
196 | tracker_id: 1
197 | type: WorkflowTransition
198 | WorkflowTransitions_035:
199 | new_status_id: 6
200 | role_id: 2
201 | old_status_id: 1
202 | id: 35
203 | tracker_id: 1
204 | type: WorkflowTransition
205 | WorkflowTransitions_061:
206 | new_status_id: 2
207 | role_id: 3
208 | old_status_id: 1
209 | id: 61
210 | tracker_id: 1
211 | type: WorkflowTransition
212 | WorkflowTransitions_116:
213 | new_status_id: 1
214 | role_id: 1
215 | old_status_id: 6
216 | id: 116
217 | tracker_id: 2
218 | type: WorkflowTransition
219 | WorkflowTransitions_142:
220 | new_status_id: 2
221 | role_id: 2
222 | old_status_id: 5
223 | id: 142
224 | tracker_id: 2
225 | type: WorkflowTransition
226 | WorkflowTransitions_250:
227 | new_status_id: 6
228 | role_id: 3
229 | old_status_id: 2
230 | id: 250
231 | tracker_id: 3
232 | type: WorkflowTransition
233 | WorkflowTransitions_224:
234 | new_status_id: 5
235 | role_id: 2
236 | old_status_id: 3
237 | id: 224
238 | tracker_id: 3
239 | type: WorkflowTransition
240 | WorkflowTransitions_036:
241 | new_status_id: 1
242 | role_id: 2
243 | old_status_id: 2
244 | id: 36
245 | tracker_id: 1
246 | type: WorkflowTransition
247 | WorkflowTransitions_062:
248 | new_status_id: 3
249 | role_id: 3
250 | old_status_id: 1
251 | id: 62
252 | tracker_id: 1
253 | type: WorkflowTransition
254 | WorkflowTransitions_117:
255 | new_status_id: 2
256 | role_id: 1
257 | old_status_id: 6
258 | id: 117
259 | tracker_id: 2
260 | type: WorkflowTransition
261 | WorkflowTransitions_143:
262 | new_status_id: 3
263 | role_id: 2
264 | old_status_id: 5
265 | id: 143
266 | tracker_id: 2
267 | type: WorkflowTransition
268 | WorkflowTransitions_170:
269 | new_status_id: 6
270 | role_id: 3
271 | old_status_id: 4
272 | id: 170
273 | tracker_id: 2
274 | type: WorkflowTransition
275 | WorkflowTransitions_251:
276 | new_status_id: 1
277 | role_id: 3
278 | old_status_id: 3
279 | id: 251
280 | tracker_id: 3
281 | type: WorkflowTransition
282 | WorkflowTransitions_225:
283 | new_status_id: 6
284 | role_id: 2
285 | old_status_id: 3
286 | id: 225
287 | tracker_id: 3
288 | type: WorkflowTransition
289 | WorkflowTransitions_063:
290 | new_status_id: 4
291 | role_id: 3
292 | old_status_id: 1
293 | id: 63
294 | tracker_id: 1
295 | type: WorkflowTransition
296 | WorkflowTransitions_090:
297 | new_status_id: 5
298 | role_id: 3
299 | old_status_id: 6
300 | id: 90
301 | tracker_id: 1
302 | type: WorkflowTransition
303 | WorkflowTransitions_118:
304 | new_status_id: 3
305 | role_id: 1
306 | old_status_id: 6
307 | id: 118
308 | tracker_id: 2
309 | type: WorkflowTransition
310 | WorkflowTransitions_144:
311 | new_status_id: 4
312 | role_id: 2
313 | old_status_id: 5
314 | id: 144
315 | tracker_id: 2
316 | type: WorkflowTransition
317 | WorkflowTransitions_252:
318 | new_status_id: 2
319 | role_id: 3
320 | old_status_id: 3
321 | id: 252
322 | tracker_id: 3
323 | type: WorkflowTransition
324 | WorkflowTransitions_226:
325 | new_status_id: 1
326 | role_id: 2
327 | old_status_id: 4
328 | id: 226
329 | tracker_id: 3
330 | type: WorkflowTransition
331 | WorkflowTransitions_038:
332 | new_status_id: 4
333 | role_id: 2
334 | old_status_id: 2
335 | id: 38
336 | tracker_id: 1
337 | type: WorkflowTransition
338 | WorkflowTransitions_064:
339 | new_status_id: 5
340 | role_id: 3
341 | old_status_id: 1
342 | id: 64
343 | tracker_id: 1
344 | type: WorkflowTransition
345 | WorkflowTransitions_091:
346 | new_status_id: 2
347 | role_id: 1
348 | old_status_id: 1
349 | id: 91
350 | tracker_id: 2
351 | type: WorkflowTransition
352 | WorkflowTransitions_119:
353 | new_status_id: 4
354 | role_id: 1
355 | old_status_id: 6
356 | id: 119
357 | tracker_id: 2
358 | type: WorkflowTransition
359 | WorkflowTransitions_145:
360 | new_status_id: 6
361 | role_id: 2
362 | old_status_id: 5
363 | id: 145
364 | tracker_id: 2
365 | type: WorkflowTransition
366 | WorkflowTransitions_171:
367 | new_status_id: 1
368 | role_id: 3
369 | old_status_id: 5
370 | id: 171
371 | tracker_id: 2
372 | type: WorkflowTransition
373 | WorkflowTransitions_253:
374 | new_status_id: 4
375 | role_id: 3
376 | old_status_id: 3
377 | id: 253
378 | tracker_id: 3
379 | type: WorkflowTransition
380 | WorkflowTransitions_227:
381 | new_status_id: 2
382 | role_id: 2
383 | old_status_id: 4
384 | id: 227
385 | tracker_id: 3
386 | type: WorkflowTransition
387 | WorkflowTransitions_039:
388 | new_status_id: 5
389 | role_id: 2
390 | old_status_id: 2
391 | id: 39
392 | tracker_id: 1
393 | type: WorkflowTransition
394 | WorkflowTransitions_065:
395 | new_status_id: 6
396 | role_id: 3
397 | old_status_id: 1
398 | id: 65
399 | tracker_id: 1
400 | type: WorkflowTransition
401 | WorkflowTransitions_092:
402 | new_status_id: 3
403 | role_id: 1
404 | old_status_id: 1
405 | id: 92
406 | tracker_id: 2
407 | type: WorkflowTransition
408 | WorkflowTransitions_146:
409 | new_status_id: 1
410 | role_id: 2
411 | old_status_id: 6
412 | id: 146
413 | tracker_id: 2
414 | type: WorkflowTransition
415 | WorkflowTransitions_172:
416 | new_status_id: 2
417 | role_id: 3
418 | old_status_id: 5
419 | id: 172
420 | tracker_id: 2
421 | type: WorkflowTransition
422 | WorkflowTransitions_254:
423 | new_status_id: 5
424 | role_id: 3
425 | old_status_id: 3
426 | id: 254
427 | tracker_id: 3
428 | type: WorkflowTransition
429 | WorkflowTransitions_228:
430 | new_status_id: 3
431 | role_id: 2
432 | old_status_id: 4
433 | id: 228
434 | tracker_id: 3
435 | type: WorkflowTransition
436 | WorkflowTransitions_066:
437 | new_status_id: 1
438 | role_id: 3
439 | old_status_id: 2
440 | id: 66
441 | tracker_id: 1
442 | type: WorkflowTransition
443 | WorkflowTransitions_093:
444 | new_status_id: 4
445 | role_id: 1
446 | old_status_id: 1
447 | id: 93
448 | tracker_id: 2
449 | type: WorkflowTransition
450 | WorkflowTransitions_147:
451 | new_status_id: 2
452 | role_id: 2
453 | old_status_id: 6
454 | id: 147
455 | tracker_id: 2
456 | type: WorkflowTransition
457 | WorkflowTransitions_173:
458 | new_status_id: 3
459 | role_id: 3
460 | old_status_id: 5
461 | id: 173
462 | tracker_id: 2
463 | type: WorkflowTransition
464 | WorkflowTransitions_255:
465 | new_status_id: 6
466 | role_id: 3
467 | old_status_id: 3
468 | id: 255
469 | tracker_id: 3
470 | type: WorkflowTransition
471 | WorkflowTransitions_229:
472 | new_status_id: 5
473 | role_id: 2
474 | old_status_id: 4
475 | id: 229
476 | tracker_id: 3
477 | type: WorkflowTransition
478 | WorkflowTransitions_067:
479 | new_status_id: 3
480 | role_id: 3
481 | old_status_id: 2
482 | id: 67
483 | tracker_id: 1
484 | type: WorkflowTransition
485 | WorkflowTransitions_148:
486 | new_status_id: 3
487 | role_id: 2
488 | old_status_id: 6
489 | id: 148
490 | tracker_id: 2
491 | type: WorkflowTransition
492 | WorkflowTransitions_174:
493 | new_status_id: 4
494 | role_id: 3
495 | old_status_id: 5
496 | id: 174
497 | tracker_id: 2
498 | type: WorkflowTransition
499 | WorkflowTransitions_256:
500 | new_status_id: 1
501 | role_id: 3
502 | old_status_id: 4
503 | id: 256
504 | tracker_id: 3
505 | type: WorkflowTransition
506 | WorkflowTransitions_068:
507 | new_status_id: 4
508 | role_id: 3
509 | old_status_id: 2
510 | id: 68
511 | tracker_id: 1
512 | type: WorkflowTransition
513 | WorkflowTransitions_094:
514 | new_status_id: 5
515 | role_id: 1
516 | old_status_id: 1
517 | id: 94
518 | tracker_id: 2
519 | type: WorkflowTransition
520 | WorkflowTransitions_149:
521 | new_status_id: 4
522 | role_id: 2
523 | old_status_id: 6
524 | id: 149
525 | tracker_id: 2
526 | type: WorkflowTransition
527 | WorkflowTransitions_175:
528 | new_status_id: 6
529 | role_id: 3
530 | old_status_id: 5
531 | id: 175
532 | tracker_id: 2
533 | type: WorkflowTransition
534 | WorkflowTransitions_257:
535 | new_status_id: 2
536 | role_id: 3
537 | old_status_id: 4
538 | id: 257
539 | tracker_id: 3
540 | type: WorkflowTransition
541 | WorkflowTransitions_069:
542 | new_status_id: 5
543 | role_id: 3
544 | old_status_id: 2
545 | id: 69
546 | tracker_id: 1
547 | type: WorkflowTransition
548 | WorkflowTransitions_095:
549 | new_status_id: 6
550 | role_id: 1
551 | old_status_id: 1
552 | id: 95
553 | tracker_id: 2
554 | type: WorkflowTransition
555 | WorkflowTransitions_176:
556 | new_status_id: 1
557 | role_id: 3
558 | old_status_id: 6
559 | id: 176
560 | tracker_id: 2
561 | type: WorkflowTransition
562 | WorkflowTransitions_258:
563 | new_status_id: 3
564 | role_id: 3
565 | old_status_id: 4
566 | id: 258
567 | tracker_id: 3
568 | type: WorkflowTransition
569 | WorkflowTransitions_096:
570 | new_status_id: 1
571 | role_id: 1
572 | old_status_id: 2
573 | id: 96
574 | tracker_id: 2
575 | type: WorkflowTransition
576 | WorkflowTransitions_177:
577 | new_status_id: 2
578 | role_id: 3
579 | old_status_id: 6
580 | id: 177
581 | tracker_id: 2
582 | type: WorkflowTransition
583 | WorkflowTransitions_259:
584 | new_status_id: 5
585 | role_id: 3
586 | old_status_id: 4
587 | id: 259
588 | tracker_id: 3
589 | type: WorkflowTransition
590 | WorkflowTransitions_097:
591 | new_status_id: 3
592 | role_id: 1
593 | old_status_id: 2
594 | id: 97
595 | tracker_id: 2
596 | type: WorkflowTransition
597 | WorkflowTransitions_178:
598 | new_status_id: 3
599 | role_id: 3
600 | old_status_id: 6
601 | id: 178
602 | tracker_id: 2
603 | type: WorkflowTransition
604 | WorkflowTransitions_098:
605 | new_status_id: 4
606 | role_id: 1
607 | old_status_id: 2
608 | id: 98
609 | tracker_id: 2
610 | type: WorkflowTransition
611 | WorkflowTransitions_179:
612 | new_status_id: 4
613 | role_id: 3
614 | old_status_id: 6
615 | id: 179
616 | tracker_id: 2
617 | type: WorkflowTransition
618 | WorkflowTransitions_099:
619 | new_status_id: 5
620 | role_id: 1
621 | old_status_id: 2
622 | id: 99
623 | tracker_id: 2
624 | type: WorkflowTransition
625 | WorkflowTransitions_100:
626 | new_status_id: 6
627 | role_id: 1
628 | old_status_id: 2
629 | id: 100
630 | tracker_id: 2
631 | type: WorkflowTransition
632 | WorkflowTransitions_020:
633 | new_status_id: 6
634 | role_id: 1
635 | old_status_id: 4
636 | id: 20
637 | tracker_id: 1
638 | type: WorkflowTransition
639 | WorkflowTransitions_101:
640 | new_status_id: 1
641 | role_id: 1
642 | old_status_id: 3
643 | id: 101
644 | tracker_id: 2
645 | type: WorkflowTransition
646 | WorkflowTransitions_021:
647 | new_status_id: 1
648 | role_id: 1
649 | old_status_id: 5
650 | id: 21
651 | tracker_id: 1
652 | type: WorkflowTransition
653 | WorkflowTransitions_102:
654 | new_status_id: 2
655 | role_id: 1
656 | old_status_id: 3
657 | id: 102
658 | tracker_id: 2
659 | type: WorkflowTransition
660 | WorkflowTransitions_210:
661 | new_status_id: 5
662 | role_id: 1
663 | old_status_id: 6
664 | id: 210
665 | tracker_id: 3
666 | type: WorkflowTransition
667 | WorkflowTransitions_022:
668 | new_status_id: 2
669 | role_id: 1
670 | old_status_id: 5
671 | id: 22
672 | tracker_id: 1
673 | type: WorkflowTransition
674 | WorkflowTransitions_103:
675 | new_status_id: 4
676 | role_id: 1
677 | old_status_id: 3
678 | id: 103
679 | tracker_id: 2
680 | type: WorkflowTransition
681 | WorkflowTransitions_023:
682 | new_status_id: 3
683 | role_id: 1
684 | old_status_id: 5
685 | id: 23
686 | tracker_id: 1
687 | type: WorkflowTransition
688 | WorkflowTransitions_104:
689 | new_status_id: 5
690 | role_id: 1
691 | old_status_id: 3
692 | id: 104
693 | tracker_id: 2
694 | type: WorkflowTransition
695 | WorkflowTransitions_130:
696 | new_status_id: 6
697 | role_id: 2
698 | old_status_id: 2
699 | id: 130
700 | tracker_id: 2
701 | type: WorkflowTransition
702 | WorkflowTransitions_211:
703 | new_status_id: 2
704 | role_id: 2
705 | old_status_id: 1
706 | id: 211
707 | tracker_id: 3
708 | type: WorkflowTransition
709 | WorkflowTransitions_024:
710 | new_status_id: 4
711 | role_id: 1
712 | old_status_id: 5
713 | id: 24
714 | tracker_id: 1
715 | type: WorkflowTransition
716 | WorkflowTransitions_050:
717 | new_status_id: 6
718 | role_id: 2
719 | old_status_id: 4
720 | id: 50
721 | tracker_id: 1
722 | type: WorkflowTransition
723 | WorkflowTransitions_105:
724 | new_status_id: 6
725 | role_id: 1
726 | old_status_id: 3
727 | id: 105
728 | tracker_id: 2
729 | type: WorkflowTransition
730 | WorkflowTransitions_131:
731 | new_status_id: 1
732 | role_id: 2
733 | old_status_id: 3
734 | id: 131
735 | tracker_id: 2
736 | type: WorkflowTransition
737 | WorkflowTransitions_212:
738 | new_status_id: 3
739 | role_id: 2
740 | old_status_id: 1
741 | id: 212
742 | tracker_id: 3
743 | type: WorkflowTransition
744 | WorkflowTransitions_025:
745 | new_status_id: 6
746 | role_id: 1
747 | old_status_id: 5
748 | id: 25
749 | tracker_id: 1
750 | type: WorkflowTransition
751 | WorkflowTransitions_051:
752 | new_status_id: 1
753 | role_id: 2
754 | old_status_id: 5
755 | id: 51
756 | tracker_id: 1
757 | type: WorkflowTransition
758 | WorkflowTransitions_106:
759 | new_status_id: 1
760 | role_id: 1
761 | old_status_id: 4
762 | id: 106
763 | tracker_id: 2
764 | type: WorkflowTransition
765 | WorkflowTransitions_132:
766 | new_status_id: 2
767 | role_id: 2
768 | old_status_id: 3
769 | id: 132
770 | tracker_id: 2
771 | type: WorkflowTransition
772 | WorkflowTransitions_213:
773 | new_status_id: 4
774 | role_id: 2
775 | old_status_id: 1
776 | id: 213
777 | tracker_id: 3
778 | type: WorkflowTransition
779 | WorkflowTransitions_240:
780 | new_status_id: 5
781 | role_id: 2
782 | old_status_id: 6
783 | id: 240
784 | tracker_id: 3
785 | type: WorkflowTransition
786 | WorkflowTransitions_026:
787 | new_status_id: 1
788 | role_id: 1
789 | old_status_id: 6
790 | id: 26
791 | tracker_id: 1
792 | type: WorkflowTransition
793 | WorkflowTransitions_052:
794 | new_status_id: 2
795 | role_id: 2
796 | old_status_id: 5
797 | id: 52
798 | tracker_id: 1
799 | type: WorkflowTransition
800 | WorkflowTransitions_107:
801 | new_status_id: 2
802 | role_id: 1
803 | old_status_id: 4
804 | id: 107
805 | tracker_id: 2
806 | type: WorkflowTransition
807 | WorkflowTransitions_133:
808 | new_status_id: 4
809 | role_id: 2
810 | old_status_id: 3
811 | id: 133
812 | tracker_id: 2
813 | type: WorkflowTransition
814 | WorkflowTransitions_214:
815 | new_status_id: 5
816 | role_id: 2
817 | old_status_id: 1
818 | id: 214
819 | tracker_id: 3
820 | type: WorkflowTransition
821 | WorkflowTransitions_241:
822 | new_status_id: 2
823 | role_id: 3
824 | old_status_id: 1
825 | id: 241
826 | tracker_id: 3
827 | type: WorkflowTransition
828 | WorkflowTransitions_027:
829 | new_status_id: 2
830 | role_id: 1
831 | old_status_id: 6
832 | id: 27
833 | tracker_id: 1
834 | type: WorkflowTransition
835 | WorkflowTransitions_053:
836 | new_status_id: 3
837 | role_id: 2
838 | old_status_id: 5
839 | id: 53
840 | tracker_id: 1
841 | type: WorkflowTransition
842 | WorkflowTransitions_080:
843 | new_status_id: 6
844 | role_id: 3
845 | old_status_id: 4
846 | id: 80
847 | tracker_id: 1
848 | type: WorkflowTransition
849 | WorkflowTransitions_108:
850 | new_status_id: 3
851 | role_id: 1
852 | old_status_id: 4
853 | id: 108
854 | tracker_id: 2
855 | type: WorkflowTransition
856 | WorkflowTransitions_134:
857 | new_status_id: 5
858 | role_id: 2
859 | old_status_id: 3
860 | id: 134
861 | tracker_id: 2
862 | type: WorkflowTransition
863 | WorkflowTransitions_160:
864 | new_status_id: 6
865 | role_id: 3
866 | old_status_id: 2
867 | id: 160
868 | tracker_id: 2
869 | type: WorkflowTransition
870 | WorkflowTransitions_215:
871 | new_status_id: 6
872 | role_id: 2
873 | old_status_id: 1
874 | id: 215
875 | tracker_id: 3
876 | type: WorkflowTransition
877 | WorkflowTransitions_242:
878 | new_status_id: 3
879 | role_id: 3
880 | old_status_id: 1
881 | id: 242
882 | tracker_id: 3
883 | type: WorkflowTransition
884 | WorkflowTransitions_028:
885 | new_status_id: 3
886 | role_id: 1
887 | old_status_id: 6
888 | id: 28
889 | tracker_id: 1
890 | type: WorkflowTransition
891 | WorkflowTransitions_054:
892 | new_status_id: 4
893 | role_id: 2
894 | old_status_id: 5
895 | id: 54
896 | tracker_id: 1
897 | type: WorkflowTransition
898 | WorkflowTransitions_081:
899 | new_status_id: 1
900 | role_id: 3
901 | old_status_id: 5
902 | id: 81
903 | tracker_id: 1
904 | type: WorkflowTransition
905 | WorkflowTransitions_109:
906 | new_status_id: 5
907 | role_id: 1
908 | old_status_id: 4
909 | id: 109
910 | tracker_id: 2
911 | type: WorkflowTransition
912 | WorkflowTransitions_135:
913 | new_status_id: 6
914 | role_id: 2
915 | old_status_id: 3
916 | id: 135
917 | tracker_id: 2
918 | type: WorkflowTransition
919 | WorkflowTransitions_161:
920 | new_status_id: 1
921 | role_id: 3
922 | old_status_id: 3
923 | id: 161
924 | tracker_id: 2
925 | type: WorkflowTransition
926 | WorkflowTransitions_216:
927 | new_status_id: 1
928 | role_id: 2
929 | old_status_id: 2
930 | id: 216
931 | tracker_id: 3
932 | type: WorkflowTransition
933 | WorkflowTransitions_243:
934 | new_status_id: 4
935 | role_id: 3
936 | old_status_id: 1
937 | id: 243
938 | tracker_id: 3
939 | type: WorkflowTransition
940 | WorkflowTransitions_029:
941 | new_status_id: 4
942 | role_id: 1
943 | old_status_id: 6
944 | id: 29
945 | tracker_id: 1
946 | type: WorkflowTransition
947 | WorkflowTransitions_055:
948 | new_status_id: 6
949 | role_id: 2
950 | old_status_id: 5
951 | id: 55
952 | tracker_id: 1
953 | type: WorkflowTransition
954 | WorkflowTransitions_082:
955 | new_status_id: 2
956 | role_id: 3
957 | old_status_id: 5
958 | id: 82
959 | tracker_id: 1
960 | type: WorkflowTransition
961 | WorkflowTransitions_136:
962 | new_status_id: 1
963 | role_id: 2
964 | old_status_id: 4
965 | id: 136
966 | tracker_id: 2
967 | type: WorkflowTransition
968 | WorkflowTransitions_162:
969 | new_status_id: 2
970 | role_id: 3
971 | old_status_id: 3
972 | id: 162
973 | tracker_id: 2
974 | type: WorkflowTransition
975 | WorkflowTransitions_217:
976 | new_status_id: 3
977 | role_id: 2
978 | old_status_id: 2
979 | id: 217
980 | tracker_id: 3
981 | type: WorkflowTransition
982 | WorkflowTransitions_270:
983 | new_status_id: 5
984 | role_id: 3
985 | old_status_id: 6
986 | id: 270
987 | tracker_id: 3
988 | type: WorkflowTransition
989 | WorkflowTransitions_244:
990 | new_status_id: 5
991 | role_id: 3
992 | old_status_id: 1
993 | id: 244
994 | tracker_id: 3
995 | type: WorkflowTransition
996 | WorkflowTransitions_056:
997 | new_status_id: 1
998 | role_id: 2
999 | old_status_id: 6
1000 | id: 56
1001 | tracker_id: 1
1002 | type: WorkflowTransition
1003 | WorkflowTransitions_137:
1004 | new_status_id: 2
1005 | role_id: 2
1006 | old_status_id: 4
1007 | id: 137
1008 | tracker_id: 2
1009 | type: WorkflowTransition
1010 | WorkflowTransitions_163:
1011 | new_status_id: 4
1012 | role_id: 3
1013 | old_status_id: 3
1014 | id: 163
1015 | tracker_id: 2
1016 | type: WorkflowTransition
1017 | WorkflowTransitions_190:
1018 | new_status_id: 6
1019 | role_id: 1
1020 | old_status_id: 2
1021 | id: 190
1022 | tracker_id: 3
1023 | type: WorkflowTransition
1024 | WorkflowTransitions_218:
1025 | new_status_id: 4
1026 | role_id: 2
1027 | old_status_id: 2
1028 | id: 218
1029 | tracker_id: 3
1030 | type: WorkflowTransition
1031 | WorkflowTransitions_245:
1032 | new_status_id: 6
1033 | role_id: 3
1034 | old_status_id: 1
1035 | id: 245
1036 | tracker_id: 3
1037 | type: WorkflowTransition
1038 | WorkflowTransitions_057:
1039 | new_status_id: 2
1040 | role_id: 2
1041 | old_status_id: 6
1042 | id: 57
1043 | tracker_id: 1
1044 | type: WorkflowTransition
1045 | WorkflowTransitions_083:
1046 | new_status_id: 3
1047 | role_id: 3
1048 | old_status_id: 5
1049 | id: 83
1050 | tracker_id: 1
1051 | type: WorkflowTransition
1052 | WorkflowTransitions_138:
1053 | new_status_id: 3
1054 | role_id: 2
1055 | old_status_id: 4
1056 | id: 138
1057 | tracker_id: 2
1058 | type: WorkflowTransition
1059 | WorkflowTransitions_164:
1060 | new_status_id: 5
1061 | role_id: 3
1062 | old_status_id: 3
1063 | id: 164
1064 | tracker_id: 2
1065 | type: WorkflowTransition
1066 | WorkflowTransitions_191:
1067 | new_status_id: 1
1068 | role_id: 1
1069 | old_status_id: 3
1070 | id: 191
1071 | tracker_id: 3
1072 | type: WorkflowTransition
1073 | WorkflowTransitions_219:
1074 | new_status_id: 5
1075 | role_id: 2
1076 | old_status_id: 2
1077 | id: 219
1078 | tracker_id: 3
1079 | type: WorkflowTransition
1080 | WorkflowTransitions_246:
1081 | new_status_id: 1
1082 | role_id: 3
1083 | old_status_id: 2
1084 | id: 246
1085 | tracker_id: 3
1086 | type: WorkflowTransition
1087 | WorkflowTransitions_058:
1088 | new_status_id: 3
1089 | role_id: 2
1090 | old_status_id: 6
1091 | id: 58
1092 | tracker_id: 1
1093 | type: WorkflowTransition
1094 | WorkflowTransitions_084:
1095 | new_status_id: 4
1096 | role_id: 3
1097 | old_status_id: 5
1098 | id: 84
1099 | tracker_id: 1
1100 | type: WorkflowTransition
1101 | WorkflowTransitions_139:
1102 | new_status_id: 5
1103 | role_id: 2
1104 | old_status_id: 4
1105 | id: 139
1106 | tracker_id: 2
1107 | type: WorkflowTransition
1108 | WorkflowTransitions_165:
1109 | new_status_id: 6
1110 | role_id: 3
1111 | old_status_id: 3
1112 | id: 165
1113 | tracker_id: 2
1114 | type: WorkflowTransition
1115 | WorkflowTransitions_192:
1116 | new_status_id: 2
1117 | role_id: 1
1118 | old_status_id: 3
1119 | id: 192
1120 | tracker_id: 3
1121 | type: WorkflowTransition
1122 | WorkflowTransitions_247:
1123 | new_status_id: 3
1124 | role_id: 3
1125 | old_status_id: 2
1126 | id: 247
1127 | tracker_id: 3
1128 | type: WorkflowTransition
1129 | WorkflowTransitions_059:
1130 | new_status_id: 4
1131 | role_id: 2
1132 | old_status_id: 6
1133 | id: 59
1134 | tracker_id: 1
1135 | type: WorkflowTransition
1136 | WorkflowTransitions_085:
1137 | new_status_id: 6
1138 | role_id: 3
1139 | old_status_id: 5
1140 | id: 85
1141 | tracker_id: 1
1142 | type: WorkflowTransition
1143 | WorkflowTransitions_166:
1144 | new_status_id: 1
1145 | role_id: 3
1146 | old_status_id: 4
1147 | id: 166
1148 | tracker_id: 2
1149 | type: WorkflowTransition
1150 | WorkflowTransitions_248:
1151 | new_status_id: 4
1152 | role_id: 3
1153 | old_status_id: 2
1154 | id: 248
1155 | tracker_id: 3
1156 | type: WorkflowTransition
1157 | WorkflowTransitions_086:
1158 | new_status_id: 1
1159 | role_id: 3
1160 | old_status_id: 6
1161 | id: 86
1162 | tracker_id: 1
1163 | type: WorkflowTransition
1164 | WorkflowTransitions_167:
1165 | new_status_id: 2
1166 | role_id: 3
1167 | old_status_id: 4
1168 | id: 167
1169 | tracker_id: 2
1170 | type: WorkflowTransition
1171 | WorkflowTransitions_193:
1172 | new_status_id: 4
1173 | role_id: 1
1174 | old_status_id: 3
1175 | id: 193
1176 | tracker_id: 3
1177 | type: WorkflowTransition
1178 | WorkflowTransitions_249:
1179 | new_status_id: 5
1180 | role_id: 3
1181 | old_status_id: 2
1182 | id: 249
1183 | tracker_id: 3
1184 | type: WorkflowTransition
1185 | WorkflowTransitions_087:
1186 | new_status_id: 2
1187 | role_id: 3
1188 | old_status_id: 6
1189 | id: 87
1190 | tracker_id: 1
1191 | type: WorkflowTransition
1192 | WorkflowTransitions_168:
1193 | new_status_id: 3
1194 | role_id: 3
1195 | old_status_id: 4
1196 | id: 168
1197 | tracker_id: 2
1198 | type: WorkflowTransition
1199 | WorkflowTransitions_194:
1200 | new_status_id: 5
1201 | role_id: 1
1202 | old_status_id: 3
1203 | id: 194
1204 | tracker_id: 3
1205 | type: WorkflowTransition
1206 | WorkflowTransitions_088:
1207 | new_status_id: 3
1208 | role_id: 3
1209 | old_status_id: 6
1210 | id: 88
1211 | tracker_id: 1
1212 | type: WorkflowTransition
1213 | WorkflowTransitions_169:
1214 | new_status_id: 5
1215 | role_id: 3
1216 | old_status_id: 4
1217 | id: 169
1218 | tracker_id: 2
1219 | type: WorkflowTransition
1220 | WorkflowTransitions_195:
1221 | new_status_id: 6
1222 | role_id: 1
1223 | old_status_id: 3
1224 | id: 195
1225 | tracker_id: 3
1226 | type: WorkflowTransition
1227 | WorkflowTransitions_089:
1228 | new_status_id: 4
1229 | role_id: 3
1230 | old_status_id: 6
1231 | id: 89
1232 | tracker_id: 1
1233 | type: WorkflowTransition
1234 | WorkflowTransitions_196:
1235 | new_status_id: 1
1236 | role_id: 1
1237 | old_status_id: 4
1238 | id: 196
1239 | tracker_id: 3
1240 | type: WorkflowTransition
1241 | WorkflowTransitions_197:
1242 | new_status_id: 2
1243 | role_id: 1
1244 | old_status_id: 4
1245 | id: 197
1246 | tracker_id: 3
1247 | type: WorkflowTransition
1248 | WorkflowTransitions_198:
1249 | new_status_id: 3
1250 | role_id: 1
1251 | old_status_id: 4
1252 | id: 198
1253 | tracker_id: 3
1254 | type: WorkflowTransition
1255 | WorkflowTransitions_199:
1256 | new_status_id: 5
1257 | role_id: 1
1258 | old_status_id: 4
1259 | id: 199
1260 | tracker_id: 3
1261 | type: WorkflowTransition
1262 | WorkflowTransitions_010:
1263 | new_status_id: 6
1264 | role_id: 1
1265 | old_status_id: 2
1266 | id: 10
1267 | tracker_id: 1
1268 | type: WorkflowTransition
1269 | WorkflowTransitions_011:
1270 | new_status_id: 1
1271 | role_id: 1
1272 | old_status_id: 3
1273 | id: 11
1274 | tracker_id: 1
1275 | type: WorkflowTransition
1276 | WorkflowTransitions_012:
1277 | new_status_id: 2
1278 | role_id: 1
1279 | old_status_id: 3
1280 | id: 12
1281 | tracker_id: 1
1282 | type: WorkflowTransition
1283 | WorkflowTransitions_200:
1284 | new_status_id: 6
1285 | role_id: 1
1286 | old_status_id: 4
1287 | id: 200
1288 | tracker_id: 3
1289 | type: WorkflowTransition
1290 | WorkflowTransitions_013:
1291 | new_status_id: 4
1292 | role_id: 1
1293 | old_status_id: 3
1294 | id: 13
1295 | tracker_id: 1
1296 | type: WorkflowTransition
1297 | WorkflowTransitions_120:
1298 | new_status_id: 5
1299 | role_id: 1
1300 | old_status_id: 6
1301 | id: 120
1302 | tracker_id: 2
1303 | type: WorkflowTransition
1304 | WorkflowTransitions_201:
1305 | new_status_id: 1
1306 | role_id: 1
1307 | old_status_id: 5
1308 | id: 201
1309 | tracker_id: 3
1310 | type: WorkflowTransition
1311 | WorkflowTransitions_040:
1312 | new_status_id: 6
1313 | role_id: 2
1314 | old_status_id: 2
1315 | id: 40
1316 | tracker_id: 1
1317 | type: WorkflowTransition
1318 | WorkflowTransitions_121:
1319 | new_status_id: 2
1320 | role_id: 2
1321 | old_status_id: 1
1322 | id: 121
1323 | tracker_id: 2
1324 | type: WorkflowTransition
1325 | WorkflowTransitions_202:
1326 | new_status_id: 2
1327 | role_id: 1
1328 | old_status_id: 5
1329 | id: 202
1330 | tracker_id: 3
1331 | type: WorkflowTransition
1332 | WorkflowTransitions_014:
1333 | new_status_id: 5
1334 | role_id: 1
1335 | old_status_id: 3
1336 | id: 14
1337 | tracker_id: 1
1338 | type: WorkflowTransition
1339 | WorkflowTransitions_041:
1340 | new_status_id: 1
1341 | role_id: 2
1342 | old_status_id: 3
1343 | id: 41
1344 | tracker_id: 1
1345 | type: WorkflowTransition
1346 | WorkflowTransitions_122:
1347 | new_status_id: 3
1348 | role_id: 2
1349 | old_status_id: 1
1350 | id: 122
1351 | tracker_id: 2
1352 | type: WorkflowTransition
1353 | WorkflowTransitions_203:
1354 | new_status_id: 3
1355 | role_id: 1
1356 | old_status_id: 5
1357 | id: 203
1358 | tracker_id: 3
1359 | type: WorkflowTransition
1360 | WorkflowTransitions_015:
1361 | new_status_id: 6
1362 | role_id: 1
1363 | old_status_id: 3
1364 | id: 15
1365 | tracker_id: 1
1366 | type: WorkflowTransition
1367 | WorkflowTransitions_230:
1368 | new_status_id: 6
1369 | role_id: 2
1370 | old_status_id: 4
1371 | id: 230
1372 | tracker_id: 3
1373 | type: WorkflowTransition
1374 | WorkflowTransitions_123:
1375 | new_status_id: 4
1376 | role_id: 2
1377 | old_status_id: 1
1378 | id: 123
1379 | tracker_id: 2
1380 | type: WorkflowTransition
1381 | WorkflowTransitions_204:
1382 | new_status_id: 4
1383 | role_id: 1
1384 | old_status_id: 5
1385 | id: 204
1386 | tracker_id: 3
1387 | type: WorkflowTransition
1388 | WorkflowTransitions_016:
1389 | new_status_id: 1
1390 | role_id: 1
1391 | old_status_id: 4
1392 | id: 16
1393 | tracker_id: 1
1394 | type: WorkflowTransition
1395 | WorkflowTransitions_042:
1396 | new_status_id: 2
1397 | role_id: 2
1398 | old_status_id: 3
1399 | id: 42
1400 | tracker_id: 1
1401 | type: WorkflowTransition
1402 | WorkflowTransitions_231:
1403 | new_status_id: 1
1404 | role_id: 2
1405 | old_status_id: 5
1406 | id: 231
1407 | tracker_id: 3
1408 | type: WorkflowTransition
1409 | WorkflowTransitions_070:
1410 | new_status_id: 6
1411 | role_id: 3
1412 | old_status_id: 2
1413 | id: 70
1414 | tracker_id: 1
1415 | type: WorkflowTransition
1416 | WorkflowTransitions_124:
1417 | new_status_id: 5
1418 | role_id: 2
1419 | old_status_id: 1
1420 | id: 124
1421 | tracker_id: 2
1422 | type: WorkflowTransition
1423 | WorkflowTransitions_150:
1424 | new_status_id: 5
1425 | role_id: 2
1426 | old_status_id: 6
1427 | id: 150
1428 | tracker_id: 2
1429 | type: WorkflowTransition
1430 | WorkflowTransitions_205:
1431 | new_status_id: 6
1432 | role_id: 1
1433 | old_status_id: 5
1434 | id: 205
1435 | tracker_id: 3
1436 | type: WorkflowTransition
1437 | WorkflowTransitions_017:
1438 | new_status_id: 2
1439 | role_id: 1
1440 | old_status_id: 4
1441 | id: 17
1442 | tracker_id: 1
1443 | type: WorkflowTransition
1444 | WorkflowTransitions_043:
1445 | new_status_id: 4
1446 | role_id: 2
1447 | old_status_id: 3
1448 | id: 43
1449 | tracker_id: 1
1450 | type: WorkflowTransition
1451 | WorkflowTransitions_232:
1452 | new_status_id: 2
1453 | role_id: 2
1454 | old_status_id: 5
1455 | id: 232
1456 | tracker_id: 3
1457 | type: WorkflowTransition
1458 | WorkflowTransitions_125:
1459 | new_status_id: 6
1460 | role_id: 2
1461 | old_status_id: 1
1462 | id: 125
1463 | tracker_id: 2
1464 | type: WorkflowTransition
1465 | WorkflowTransitions_151:
1466 | new_status_id: 2
1467 | role_id: 3
1468 | old_status_id: 1
1469 | id: 151
1470 | tracker_id: 2
1471 | type: WorkflowTransition
1472 | WorkflowTransitions_206:
1473 | new_status_id: 1
1474 | role_id: 1
1475 | old_status_id: 6
1476 | id: 206
1477 | tracker_id: 3
1478 | type: WorkflowTransition
1479 | WorkflowTransitions_018:
1480 | new_status_id: 3
1481 | role_id: 1
1482 | old_status_id: 4
1483 | id: 18
1484 | tracker_id: 1
1485 | type: WorkflowTransition
1486 | WorkflowTransitions_044:
1487 | new_status_id: 5
1488 | role_id: 2
1489 | old_status_id: 3
1490 | id: 44
1491 | tracker_id: 1
1492 | type: WorkflowTransition
1493 | WorkflowTransitions_071:
1494 | new_status_id: 1
1495 | role_id: 3
1496 | old_status_id: 3
1497 | id: 71
1498 | tracker_id: 1
1499 | type: WorkflowTransition
1500 | WorkflowTransitions_233:
1501 | new_status_id: 3
1502 | role_id: 2
1503 | old_status_id: 5
1504 | id: 233
1505 | tracker_id: 3
1506 | type: WorkflowTransition
1507 | WorkflowTransitions_126:
1508 | new_status_id: 1
1509 | role_id: 2
1510 | old_status_id: 2
1511 | id: 126
1512 | tracker_id: 2
1513 | type: WorkflowTransition
1514 | WorkflowTransitions_152:
1515 | new_status_id: 3
1516 | role_id: 3
1517 | old_status_id: 1
1518 | id: 152
1519 | tracker_id: 2
1520 | type: WorkflowTransition
1521 | WorkflowTransitions_207:
1522 | new_status_id: 2
1523 | role_id: 1
1524 | old_status_id: 6
1525 | id: 207
1526 | tracker_id: 3
1527 | type: WorkflowTransition
1528 | WorkflowTransitions_019:
1529 | new_status_id: 5
1530 | role_id: 1
1531 | old_status_id: 4
1532 | id: 19
1533 | tracker_id: 1
1534 | type: WorkflowTransition
1535 | WorkflowTransitions_045:
1536 | new_status_id: 6
1537 | role_id: 2
1538 | old_status_id: 3
1539 | id: 45
1540 | tracker_id: 1
1541 | type: WorkflowTransition
1542 | WorkflowTransitions_260:
1543 | new_status_id: 6
1544 | role_id: 3
1545 | old_status_id: 4
1546 | id: 260
1547 | tracker_id: 3
1548 | type: WorkflowTransition
1549 | WorkflowTransitions_234:
1550 | new_status_id: 4
1551 | role_id: 2
1552 | old_status_id: 5
1553 | id: 234
1554 | tracker_id: 3
1555 | type: WorkflowTransition
1556 | WorkflowTransitions_127:
1557 | new_status_id: 3
1558 | role_id: 2
1559 | old_status_id: 2
1560 | id: 127
1561 | tracker_id: 2
1562 | type: WorkflowTransition
1563 | WorkflowTransitions_153:
1564 | new_status_id: 4
1565 | role_id: 3
1566 | old_status_id: 1
1567 | id: 153
1568 | tracker_id: 2
1569 | type: WorkflowTransition
1570 | WorkflowTransitions_180:
1571 | new_status_id: 5
1572 | role_id: 3
1573 | old_status_id: 6
1574 | id: 180
1575 | tracker_id: 2
1576 | type: WorkflowTransition
1577 | WorkflowTransitions_208:
1578 | new_status_id: 3
1579 | role_id: 1
1580 | old_status_id: 6
1581 | id: 208
1582 | tracker_id: 3
1583 | type: WorkflowTransition
1584 | WorkflowTransitions_046:
1585 | new_status_id: 1
1586 | role_id: 2
1587 | old_status_id: 4
1588 | id: 46
1589 | tracker_id: 1
1590 | type: WorkflowTransition
1591 | WorkflowTransitions_072:
1592 | new_status_id: 2
1593 | role_id: 3
1594 | old_status_id: 3
1595 | id: 72
1596 | tracker_id: 1
1597 | type: WorkflowTransition
1598 | WorkflowTransitions_261:
1599 | new_status_id: 1
1600 | role_id: 3
1601 | old_status_id: 5
1602 | id: 261
1603 | tracker_id: 3
1604 | type: WorkflowTransition
1605 | WorkflowTransitions_235:
1606 | new_status_id: 6
1607 | role_id: 2
1608 | old_status_id: 5
1609 | id: 235
1610 | tracker_id: 3
1611 | type: WorkflowTransition
1612 | WorkflowTransitions_154:
1613 | new_status_id: 5
1614 | role_id: 3
1615 | old_status_id: 1
1616 | id: 154
1617 | tracker_id: 2
1618 | type: WorkflowTransition
1619 | WorkflowTransitions_181:
1620 | new_status_id: 2
1621 | role_id: 1
1622 | old_status_id: 1
1623 | id: 181
1624 | tracker_id: 3
1625 | type: WorkflowTransition
1626 | WorkflowTransitions_209:
1627 | new_status_id: 4
1628 | role_id: 1
1629 | old_status_id: 6
1630 | id: 209
1631 | tracker_id: 3
1632 | type: WorkflowTransition
1633 | WorkflowTransitions_047:
1634 | new_status_id: 2
1635 | role_id: 2
1636 | old_status_id: 4
1637 | id: 47
1638 | tracker_id: 1
1639 | type: WorkflowTransition
1640 | WorkflowTransitions_073:
1641 | new_status_id: 4
1642 | role_id: 3
1643 | old_status_id: 3
1644 | id: 73
1645 | tracker_id: 1
1646 | type: WorkflowTransition
1647 | WorkflowTransitions_128:
1648 | new_status_id: 4
1649 | role_id: 2
1650 | old_status_id: 2
1651 | id: 128
1652 | tracker_id: 2
1653 | type: WorkflowTransition
1654 | WorkflowTransitions_262:
1655 | new_status_id: 2
1656 | role_id: 3
1657 | old_status_id: 5
1658 | id: 262
1659 | tracker_id: 3
1660 | type: WorkflowTransition
1661 | WorkflowTransitions_236:
1662 | new_status_id: 1
1663 | role_id: 2
1664 | old_status_id: 6
1665 | id: 236
1666 | tracker_id: 3
1667 | type: WorkflowTransition
1668 | WorkflowTransitions_155:
1669 | new_status_id: 6
1670 | role_id: 3
1671 | old_status_id: 1
1672 | id: 155
1673 | tracker_id: 2
1674 | type: WorkflowTransition
1675 | WorkflowTransitions_048:
1676 | new_status_id: 3
1677 | role_id: 2
1678 | old_status_id: 4
1679 | id: 48
1680 | tracker_id: 1
1681 | type: WorkflowTransition
1682 | WorkflowTransitions_074:
1683 | new_status_id: 5
1684 | role_id: 3
1685 | old_status_id: 3
1686 | id: 74
1687 | tracker_id: 1
1688 | type: WorkflowTransition
1689 | WorkflowTransitions_129:
1690 | new_status_id: 5
1691 | role_id: 2
1692 | old_status_id: 2
1693 | id: 129
1694 | tracker_id: 2
1695 | type: WorkflowTransition
1696 | WorkflowTransitions_263:
1697 | new_status_id: 3
1698 | role_id: 3
1699 | old_status_id: 5
1700 | id: 263
1701 | tracker_id: 3
1702 | type: WorkflowTransition
1703 | WorkflowTransitions_237:
1704 | new_status_id: 2
1705 | role_id: 2
1706 | old_status_id: 6
1707 | id: 237
1708 | tracker_id: 3
1709 | type: WorkflowTransition
1710 | WorkflowTransitions_182:
1711 | new_status_id: 3
1712 | role_id: 1
1713 | old_status_id: 1
1714 | id: 182
1715 | tracker_id: 3
1716 | type: WorkflowTransition
1717 | WorkflowTransitions_049:
1718 | new_status_id: 5
1719 | role_id: 2
1720 | old_status_id: 4
1721 | id: 49
1722 | tracker_id: 1
1723 | type: WorkflowTransition
1724 | WorkflowTransitions_075:
1725 | new_status_id: 6
1726 | role_id: 3
1727 | old_status_id: 3
1728 | id: 75
1729 | tracker_id: 1
1730 | type: WorkflowTransition
1731 | WorkflowTransitions_156:
1732 | new_status_id: 1
1733 | role_id: 3
1734 | old_status_id: 2
1735 | id: 156
1736 | tracker_id: 2
1737 | type: WorkflowTransition
1738 | WorkflowTransitions_264:
1739 | new_status_id: 4
1740 | role_id: 3
1741 | old_status_id: 5
1742 | id: 264
1743 | tracker_id: 3
1744 | type: WorkflowTransition
1745 | WorkflowTransitions_238:
1746 | new_status_id: 3
1747 | role_id: 2
1748 | old_status_id: 6
1749 | id: 238
1750 | tracker_id: 3
1751 | type: WorkflowTransition
1752 | WorkflowTransitions_183:
1753 | new_status_id: 4
1754 | role_id: 1
1755 | old_status_id: 1
1756 | id: 183
1757 | tracker_id: 3
1758 | type: WorkflowTransition
1759 | WorkflowTransitions_076:
1760 | new_status_id: 1
1761 | role_id: 3
1762 | old_status_id: 4
1763 | id: 76
1764 | tracker_id: 1
1765 | type: WorkflowTransition
1766 | WorkflowTransitions_157:
1767 | new_status_id: 3
1768 | role_id: 3
1769 | old_status_id: 2
1770 | id: 157
1771 | tracker_id: 2
1772 | type: WorkflowTransition
1773 | WorkflowTransitions_265:
1774 | new_status_id: 6
1775 | role_id: 3
1776 | old_status_id: 5
1777 | id: 265
1778 | tracker_id: 3
1779 | type: WorkflowTransition
1780 | WorkflowTransitions_239:
1781 | new_status_id: 4
1782 | role_id: 2
1783 | old_status_id: 6
1784 | id: 239
1785 | tracker_id: 3
1786 | type: WorkflowTransition
1787 | WorkflowTransitions_077:
1788 | new_status_id: 2
1789 | role_id: 3
1790 | old_status_id: 4
1791 | id: 77
1792 | tracker_id: 1
1793 | type: WorkflowTransition
1794 | WorkflowTransitions_158:
1795 | new_status_id: 4
1796 | role_id: 3
1797 | old_status_id: 2
1798 | id: 158
1799 | tracker_id: 2
1800 | type: WorkflowTransition
1801 | WorkflowTransitions_184:
1802 | new_status_id: 5
1803 | role_id: 1
1804 | old_status_id: 1
1805 | id: 184
1806 | tracker_id: 3
1807 | type: WorkflowTransition
1808 | WorkflowTransitions_266:
1809 | new_status_id: 1
1810 | role_id: 3
1811 | old_status_id: 6
1812 | id: 266
1813 | tracker_id: 3
1814 | type: WorkflowTransition
1815 | WorkflowTransitions_078:
1816 | new_status_id: 3
1817 | role_id: 3
1818 | old_status_id: 4
1819 | id: 78
1820 | tracker_id: 1
1821 | type: WorkflowTransition
1822 | WorkflowTransitions_159:
1823 | new_status_id: 5
1824 | role_id: 3
1825 | old_status_id: 2
1826 | id: 159
1827 | tracker_id: 2
1828 | type: WorkflowTransition
1829 | WorkflowTransitions_185:
1830 | new_status_id: 6
1831 | role_id: 1
1832 | old_status_id: 1
1833 | id: 185
1834 | tracker_id: 3
1835 | type: WorkflowTransition
1836 | WorkflowTransitions_267:
1837 | new_status_id: 2
1838 | role_id: 3
1839 | old_status_id: 6
1840 | id: 267
1841 | tracker_id: 3
1842 | type: WorkflowTransition
1843 | WorkflowTransitions_079:
1844 | new_status_id: 5
1845 | role_id: 3
1846 | old_status_id: 4
1847 | id: 79
1848 | tracker_id: 1
1849 | type: WorkflowTransition
1850 | WorkflowTransitions_186:
1851 | new_status_id: 1
1852 | role_id: 1
1853 | old_status_id: 2
1854 | id: 186
1855 | tracker_id: 3
1856 | type: WorkflowTransition
1857 | WorkflowTransitions_268:
1858 | new_status_id: 3
1859 | role_id: 3
1860 | old_status_id: 6
1861 | id: 268
1862 | tracker_id: 3
1863 | type: WorkflowTransition
1864 | WorkflowTransitions_187:
1865 | new_status_id: 3
1866 | role_id: 1
1867 | old_status_id: 2
1868 | id: 187
1869 | tracker_id: 3
1870 | type: WorkflowTransition
1871 | WorkflowTransitions_269:
1872 | new_status_id: 4
1873 | role_id: 3
1874 | old_status_id: 6
1875 | id: 269
1876 | tracker_id: 3
1877 | type: WorkflowTransition
1878 | WorkflowTransitions_188:
1879 | new_status_id: 4
1880 | role_id: 1
1881 | old_status_id: 2
1882 | id: 188
1883 | tracker_id: 3
1884 | type: WorkflowTransition
1885 |
--------------------------------------------------------------------------------
/test/functional/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaginary-cloud/redmine_risk_management/b070788fd63bc5b2ddea18a671a9640465c7b229/test/functional/.gitkeep
--------------------------------------------------------------------------------
/test/functional/issues_controller_test.rb:
--------------------------------------------------------------------------------
1 | require File.expand_path('../../test_helper', __FILE__)
2 |
3 | class IssuesControllerTest < ActionController::TestCase
4 | fixtures :projects,
5 | :users,
6 | :roles,
7 | :members,
8 | :member_roles,
9 | :issues,
10 | :issue_statuses,
11 | :versions,
12 | :trackers,
13 | :projects_trackers,
14 | :issue_categories,
15 | :enabled_modules,
16 | :enumerations,
17 | :attachments,
18 | :workflows,
19 | :custom_fields,
20 | :custom_values,
21 | :custom_fields_projects,
22 | :custom_fields_trackers,
23 | :time_entries,
24 | :journals,
25 | :journal_details,
26 | :queries,
27 | :risks
28 |
29 | def setup
30 | @issue = issues(:issues_001)
31 | @risk = risks(:risks_001)
32 | @risk.issues << @issue
33 | end
34 |
35 | test 'should display related risk' do
36 | get :show, { id: @issue }
37 | assert_template :show
38 | assert_select '.box.risk a', text: "#{I18n.t(:label_risk)} ##{@risk.id}:"
39 | end
40 | end
--------------------------------------------------------------------------------
/test/functional/risks_controller_test.rb:
--------------------------------------------------------------------------------
1 | require File.expand_path('../../test_helper', __FILE__)
2 |
3 | class RisksControllerTest < ActionController::TestCase
4 | fixtures :projects, :risks
5 |
6 | def setup
7 | @project = projects(:projects_001)
8 | @risk = risks(:risks_001)
9 | end
10 |
11 | test 'should get index' do
12 | @project.risks << @risk
13 |
14 | get :index, { project_id: @project }
15 | assert_template :index
16 | assert_not_nil assigns(:risks)
17 | assert_select 'table.risks' do
18 | assert_select 'td.title', @risk.title
19 | end
20 | end
21 |
22 | test 'should get new' do
23 | get :new, { project_id: @project }
24 | assert_template :new
25 | assert_not_nil assigns(:risk)
26 | end
27 |
28 | test 'should get edit' do
29 | get :edit, { project_id: @project, id: @risk }
30 | assert_template :edit
31 | assert_not_nil assigns(:risk)
32 | assert_equal @risk, assigns(:risk)
33 | assert_select 'input#risk_title[value=?]', @risk.title
34 | end
35 |
36 | test 'should get show' do
37 | get :show, { project_id: @project, id: @risk }
38 | assert_template :show
39 | assert_not_nil assigns(:risk)
40 | assert_equal @risk, assigns(:risk)
41 | assert_select 'h3', text: @risk.title
42 | end
43 |
44 | test 'should post create' do
45 | assert_difference 'Risk.count' do
46 | post :create, {
47 | project_id: @project,
48 | risk: { title: 'Risk testing', description: 'Risk testing description', probability: 2, impact: 4 }
49 | }
50 | end
51 | assert_redirected_to [@project, Risk.last]
52 | end
53 |
54 | test 'should put update' do
55 | put :update, {
56 | project_id: @project, id: @risk,
57 | risk: { title: 'Risk testing updated', description: 'Risk testing description updated', probability: 3, impact: 2 }
58 | }
59 | assert_redirected_to [@project, @risk]
60 | end
61 |
62 | test 'should destroy' do
63 | assert_difference 'Risk.count', -1 do
64 | delete :destroy, { project_id: @project, id: @risk }
65 | assert_redirected_to project_risks_path(@project)
66 | end
67 | end
68 | end
--------------------------------------------------------------------------------
/test/integration/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaginary-cloud/redmine_risk_management/b070788fd63bc5b2ddea18a671a9640465c7b229/test/integration/.gitkeep
--------------------------------------------------------------------------------
/test/test_helper.rb:
--------------------------------------------------------------------------------
1 | # Load the Redmine helper
2 | require File.expand_path(File.dirname(__FILE__) + '/../../../test/test_helper')
3 |
4 | # Ensure that we are using the temporary fixture path
5 | class ActiveSupport::TestCase
6 | self.fixture_path = File.dirname(__FILE__) + '/fixtures'
7 | end
--------------------------------------------------------------------------------
/test/unit/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaginary-cloud/redmine_risk_management/b070788fd63bc5b2ddea18a671a9640465c7b229/test/unit/.gitkeep
--------------------------------------------------------------------------------
/test/unit/risk_status_test.rb:
--------------------------------------------------------------------------------
1 | require File.expand_path('../../test_helper', __FILE__)
2 |
3 | class RiskStatusTest < ActiveSupport::TestCase
4 | fixtures :risk_statuses
5 |
6 | setup do
7 | @risk_status = risk_statuses(:risk_statuses_001)
8 | end
9 |
10 | test 'should be created' do
11 | risk_status = RiskStatus.new(name: 'Risk name', color: '#FFF', status_type: 'open')
12 | assert risk_status.save
13 | end
14 |
15 | test 'should validate name presence' do
16 | risk_status = RiskStatus.new
17 | assert risk_status.invalid?
18 | assert_equal [:name], risk_status.errors.keys.sort
19 | end
20 |
21 | test 'should validate name uniqueness' do
22 | @risk_status.update_attribute(:name, 'Risk 1')
23 | risk_status = RiskStatus.new(name: 'Risk 1')
24 | assert risk_status.invalid?
25 | assert_equal [:name], risk_status.errors.keys.sort
26 | end
27 |
28 | end
29 |
--------------------------------------------------------------------------------
/test/unit/risk_test.rb:
--------------------------------------------------------------------------------
1 | require File.expand_path('../../test_helper', __FILE__)
2 |
3 | class RiskTest < ActiveSupport::TestCase
4 | fixtures :projects, :risks, :users
5 |
6 | setup do
7 | @risk = risks(:risks_001)
8 | end
9 |
10 | test "should have the necessary presence validators" do
11 | risk = Risk.new
12 | assert risk.invalid?
13 | attributes = [:title, :description, :probability, :impact].sort
14 | assert_equal attributes, risk.errors.keys.sort
15 | end
16 |
17 | test 'should have numeric probability and impact between 1 and 4' do
18 | @risk.probability = 0
19 | @risk.impact = 5
20 | assert @risk.invalid?
21 |
22 | @risk.probability = 1
23 | @risk.impact = 3
24 | assert @risk.valid?
25 | end
26 |
27 | test 'should have rationale value in default list' do
28 | @risk.rationale = 'Mitigation'
29 | assert @risk.invalid?
30 |
31 | @risk.rationale = Risk::RATIONALES.sample
32 | assert @risk.valid?
33 | end
34 |
35 | test 'should calculate criticality as the product of probability and impact' do
36 | @risk.probability = 2
37 | @risk.impact = 4
38 | @risk.save
39 | assert_equal 8, @risk.criticality
40 | end
41 |
42 | test 'should be created' do
43 | risk = Risk.new(title: 'Risk title', description: 'Description for Risk',
44 | probability: 2, impact: 4, criticality: 4, rationale: 'Monitor')
45 | assert risk.save
46 | end
47 |
48 | end
49 |
--------------------------------------------------------------------------------