Project

General

Profile

Actions

Defect #33338

closed

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

Added by Greg T about 4 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Issues
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

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.


Files

history_tabs.patch (1.01 KB) history_tabs.patch expected filtering Greg T, 2020-04-22 11:48
0001-Apply-patch-posted-by-Mischa-in-33338-note-5.patch (1.66 KB) 0001-Apply-patch-posted-by-Mischa-in-33338-note-5.patch Marius BĂLTEANU, 2021-03-16 22:20
history-tab.png (41.4 KB) history-tab.png Bernhard Rohloff, 2021-03-17 05:47
notes-tab.png (36.2 KB) notes-tab.png Bernhard Rohloff, 2021-03-17 05:47
0002-Always-show-journals-with-thumbnails-in-notes-tab.patch (1.18 KB) 0002-Always-show-journals-with-thumbnails-in-notes-tab.patch Marius BĂLTEANU, 2021-03-17 08:35

Related issues

Related to Redmine - Feature #3058: Show issue history using tabsClosedJean-Philippe Lang2009-03-26

Actions
Related to Redmine - Defect #38217: "Property changes" tab does not appear when all issue journals have both notes and property changesClosedGo MAEDA

Actions
Actions #1

Updated by Go MAEDA about 4 years ago

Actions #2

Updated by Go MAEDA almost 4 years 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;
Actions #3

Updated by Greg T almost 4 years 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.

Actions #4

Updated by Go MAEDA almost 4 years 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.

Actions #5

Updated by Mischa The Evil almost 4 years 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)

Actions #6

Updated by Marius BĂLTEANU almost 4 years 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.

Actions #7

Updated by Marius BĂLTEANU about 3 years ago

  • Assignee set to Marius BĂLTEANU
Actions #8

Updated by Marius BĂLTEANU about 3 years 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.

Actions #9

Updated by Marius BĂLTEANU about 3 years ago

Actions #10

Updated by Bernhard Rohloff about 3 years 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
Actions #11

Updated by Marius BĂLTEANU about 3 years 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.

Actions #12

Updated by Marius BĂLTEANU about 3 years ago

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

Updated by Marius BĂLTEANU about 3 years ago

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

Updated by Go MAEDA about 3 years ago

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

Committed the fix. Thank you.

Actions #16

Updated by Go MAEDA about 1 year ago

  • Related to Defect #38217: "Property changes" tab does not appear when all issue journals have both notes and property changes added
Actions

Also available in: Atom PDF