Redmine - Defect #33338
Property changes tab does not show journals with both property changes and notes
2020-04-22 12:03 - Greg T

ステータス:

Closed

開始日:

優先度:

Normal

期日:担当者:

Go MAEDA

進捗率:0%

カテゴリ:

Issues

予定工数:

0.00時間対象バージョン:4.1.2

Resolution:

Fixed

Affected version:

4.1.1

説明
case 'properties':tab̲content.find('.journal.has-notes').hide();When you have a journal entry with both notes and property changes, this code in application.js hides it completely on the propertychanges tab.
OTOH, property changes won't be hidden on the notes tab for this entry.
Patch added to fix this issue.
関連するチケット:
関連している Redmine - Feature #3058: Show issue history using ...

Closed関連している Redmine - Defect #38217: "Property changes" tab do...

Closed2009-03-26

関係しているリビジョン
リビジョン 20822 - 2021-03-18 15:36 - Go MAEDA
Property changes tab does not show journals with both property changes and notes (#33338).
Patch by Mischa The Evil and Marius BALTEANU.
リビジョン 20823 - 2021-03-18 15:39 - Go MAEDA
Merged r20822 from trunk to 4.1-stable (#33338).

履歴#1 - 2020-04-22 14:48 - Go MAEDA- 関連している Feature #3058: Show issue history using tabs を追加#2 - 2020-05-02 08:14 - Go MAEDA
Greg T wrote:
When you have a journal entry with both notes and property changes, this code in application.js hides it completely on the property changestab.

I agree that "Property changes" tab should not skip journals that have notes.
OTOH, property changes won't be hidden on the notes tab for this entry.

But I prefer the current behavior. I want to just exclude journals without notes in "Notes" tab. Changes in fields such as status and assignee areimportant information even in "Notes" tab.
Hiding property changes completely in the notes tab is a big change, so I am concerned that many users (including me :)) may complain. How aboutchanging only "Property changes" tab with the following patch for now?
diff --git a/public/javascripts/application.js b/public/javascripts/application.js
index ac2d5f8b0..6ac145f00 100644--- a/public/javascripts/application.js+++ b/public/javascripts/application.js@@ -371,15 +371,18 @@function showIssueHistory(journal, url) {2024-10-11

1/5

switch(journal) {case 'notes':tab̲content.find('.journal').show();tab̲content.find('.journal:not(.has-notes)').hide();tab̲content.find('.journal.has-notes').show();tab̲content.find('.journal .wiki').show();break;
case 'properties':tab̲content.find('.journal.has-notes').hide();tab̲content.find('.journal:not(.has-notes)').show();tab̲content.find('.journal').show();tab̲content.find('.journal:not(.has-details)').hide();tab̲content.find('.journal .wiki').hide();break;
default:tab̲content.find('.journal').show();tab̲content.find('.journal .wiki').show();}++++++returnfalse;#3 - 2020-05-02 23:53 - Greg T
Go MAEDA wrote:
Hiding property changes completely in the notes tab is a big change, so I am concerned that many users (including me :)) may complain. How
about changing only "Property changes" tab with the following patch for now?

Do as you please. I'd still find that counter-intuitive, but I don't even need these tabs, so I could live with that.
#4 - 2020-05-03 02:38 - Go MAEDA- 題名 を History tabs added in #3058 don't show what is expected based on the tab names から Property changes tab does not show journals withboth property changes and notes に変更- 対象バージョン を 4.1.2 にセット
Setting the target version to 4.1.2.
#5 - 2020-05-03 09:09 - Mischa The Evil
This is a tricky issue consisting of two independent but inter-related parts:
1. journals with both notes and property changes are not shown on the property changes tab
2. journals with both notes and property changes are shown on the notes tab with property changes
Regarding the first: I agree with Go MAEDA and Greg T that this is a true issue.
Regarding the second: I agree with Greg T that this might be counter-intuitive (from a consistency perspective), however, given the goal of the notestab (and the other inconsistencies that are already present [eg. attachments and issue relations "being tracked" as file/relation properties, associatedrevisions/time entries "being tracked" as if they are journals, etc.]), I agree with Go MAEDA that, from a usability perspective, this inconsistency is(desirable and) acceptable.
Translating the above into a redefinition of what should be rendered in which tabs would look like:
Tab:

What to render:

Notes

journals with notes, with their property changes

Property changes

journals with property changes, without their notes

Regarding the posted solutions, both of them have one or more side-effects that might need to be taken care of. There might be others too.
Solution:

Side-effect(s):by Greg T (history̲tabs.patch)thumbnails are rendered for journals on property changes tab1

by Go MAEDA (#33338#note-2)

thumbnails are rendered for journals on property changes tab1
journal action buttons (which are in fact journal note action buttons)
are rendered for journals on property changes tab2

Alternative patch incorporating solutions for both side-effects mentioned in the table above:

2024-10-11

2/5

public/javascripts/application.js ¦ 15 ++++++++++++--1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/public/javascripts/application.js b/public/javascripts/application.js
index e4e902d..66b254a 100644--- a/public/javascripts/application.js+++ b/public/javascripts/application.js@@ -371,15 +371,24 @@function showIssueHistory(journal, url) {++++++++++++

switch(journal) {case 'notes':tab̲content.find('.journal').show();tab̲content.find('.journal:not(.has-notes)').hide();tab̲content.find('.journal.has-notes').show();tab̲content.find('.journal .wiki').show();tab̲content.find('.journal .thumbnails').show();tab̲content.find('.journal .contextual .journal-actions').show();break;
case 'properties':tab̲content.find('.journal.has-notes').hide();tab̲content.find('.journal:not(.has-notes)').show();tab̲content.find('.journal').show();tab̲content.find('.journal:not(.has-details)').hide();tab̲content.find('.journal .wiki').hide();tab̲content.find('.journal .thumbnails').hide();tab̲content.find('.journal .contextual .journal-actions').hide();break;
default:tab̲content.find('.journal').show();tab̲content.find('.journal .wiki').show();tab̲content.find('.journal .thumbnails').show();tab̲content.find('.journal .contextual .journal-actions').show();}
return1false;

thumbnails shouldn't be rendered in this tab IMHO

2

the buttons make the journal appear as if the property changes can be altered, while these buttons affect/relate to the journal notes only (leadingto all kinds of weird behavior)#6 - 2020-05-03 11:53 - Marius B

LTEANU

Thank you all for the feedback on this. The solution proposed by Mischa sounds good to me (I didn't test the patch yet).
Mischa The Evil wrote:[...], however, given the goal of the notes tab (and the other inconsistencies that are already present [eg. attachments and issue relations "beingtracked" as file/relation properties, associated revisions/time entries "being tracked" as if they are journals, etc.]), [...]

Mischa, how do you see a better implementation of this feature? Maybe we can improve it in the following releases.
#7 - 2021-03-15 08:34 - Marius B- 担当者 を Marius B

LTEANULTEANU にセット

#8 - 2021-03-16 22:11 - Marius B

LTEANU

In top of the changes proposed by Mischa, I think we should apply the following:
diff --git a/public/javascripts/application.js b/public/javascripts/application.js
index b322efc1e..726410bae 100644--- a/public/javascripts/application.js+++ b/public/javascripts/application.js@@ -367,11 +367,17 @@function showIssueHistory(journal, url) {tab̲content.find('.journal').show();tab̲content.find('.journal:not(.has-notes)').hide();tab̲content.find('.journal .wiki').show();tab̲content.find('.journal .thumbnails').show();tab̲content.find('.journal .contextual .journal-actions').show();++
var thumbnails = tab̲content.find('.journal .thumbnails');+// show thumbnails for journals with notes+
thumbnails.show();+// show thumbnails for journals without notes, but hide2024-10-11

details

3/5

++

@@+

thumbnails.parents('.journal').show().find('.details').hide();break;
case 'properties':tab̲content.find('.journal').show();tab̲content.find('.journal .details').show();tab̲content.find('.journal:not(.has-details)').hide();tab̲content.find('.journal .wiki').hide();tab̲content.find('.journal .thumbnails').hide();-381,6 +387,7 @@function showIssueHistory(journal, url) {tab̲content.find('.journal').show();tab̲content.find('.journal .wiki').show();tab̲content.find('.journal .thumbnails').show();tab̲content.find('.journal .details').show();tab̲content.find('.journal .contextual .journal-actions').show();}which always show the thumbnails in the notes tab regardless the type of journal (with or without notes).
To be honest, I think the current implementation become too complicated and we need an improved solution. Any ideas are welcome.
#9 - 2021-03-16 22:20 - Marius B

LTEANU- ファイル 0002-Show-thumbnails-in-notes-tab-but-without-details.patch を追加- ファイル 0001-Apply-patch-posted-by-Mischa-in-33338-note-5.patch を追加- 担当者 を Marius B

LTEANU から Go MAEDA に変更#10 - 2021-03-17 05:53 - Bernhard Rohloff- ファイル notes-tab.png を追加- ファイル history-tab.png を追加
I've applied the patches and got following results.
On the history tab notes with thumbnails also show the property changes.
On the notes tab these property changes are hidden for journal entries with thumbnails.
Is this the desired behavior? It was quite confusing for me.
historyhistory-tab.png#11 - 2021-03-17 08:31 - Marius B

notes
notes-tab.png

LTEANU- ファイル 0002-Always-show-journals-with-thumbnails-in-notes-tab.patch を追加
Thanks Bernhard for testing the patch. I agree with you, it's awkward. I've updated the second patch to display the journals with thumbnails in thesame way as journal with notes.
#12 - 2021-03-17 08:32 - Marius B

LTEANU- ファイル を削除 (0002-Show-thumbnails-in-notes-tab-but-without-details.patch)#13 - 2021-03-17 08:33 - Marius B

LTEANU- ファイル を削除 (0002-Always-show-journals-with-thumbnails-in-notes-tab.patch)#14 - 2021-03-17 08:35 - Marius B

LTEANU- ファイル 0002-Always-show-journals-with-thumbnails-in-notes-tab.patch を追加#15 - 2021-03-18 15:39 - Go MAEDA- ステータス を New から Closed に変更- Resolution を Fixed にセット
Committed the fix. Thank you.
#16 - 2023-01-28 08:30 - Go MAEDA- 関連している Defect #38217: "Property changes" tab does not appear when all issue journals have both notes and property changes を追加

2024-10-11

4/5

ファイル
history̲tabs.patch

1.01 KB

2020-04-22

0001-Apply-patch-posted-by-Mischa-in-33338-note-5.patch

1.66 KB

2021-03-16

Marius B

history-tab.png

41.4 KB

2021-03-17

Bernhard Rohloff

notes-tab.png

36.2 KB

2021-03-17

Bernhard Rohloff

0002-Always-show-journals-with-thumbnails-in-notes-tab.patch

1.18 KB

2021-03-17

Marius B

2024-10-11

Greg T

5/5

LTEANULTEANU