Bug 60705 - Aggregate Report: Column titles for percentiles is changing when reordered.
Summary: Aggregate Report: Column titles for percentiles is changing when reordered.
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 3.0
Hardware: PC All
: P2 minor (vote)
Target Milestone: JMETER_5.0
Assignee: JMeter issues mailing list
URL:
Keywords: FixedInTrunk
Depends on:
Blocks:
 
Reported: 2017-02-07 17:04 UTC by William
Modified: 2018-09-05 15:32 UTC (History)
1 user (show)



Attachments
Moving the "99% Line" column past the "Min" column resulting in the title changing to "{0}% Line" (3.26 KB, image/png)
2017-02-07 17:04 UTC, William
Details
Format labels early, so that they don't need parameters later on (6.39 KB, patch)
2018-06-28 17:01 UTC, Felix Schumacher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description William 2017-02-07 17:04:04 UTC
Created attachment 34730 [details]
Moving the "99% Line" column past the "Min" column resulting in the title changing to "{0}% Line"

When looking at the results in an Aggregate Report, if you change the ordering of the percentile columns by clicking and dragging them the title will change.  This only occurs when moving any of the three percentile columns.

If you move any of them to swap places with another percentile column, the titles will switch.  For example, if you were to move the "99% Line" column between the "90% Line" and "95% Line" columns, it would swap titles with the "95% Line" column.  The data remains the same, only the column title changes.

If any of the percentile columns are move past the "Median" or "Min" columns, they get changed to be titled "{0}% Line".  I attached a picture of this occurring when moving the "99% Line" column past the "Min" column.

Again, to clarify, this problem only occurs for the percentile columns in the Aggregate Report.  The data in the columns is moved properly, it is just the title that is erroneously changed.
Comment 1 Felix Schumacher 2018-06-25 20:32:45 UTC
The problem here is, that HeaderAsPropertyRenderer#getText combines the raw column label (that gets moved around by ObjectTableModel) with the ColumnsMsgParameters from HeaderAsPropertyRendererWrapper (which stay at their original places).

So we would either have to format the labels at an earlier moment and loose the ability to switch languages in the GUI, or place the columnsMsgParameters into ObjectTableModel - so that they can get shuffled, too -, or convert columnsMsgParameters to a map (label to parameter), so that we can look up the correct parameters for the labels.

At the moment I tend to favour the early formatting of the label, even if we loose changing the language for this particular view.
Comment 2 Felix Schumacher 2018-06-28 17:01:32 UTC
Created attachment 35999 [details]
Format labels early, so that they don't need parameters later on

This fixes the reported problem, but removes the ability to switch languages in the GUI.

I think it would be nice to add a formatable label to ObjectModel that carries the columnsMsgParameters that this fix removes. That would have the advantage that the parameters get moved when the rows are moved.
Comment 3 Felix Schumacher 2018-06-28 19:14:47 UTC
Will be fixed in JMeter 4.1

@William, it would be nice, if you could check the next nightly, if it fixes your reported problem

Date: Thu Jun 28 19:13:00 2018
New Revision: 1834634

URL: http://svn.apache.org/viewvc?rev=1834634&view=rev
Log:
Fix headers of Aggregate Reports and friends when columns are moved around.

Bugzilla Id: 60705

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatGraphVisualizer.java
    jmeter/trunk/src/core/org/apache/jmeter/gui/util/HeaderAsPropertyRenderer.java
    jmeter/trunk/src/core/org/apache/jmeter/gui/util/HeaderAsPropertyRendererWrapper.java
    jmeter/trunk/xdocs/changes.xml