Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 340807 - custom drop down field is too wide
Summary: custom drop down field is too wide
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 minor (vote)
Target Milestone: 3.5.1   Edit
Assignee: Steffen Pingel CLA
QA Contact: Frank Becker CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-23 16:36 EDT by Sam Davis CLA
Modified: 2011-04-10 10:18 EDT (History)
1 user (show)

See Also:


Attachments
screenshot (4.78 KB, image/png)
2011-03-24 16:53 EDT, Sam Davis CLA
no flags Details
mylyn/context/zip (3.59 KB, application/octet-stream)
2011-04-01 21:42 EDT, Steffen Pingel CLA
no flags Details
fix (1.91 KB, patch)
2011-04-01 21:43 EDT, Steffen Pingel CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Davis CLA 2011-03-23 16:36:42 EDT
The sprint drop down is too wide. For some tasks, it spans both attribute columns, whereas for other tasks, it is in the right column and causes that column to be too wide. Which column it goes in seems to depend on whether the task has any subtasks.
Comment 1 Steffen Pingel CLA 2011-03-23 18:32:22 EDT
That is related to third party extension. We are not able to address that on the Mylyn end.
Comment 2 Shawn Minto CLA 2011-03-24 16:45:40 EDT
Actually, this is just a custom dropdown field in a bugzilla editor and not specific to a third party extension.  Sam, can you post a small screenshot of what this dropdown looks like, especially since it will lay out properly sometimes as well?
Comment 3 Sam Davis CLA 2011-03-24 16:53:36 EDT
Created attachment 191867 [details]
screenshot

One task shown above the red line, another below. Notice that the Sprint field is wide and the Effort field is in a different order.
Comment 4 Sam Davis CLA 2011-03-24 16:54:48 EDT
I actually don't think this is related to the blocks or depends fields (contrary to what I said in the description).
Comment 5 Steffen Pingel CLA 2011-03-24 17:37:14 EDT
Interesting. Looks like the spring field has weird version constraints.
Comment 6 Shawn Minto CLA 2011-03-24 18:05:57 EDT
Umm, you have been doing releng too long :D  I assume that you mean that the sprint field has some weird sizing constraints :D
Comment 7 Frank Becker CLA 2011-03-28 15:55:19 EDT
Can you post the definitions and values of your cf fields?
Comment 8 Steffen Pingel CLA 2011-04-01 21:42:40 EDT
I have committed the attached fix to head. Can you verify Sam if that fixes the problem for you?
Comment 9 Steffen Pingel CLA 2011-04-01 21:42:44 EDT
Created attachment 192406 [details]
mylyn/context/zip
Comment 10 Steffen Pingel CLA 2011-04-01 21:43:25 EDT
Created attachment 192407 [details]
fix
Comment 11 Sam Davis CLA 2011-04-04 14:32:41 EDT
That has fixed the width problem. Note that the fields still appear in different orders on different tasks.
Comment 12 Steffen Pingel CLA 2011-04-04 15:36:24 EDT
Frank, is the order in which custom fields are added to task data fixed?
Comment 13 Frank Becker CLA 2011-04-04 16:27:45 EDT
(In reply to comment #12)
> Frank, is the order in which custom fields are added to task data fixed?

The order is set by LayoutHint.getPriority()

and we overwrite it in BugzillaTaskEditorPage.createAttributeEditorFactory for custom fields we multiply the value with 10.

Should we add sort for id when priorities are equal?

Thoughts?
Comment 14 Steffen Pingel CLA 2011-04-05 05:35:45 EDT
Attributes that have an equal priority should still end up in the same order on each task following the order in which they were added to the task data.
Comment 15 Steffen Pingel CLA 2011-04-08 03:51:38 EDT
Applied patch to e_3_7_m_3_5_x branch.
Comment 16 Steffen Pingel CLA 2011-04-10 10:18:06 EDT
I have opened bug 342367 to track the problem that causes differences in the ordering of custom attributes which is unrelated to the original problem tracked on this bug.