OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Reset the selectTarget after an action has been added. Add type method to user custom field strategies to use the user autocompleter for user custom fields.
Dombi Attila9c35cb4424b2
diff --git a/app/models/custom_actions/actions/custom_field.rb b/app/models/custom_actions/actions/custom_field.rbindex 91c381f3054..374b3406218 100644--- a/app/models/custom_actions/actions/custom_field.rb+++ b/app/models/custom_actions/actions/custom_field.rb@@ -35,14 +35,6 @@ class CustomActions::Actions::CustomField < CustomActions::Actions::Baseraise NotImplementedErrorend- def type- if custom_field.field_format == "user"- :user- else- super- end- end-def custom_fieldself.class.custom_fieldenddiff --git a/app/models/custom_actions/actions/strategies/user_custom_field.rb b/app/models/custom_actions/actions/strategies/user_custom_field.rbindex 3b0bc41e3c9..53ba9431fc8 100644--- a/app/models/custom_actions/actions/strategies/user_custom_field.rb+++ b/app/models/custom_actions/actions/strategies/user_custom_field.rb@@ -30,6 +30,10 @@ module CustomActions::Actions::Strategies::UserCustomFieldinclude CustomActions::Actions::Strategies::CustomFieldinclude ::CustomActions::Actions::Strategies::MeAssociated+ def type+ :user+ end+def apply(work_package)if work_package.respond_to?(custom_field.attribute_setter)work_package.send(custom_field.attribute_setter, transformed_value(values.first))diff --git a/frontend/src/stimulus/controllers/dynamic/hide-sections.controller.ts b/frontend/src/stimulus/controllers/dynamic/hide-sections.controller.tsindex 4a856137199..a0ab5f58a05 100644--- a/frontend/src/stimulus/controllers/dynamic/hide-sections.controller.ts+++ b/frontend/src/stimulus/controllers/dynamic/hide-sections.controller.ts@@ -32,6 +32,7 @@ export default class extends Controller {}this.toggleOption(selectedValue);+ this.selectTarget.selectedIndex = 0;}hide(event:MouseEvent) {diff --git a/spec/models/custom_actions/actions/custom_field_spec.rb b/spec/models/custom_actions/actions/custom_field_spec.rbindex d1b4d7ce2f7..4ba3d4330b8 100644--- a/spec/models/custom_actions/actions/custom_field_spec.rb+++ b/spec/models/custom_actions/actions/custom_field_spec.rb@@ -264,7 +264,7 @@ RSpec.describe CustomActions::Actions::CustomField doit "is :associated_property" doexpect(instance.type)- .to be(:associated_property)+ .to be(:user)enddescribe "current_user special value" do