mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
Update assignee field to custom field of type user
This commit is contained in:
@@ -124,7 +124,7 @@ class Projects::Settings::CreationWizardController < Projects::SettingsControlle
|
||||
submission_status_when_submitted_id
|
||||
submission_send_confirmation_email
|
||||
submission_notification_text
|
||||
submission_assignee_ids]
|
||||
submission_assignee_id]
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -81,24 +81,24 @@ module Projects
|
||||
)
|
||||
|
||||
f.autocompleter(
|
||||
name: :submission_assignee_ids,
|
||||
name: :submission_assignee_id,
|
||||
label: I18n.t("settings.project_initiation_request.submission.assignee"),
|
||||
caption: I18n.t("settings.project_initiation_request.submission.assignee_caption"),
|
||||
required: true,
|
||||
input_width: :large,
|
||||
autocomplete_options: {
|
||||
component: "opce-user-autocompleter",
|
||||
hideSelected: true,
|
||||
defaultData: true,
|
||||
placeholder: I18n.t(:label_user_search),
|
||||
url: ::API::V3::Utilities::PathHelper::ApiV3Path.principals,
|
||||
filters: [
|
||||
{ name: "type", operator: "=", values: ["User"] }
|
||||
],
|
||||
searchKey: "any_name_attribute",
|
||||
multiple: true
|
||||
component: "opce-autocompleter",
|
||||
decorated: true
|
||||
}
|
||||
)
|
||||
) do |list|
|
||||
model.available_custom_fields.where(field_format: "user").order(:name).each do |custom_field|
|
||||
list.option(
|
||||
value: custom_field.id,
|
||||
label: custom_field.name,
|
||||
selected: custom_field.id == model.submission_assignee_id
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
f.rich_text_area(
|
||||
name: :submission_notification_text,
|
||||
|
||||
@@ -37,7 +37,7 @@ module Projects::CreationWizard
|
||||
store_attribute :settings, :submission_work_package_type_id, :integer
|
||||
store_attribute :settings, :submission_status_when_submitted_id, :integer
|
||||
store_attribute :settings, :submission_send_confirmation_email, :boolean
|
||||
store_attribute :settings, :submission_assignee_ids, :json
|
||||
store_attribute :settings, :submission_assignee_id, :integer
|
||||
store_attribute :settings, :submission_notification_text, :string
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user