Class: RedmineRemotes::IssueFetch::Base
- Inherits:
-
EacRailsUtils::Models::Tableless
- Object
- EacRailsUtils::Models::Tableless
- RedmineRemotes::IssueFetch::Base
show all
- Includes:
- EacRailsUtils::Models::FetchErrors
- Defined in:
- app/tableless_models/redmine_remotes/issue_fetch/base.rb,
app/tableless_models/redmine_remotes/issue_fetch/base/local_issue.rb,
app/tableless_models/redmine_remotes/issue_fetch/base/remote_issue.rb,
app/tableless_models/redmine_remotes/issue_fetch/base/provider_issue.rb
Defined Under Namespace
Modules: LocalIssue, ProviderIssue, RemoteIssue
Instance Method Summary
collapse
Instance Method Details
#author_present ⇒ Object
21
22
23
24
25
26
27
|
# File 'app/tableless_models/redmine_remotes/issue_fetch/base.rb', line 21
def author_present
return if provider_issue.blank?
return if local_issue_author.present?
errors.add(:remote_code,
"Usuário local não encontrado para \"#{provider_issue.author_login}\"")
end
|
#provider_issue_present ⇒ Object
29
30
31
32
33
34
35
|
# File 'app/tableless_models/redmine_remotes/issue_fetch/base.rb', line 29
def provider_issue_present
return if issue_remote_code.blank?
return if provider_issue.present?
errors.add(:remote_code,
"Demanda remota não encontrada com o código \"#{issue_remote_code}\"")
end
|
#save ⇒ Object
37
38
39
40
41
42
43
44
|
# File 'app/tableless_models/redmine_remotes/issue_fetch/base.rb', line 37
def save
::Issue.transaction do
return false unless valid? return false unless save_local_issue return false unless save_remote_issue end
true
end
|