Merge pull request #8033 from andrej-scinote/aj_SCI_10644

Fix generating of double activities [SCI-10644]
This commit is contained in:
andrej-scinote 2024-11-12 10:07:27 +01:00 committed by GitHub
commit d1c918b68f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 14 additions and 11 deletions

View file

@ -57,18 +57,20 @@ class MyModuleTagsController < ApplicationController
@mt.created_by = current_user
@mt.save
my_module = @mt.my_module
if @mt.valid?
my_module = @mt.my_module
Activities::CreateActivityService
.call(activity_type: :add_task_tag,
owner: current_user,
subject: my_module,
project: my_module.project,
team: my_module.team,
message_items: {
my_module: my_module.id,
tag: @mt.tag.id
})
Activities::CreateActivityService
.call(activity_type: :add_task_tag,
owner: current_user,
subject: my_module,
project: my_module.project,
team: my_module.team,
message_items: {
my_module: my_module.id,
tag: @mt.tag.id
})
end
redirect_to my_module_tags_edit_path(format: :json), turbolinks: false,
status: :see_other
end

View file

@ -67,6 +67,7 @@ window.initDateTimePickerComponent = (id) => {
},
clearDate() {
this.date = null;
this.$refs.vueDateTime.manualUpdate = true;
this.$refs.vueDateTime.datetime = null;
this.$nextTick(() => {
if (this.onChange) this.onChange(null);