Bug 60705

Summary: Aggregate Report: Column titles for percentiles is changing when reordered.
Product: JMeter Reporter: William <willtc111>
Component: MainAssignee: JMeter issues mailing list <issues>
Severity: minor CC: p.mouawad
Priority: P2 Keywords: FixedInTrunk
Version: 3.0   
Target Milestone: JMETER_5.0   
Hardware: PC   
OS: All   
Attachments: Moving the "99% Line" column past the "Min" column resulting in the title changing to "{0}% Line"
Format labels early, so that they don't need parameters later on

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
Fix headers of Aggregate Reports and friends when columns are moved around.

Bugzilla Id: 60705