redmine_airbrake_backend 0.3.3 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 618ee3d3d8ec581efd20a70331dcf0c95fc35f07
4
- data.tar.gz: 387de8062df6128c399eb18431bf66b2c610ee39
3
+ metadata.gz: 7c81ea1d572058eb01eaf6ca6e01737b3280d889
4
+ data.tar.gz: 09547734314aa2eefab4b4310845767b1f074aad
5
5
  SHA512:
6
- metadata.gz: e234cb1fd3984a9dc85465466efc9cc806572b8dbce306531e59825b4e97e5aaf63469844ada49c584ff4da1a5870472f4bc67221c5efaf665b9a0658301a318
7
- data.tar.gz: f4e8f815ad22df7e3060df447af795c6d20619ac96c8f48a653d32403cdd4909ade75b26c80251f62daabfa5465e0686608fca8d820a5f53a932b11ebaf12c88
6
+ metadata.gz: 9b807833875e1c7375e74213a4d24f8e1f90ba8172b1e5cf06d18799ebd651f45633a6a7476a7f175365b8ee79264a963d3047abb8195c1182ab7b49c576806d
7
+ data.tar.gz: f97588a065e4cdc4e46498fba37672eae768794f9931d1617f0c5c22e86e63b35c50cc53fa432097f6f2750459cd119ed958d7b1dd1a674dd3d607d74ecb6a7f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- redmine_airbrake_backend (0.3.3)
4
+ redmine_airbrake_backend (0.4.0)
5
5
  hpricot
6
6
  htmlentities
7
7
  rails
@@ -25,21 +25,24 @@ class AirbrakeController < ::ApplicationController
25
25
 
26
26
  custom_field_values = {}
27
27
 
28
+ # Error hash
29
+ custom_field_values[notice_hash_field.id] = notice_hash if @issue.new_record?
30
+
28
31
  # Update occurrences
29
32
  occurrences_value = @issue.custom_value_for(occurrences_field.id)
30
33
  custom_field_values[occurrences_field.id] = ((occurrences_value ? occurrences_value.value.to_i : 0) + 1).to_s if occurrences_field.present?
31
34
 
35
+ @issue.custom_field_values = custom_field_values
36
+
32
37
  # Reopen if closed
33
38
  if reopen? && @issue.status.is_closed?
39
+ desc = "*Issue reopened after occurring again in _#{@notice.env[:environment_name]}_ environment.*"
40
+ desc << "\n\n#{render_description}" if project_setting(:reopen_repeat_description)
41
+
34
42
  @issue.status = IssueStatus.where(is_default: true).order(:position).first
35
- @issue.init_journal(User.current, "Issue reopened after occurring again in environment #{@notice.env[:environment_name]}")
43
+ @issue.init_journal(User.current, desc)
36
44
  end
37
45
 
38
- # Hash
39
- custom_field_values[notice_hash_field.id] = notice_hash if @issue.new_record?
40
-
41
- @issue.custom_field_values = custom_field_values
42
-
43
46
  if @issue.save
44
47
  render xml: {
45
48
  notice: {
@@ -10,5 +10,5 @@ class AirbrakeProjectSetting < ActiveRecord::Base
10
10
 
11
11
  validates_presence_of :project_id
12
12
 
13
- safe_attributes :tracker_id, :category_id, :priority_id, :reopen_regexp
13
+ safe_attributes :tracker_id, :category_id, :priority_id, :reopen_regexp, :reopen_repeat_description
14
14
  end
@@ -19,8 +19,10 @@
19
19
  </p>
20
20
  <p>
21
21
  <%=f.text_field :reopen_regexp %>
22
- <br />
23
- (<%=l(:text_regexp_info)%>)
22
+ <em class="info">(<%=l(:text_regexp_info)%>)</em>
23
+ </p>
24
+ <p>
25
+ <%=f.check_box :reopen_repeat_description %>
24
26
  </p>
25
27
  </div>
26
28
 
@@ -0,0 +1,11 @@
1
+ de:
2
+ label_airbrake: Airbrake
3
+
4
+ field_reopen_regexp: Regulärer Ausdruck für erneutes Öffnen
5
+ field_reopen_repeat_description: Neue Fehlerbeschreibung bei erneutem Öffnen anfügen
6
+
7
+ settings_airbrake_hash_field: "Benutzerdefiniertes Feld für Fehlernummer"
8
+ settings_airbrake_occurrences_field: "Benutzerdefiniertes Feld für # Auftreten"
9
+
10
+ project_module_airbrake: Airbrake
11
+ permission_manage_airbrake: Airbrake verwalten
@@ -2,6 +2,7 @@ en:
2
2
  label_airbrake: Airbrake
3
3
 
4
4
  field_reopen_regexp: Reopen regular expression
5
+ field_reopen_repeat_description: Add new description on reopen
5
6
 
6
7
  settings_airbrake_hash_field: Notice Hash Custom Field
7
8
  settings_airbrake_occurrences_field: Occurrences Custom Field
@@ -0,0 +1,20 @@
1
+ class AddReopenRepeatDescription < ActiveRecord::Migration
2
+
3
+ def up
4
+ add_column :airbrake_project_settings, :reopen_repeat_description, :boolean
5
+
6
+ AirbrakeProjectSetting.reset_column_information
7
+
8
+ AirbrakeProjectSetting.find_each do |s|
9
+ s.reopen_repeat_description = false
10
+ s.save!
11
+ end
12
+
13
+ change_column :airbrake_project_settings, :reopen_repeat_description, :boolean, null: false, default: false
14
+ end
15
+
16
+ def down
17
+ remove_column :airbrake_project_settings, :reopen_repeat_description
18
+ end
19
+
20
+ end
@@ -1,3 +1,3 @@
1
1
  module RedmineAirbrakeBackend
2
- VERSION = '0.3.3'
2
+ VERSION = '0.4.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redmine_airbrake_backend
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Schwab
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-17 00:00:00.000000000 Z
11
+ date: 2013-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -102,9 +102,11 @@ files:
102
102
  - app/views/projects/settings/_airbrake.html.erb
103
103
  - app/views/settings/_airbrake.html.erb
104
104
  - bin/rails
105
+ - config/locales/de.yml
105
106
  - config/locales/en.yml
106
107
  - config/routes.rb
107
108
  - db/migrate/20130708102357_create_airbrake_project_settings.rb
109
+ - db/migrate/20131003151228_add_reopen_repeat_description.rb
108
110
  - lib/redmine_airbrake_backend.rb
109
111
  - lib/redmine_airbrake_backend/engine.rb
110
112
  - lib/redmine_airbrake_backend/notice.rb