Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 170452

Summary: [mac] Task editor incorrectly detects platform on Mac
Product: z_Archived Reporter: Dmitry Stadnik <dimzzy>
Component: MylynAssignee: Frank Becker <eclipse>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P4 CC: eclipse, leo.dos.santos
Version: unspecifiedKeywords: helpwanted
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
mylar/context/zip
none
Patch created on MacBook Pro
none
Patch Intel Mac's running Mac OS X none

Description Dmitry Stadnik CLA 2007-01-15 05:44:56 EST
It says that my platform is PC while I'm on Mac. It will also be convenient to remember previously selected os and platform since typically I use All/All choices since I code in Java and most of the issues are cross-platform.
Comment 1 Eugene Kuleshov CLA 2007-01-15 13:33:30 EST
Are you on Intel Mac?
Comment 2 Dmitry Stadnik CLA 2007-01-15 13:37:02 EST
Yes, MB Pro.
Comment 3 Eugene Kuleshov CLA 2007-01-15 13:58:52 EST
That IS a PC. :-)
Comment 4 Dmitry Stadnik CLA 2007-01-16 05:34:38 EST
I got it )))
Comment 5 Eugene Kuleshov CLA 2007-01-16 12:02:29 EST
Hey, I was just kidding. :-)
If you get different defaults trough the web UI, it still could be an issue in Mylar. Also, remembering the last selection may make sense too...
Comment 6 Mik Kersten CLA 2007-01-18 23:17:35 EST
Reopening, per comment#5.  Since we don't currently have a Mac box to test on, I'm marking this helpwanted.  If anyone is interested in contributing a fix, please refer to BugzillaProductPage and NewBugWizardTest.testPlatformOptoins().  Attaching context...
Comment 7 Mik Kersten CLA 2007-01-18 23:17:37 EST
Created attachment 57119 [details]
mylar/context/zip
Comment 8 Frank Becker CLA 2007-05-07 17:10:27 EDT
I debug this and found a fix.

Change BugzillaProductPage line 150 
		java2buzillaOSMap.put("macosx", "MacOS X");
to
		java2buzillaOSMap.put("macosx", "Mac OS");

this makes that the if in line 446 (setPlatformOptions)
				if (opSysAttribute != null && opSysAttribute.getOptionParameter(bugzillaOS) == null) 
is eval to false so the variable bugzillaOS has value "Mac OS" and not null.

This change NewBugWizardTest from failure to Run.
Comment 9 Frank Becker CLA 2007-05-07 17:42:46 EDT
Created attachment 66222 [details]
Patch created on MacBook Pro

insert this lines alfter line 470 in /BugzillaProductPage.java
 if (bugzillaPlatform!= null && bugzillaPlatform.compareTo("PC")== 0 && OS.compareTo("macosx")== 0)
  bugzillaPlatform = "Macintosh";
Comment 10 Mik Kersten CLA 2007-05-08 12:27:20 EDT
Frank: in your patch I only see the change to default to "Macintosh" if the platform is not determined, and I didn't see the addition map addition that you suggest in comment#8.  Before we apply the patch could you comment on that, since we want to make sure that the platform does not default to Mac if it can not be determined.
Comment 11 Frank Becker CLA 2007-05-09 11:00:50 EDT
Created attachment 66483 [details]
Patch Intel Mac's running Mac OS X

I change the Patch so it only change the Platform if bugzillaPlatform  = "PC" and bugzillaOS = "Mac OS"

On Mac's with PPC Architecture I thing we get Power instead of Macintosh but because I do nat have a Power Mac any more i can not test this.
Comment 12 Mik Kersten CLA 2007-05-09 13:29:51 EDT
Excellent, patch applied.