Defect #33338
closedProperty changes tab does not show journals with both property changes and notes
0%
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
Related issues
Updated by Go MAEDA over 4 years ago
- Related to Feature #3058: Show issue history using tabs added
Updated by Go MAEDA over 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;
Updated by Greg T over 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.
Updated by Go MAEDA over 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.
Updated by Mischa The Evil over 4 years ago
- journals with both notes and property changes are not shown on the property changes tab
- 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)
Updated by Marius BĂLTEANU over 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.
Updated by Marius BĂLTEANU over 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.
Updated by Marius BĂLTEANU over 3 years ago
- File 0002-Show-thumbnails-in-notes-tab-but-without-details.patch added
- File 0001-Apply-patch-posted-by-Mischa-in-33338-note-5.patch 0001-Apply-patch-posted-by-Mischa-in-33338-note-5.patch added
- Assignee changed from Marius BĂLTEANU to Go MAEDA
Updated by Bernhard Rohloff over 3 years ago
- File notes-tab.png notes-tab.png added
- File history-tab.png history-tab.png added
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 |
---|---|
![]() |
![]() |
Updated by Marius BĂLTEANU over 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.
Updated by Marius BĂLTEANU over 3 years ago
- File deleted (
0002-Show-thumbnails-in-notes-tab-but-without-details.patch)
Updated by Marius BĂLTEANU over 3 years ago
- File deleted (
0002-Always-show-journals-with-thumbnails-in-notes-tab.patch)
Updated by Go MAEDA over 3 years ago
- Status changed from New to Closed
- Resolution set to Fixed
Committed the fix. Thank you.
Updated by Go MAEDA over 1 year ago
- Related to Defect #38217: "Property changes" tab does not appear when all issue journals have both notes and property changes added