2022-05-07 20:08:51 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Integrations
|
|
|
|
module HasIssueTrackerFields
|
|
|
|
extend ActiveSupport::Concern
|
|
|
|
|
|
|
|
included do
|
2022-08-13 15:12:31 +05:30
|
|
|
self.field_storage = :data_fields
|
|
|
|
|
2022-05-07 20:08:51 +05:30
|
|
|
field :project_url,
|
|
|
|
required: true,
|
|
|
|
title: -> { _('Project URL') },
|
2022-08-13 15:12:31 +05:30
|
|
|
help: -> do
|
|
|
|
s_('IssueTracker|The URL to the project in the external issue tracker.')
|
|
|
|
end
|
2022-05-07 20:08:51 +05:30
|
|
|
|
|
|
|
field :issues_url,
|
|
|
|
required: true,
|
|
|
|
title: -> { s_('IssueTracker|Issue URL') },
|
|
|
|
help: -> do
|
2022-08-13 15:12:31 +05:30
|
|
|
ERB::Util.html_escape(
|
|
|
|
s_('IssueTracker|The URL to view an issue in the external issue tracker. Must contain %{colon_id}.')
|
|
|
|
) % {
|
2022-05-07 20:08:51 +05:30
|
|
|
colon_id: '<code>:id</code>'.html_safe
|
2022-08-13 15:12:31 +05:30
|
|
|
}
|
2022-05-07 20:08:51 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
field :new_issue_url,
|
|
|
|
required: true,
|
|
|
|
title: -> { s_('IssueTracker|New issue URL') },
|
2022-08-13 15:12:31 +05:30
|
|
|
help: -> do
|
|
|
|
s_('IssueTracker|The URL to create an issue in the external issue tracker.')
|
|
|
|
end
|
2022-05-07 20:08:51 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|