プロジェクト

全般

プロフィール

Vote #81894

未完了

Mentions not working if status is changed

Admin Redmine さんが約2年前に追加. 約2年前に更新.

ステータス:
Confirmed
優先度:
通常
担当者:
-
カテゴリ:
Email notifications_9
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
9
version_id:
178
issue_org_id:
36909
author_id:
584337
assigned_to_id:
107353
comments:
8
status_id:
9
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
155
ステータス-->[Confirmed]

説明

In Redmine 5.0 the new Mentions feature is not working, if the status of the ticket is changed.
It seems there is an error caused by reassigning a variable:

!image.png!

//

Steps to reproduce:

  • Edit Ticket
  • @Mentions works
  • Change Status to other state
  • @Mentions not working and the obove error is shown in dev tools

journals

--------------------------------------------------------------------------------
The same happens with attachments.
Steps
# Edit ticket
# Select a file to attach
The file appears at Files section
# Change issue status to other state

Right after the status change, the file listed at Files section, is removed, and the error above is printed on browser console.
--------------------------------------------------------------------------------
Is there a patch ready for this ?
--------------------------------------------------------------------------------
Thanks for reporting this!

Can you test the following patch?
<pre><code class="patch">
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 1dfa26cb2..031273d44 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -1831,9 +1831,7 @@ module ApplicationHelper

def update_data_sources_for_auto_complete(data_sources)
javascript_tag(
- "const currentDataSources = rm.AutoComplete.dataSources;" \
- "const newDataSources = JSON.parse('#{data_sources.to_json}'); " \
- "rm.AutoComplete.dataSources = Object.assign(currentDataSources, newDataSources);"
+ "rm.AutoComplete.dataSources = Object.assign(rm.AutoComplete.dataSources, JSON.parse('#{data_sources.to_json}'));"
)
end
</code></pre>

This patch fixes only the console error.
--------------------------------------------------------------------------------
Fernando Hartmann wrote:
> The same happens with attachments.
> Steps
> # Edit ticket
> # Select a file to attach
> The file appears at Files section
> # Change issue status to other state
>
> Right after the status change, the file listed at Files section, is removed, and the error above is printed on browser console.

This is a different error and it's generated by the change from #34641. Until a proper fix is ready, you can try reverting the changes from @app/views/issues/edit.js.erb@ and @app/views/issues/edit.js.erb@.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Created a new issue (#37053) for the second issue.
--------------------------------------------------------------------------------
Marius BALTEANU wrote:
> Thanks for reporting this!
>
> Can you test the following patch?
> [...]
>
> This patch fixes only the console error.

worked for me with same issue. thank you
--------------------------------------------------------------------------------


related_issues

copied_to,Confirmed,37053,Attachments are lost when the status of the ticket is changed

Admin Redmine さんが約2年前に更新

  • カテゴリEmail notifications_9 にセット
  • 対象バージョン5.0.1_178 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0