debian-mirror-gitlab/app/models/concerns/integrations/has_issue_tracker_fields.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
984 B
Ruby
Raw Normal View History

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,
2023-06-20 00:43:36 +05:30
required: true,
title: -> { _('Project URL') },
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,
2023-06-20 00:43:36 +05:30
required: true,
title: -> { s_('IssueTracker|Issue URL') },
help: -> do
ERB::Util.html_escape(
s_('IssueTracker|The URL to view an issue in the external issue tracker. Must contain %{colon_id}.')
) % {
colon_id: '<code>:id</code>'.html_safe
}
end
2022-05-07 20:08:51 +05:30
field :new_issue_url,
2023-06-20 00:43:36 +05:30
required: true,
title: -> { s_('IssueTracker|New issue URL') },
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