redmine_remotes 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/remote_issues_controller.rb +2 -1
- data/app/models/redmine_remotes/tableless/remote_issue_fetch/base.rb +4 -7
- data/app/models/redmine_remotes/tableless/remote_issue_fetch/create.rb +6 -5
- data/app/models/redmine_remotes/tableless/remote_issue_fetch/create/_local_issue.rb +1 -1
- data/app/models/redmine_remotes/tableless/remote_issue_fetch/update/_local_issue.rb +2 -2
- data/lib/redmine_remotes/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b65843d810df106f89cfab8c6da6beef03d5421263f21a7b7730e9dab08ce13
|
4
|
+
data.tar.gz: ec23913f8340a42f5c69f28e0f24f72baacf3b59b38adb9d8f32dadeca9fc06c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 886781f236327ed6e0d30d26f3950e80a07629c3c2905c8bf98a50cb8c9ed10daa9be495c804059d2ac195816894c77ee2af43e87d3c253ccb20a568bcd0bb5d
|
7
|
+
data.tar.gz: 41578f7e2bfa7a6c97bdad8cc9bff55c1a8e26f8099d5ba824c0b0e420ed746ee46f8058b6d9cfb8069de6fc6dda8c4b16b5ed566bce325abada1043e1b268dd
|
@@ -9,6 +9,7 @@ class RemoteIssuesController < ApplicationController
|
|
9
9
|
require_permission PERMISSIONS
|
10
10
|
|
11
11
|
active_scaffold :remote_issue do |conf|
|
12
|
-
conf.columns[:
|
12
|
+
conf.columns[:remote_tracker].form_ui = :select
|
13
|
+
conf.actions.exclude :create, :update, :delete
|
13
14
|
end
|
14
15
|
end
|
@@ -11,16 +11,13 @@ module RedmineRemotes
|
|
11
11
|
require_sub __FILE__
|
12
12
|
include ::Eac::Model
|
13
13
|
|
14
|
+
validates :local_tracker, presence: true
|
15
|
+
validates :remote_tracker, presence: true
|
16
|
+
validates :issue_remote_code, presence: true
|
17
|
+
|
14
18
|
validate :author_present
|
15
19
|
validate :provider_issue_present
|
16
20
|
|
17
|
-
def tracker_in_project
|
18
|
-
return unless local_tracker.present? && project.present?
|
19
|
-
return if project.trackers.include?(local_tracker)
|
20
|
-
|
21
|
-
errors.add(:local_tracker, 'is not a tracker of project')
|
22
|
-
end
|
23
|
-
|
24
21
|
def author_present
|
25
22
|
return if provider_issue.blank?
|
26
23
|
return if local_issue_author.present?
|
@@ -15,10 +15,7 @@ module RedmineRemotes
|
|
15
15
|
belongs_to :project, class_name: 'Project'
|
16
16
|
belongs_to :remote_tracker, class_name: 'RemoteTracker'
|
17
17
|
|
18
|
-
validates :local_tracker, presence: true
|
19
|
-
validates :remote_tracker, presence: true
|
20
18
|
validates :project, presence: true
|
21
|
-
validates :issue_remote_code, presence: true
|
22
19
|
|
23
20
|
validate :tracker_in_project
|
24
21
|
|
@@ -47,8 +44,12 @@ module RedmineRemotes
|
|
47
44
|
end
|
48
45
|
|
49
46
|
def update
|
50
|
-
::RedmineRemotes::Tableless::RemoteIssueFetch::Update
|
51
|
-
|
47
|
+
update_record = ::RedmineRemotes::Tableless::RemoteIssueFetch::Update
|
48
|
+
.new(remote_issue: remote_issue_by_remote_code)
|
49
|
+
return true if update_record.save
|
50
|
+
|
51
|
+
fetch_record_errors(update_record, default_column: default_error_column)
|
52
|
+
false
|
52
53
|
end
|
53
54
|
end
|
54
55
|
end
|
@@ -11,13 +11,13 @@ module RedmineRemotes
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def local_tracker
|
14
|
-
local_issue.tracker
|
14
|
+
local_issue.if_present(&:tracker)
|
15
15
|
end
|
16
16
|
|
17
17
|
def update_local_issue_with_remote_data
|
18
18
|
return true if local_issue.update(local_issue_provider_attributes)
|
19
19
|
|
20
|
-
fetch_record_errors(local_issue, default_column:
|
20
|
+
fetch_record_errors(local_issue, default_column: default_error_column)
|
21
21
|
false
|
22
22
|
end
|
23
23
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redmine_remotes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eduardo Henrique Bogoni
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aranha-parsers
|