Defect #33338

Property changes tab does not show journals with both property changes and notes

Added by Greg T about 1 year ago. Updated about 1 month ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Issues
Target version:4.1.2
Resolution:Fixed Affected version:4.1.1

Description

     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 property changes tab.
OTOH, property changes won't be hidden on the notes tab for this entry.

Patch added to fix this issue.

history_tabs.patch Magnifier - expected filtering (1.01 KB) Greg T, 2020-04-22 11:48

0001-Apply-patch-posted-by-Mischa-in-33338-note-5.patch Magnifier (1.66 KB) Marius BALTEANU, 2021-03-16 22:20

history-tab.png (41.4 KB) Bernhard Rohloff, 2021-03-17 05:47

notes-tab.png (36.2 KB) Bernhard Rohloff, 2021-03-17 05:47

0002-Always-show-journals-with-thumbnails-in-notes-tab.patch Magnifier (1.18 KB) Marius BALTEANU, 2021-03-17 08:35


Related issues

Related to Redmine - Feature #3058: Show issue history using tabs Closed 2009-03-26

Associated revisions

Revision 20822
Added by Go MAEDA about 1 month ago

Property changes tab does not show journals with both property changes and notes (#33338).

Patch by Mischa The Evil and Marius BALTEANU.

Revision 20823
Added by Go MAEDA about 1 month ago

Merged r20822 from trunk to 4.1-stable (#33338).

History

#1 Updated by Go MAEDA about 1 year ago

#2 Updated by Go MAEDA about 1 year ago

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 changes tab.

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 are important 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 about changing 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) {

   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();
   }

   return false;

#3 Updated by Greg T about 1 year ago

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 Updated by Go MAEDA about 1 year ago

  • Subject changed from History tabs added in #3058 don't show what is expected based on the tab names to Property changes tab does not show journals with both property changes and notes
  • Target version set to 4.1.2

Setting the target version to 4.1.2.

#5 Updated by Mischa The Evil about 1 year ago

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 notes tab (and the other inconsistencies that are already present [eg. attachments and issue relations "being tracked" as file/relation properties, associated revisions/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:

 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();
   }

   return false;

1 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 (leading to all kinds of weird behavior)

#6 Updated by Marius BALTEANU about 1 year ago

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 "being tracked" 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 Updated by Marius BALTEANU about 1 month ago

  • Assignee set to Marius BALTEANU

#8 Updated by Marius BALTEANU about 1 month ago

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 hide details
+      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 Updated by Marius BALTEANU about 1 month ago

#10 Updated by Bernhard Rohloff about 1 month ago

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.

history notes

#11 Updated by Marius BALTEANU about 1 month ago

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

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 the same way as journal with notes.

#12 Updated by Marius BALTEANU about 1 month ago

  • File deleted (0002-Show-thumbnails-in-notes-tab-but-without-details.patch)

#13 Updated by Marius BALTEANU about 1 month ago

  • File deleted (0002-Always-show-journals-with-thumbnails-in-notes-tab.patch)

#15 Updated by Go MAEDA about 1 month ago

  • Status changed from New to Closed
  • Resolution set to Fixed

Committed the fix. Thank you.

Also available in: Atom PDF