Commit bb96902e authored by Arturo Herrero's avatar Arturo Herrero

Refactor service external issue tracker and wiki

parent e261c79f
......@@ -422,8 +422,12 @@ class Service < ApplicationRecord
ProjectServiceWorker.perform_async(id, data)
end
def issue_tracker?
self.category == :issue_tracker
def external_issue_tracker?
category == :issue_tracker && active?
end
def external_wiki?
type == 'ExternalWikiService' && active?
end
# override if needed
......
......@@ -34,11 +34,11 @@ class BulkCreateIntegrationService
end
def run_callbacks(batch)
if integration.issue_tracker? && integration.active?
if integration.external_issue_tracker?
batch.update_all(has_external_issue_tracker: true)
end
if integration.type == 'ExternalWikiService' && integration.active?
if integration.external_wiki?
batch.update_all(has_external_wiki: true)
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment