Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 318128 - usage of old CustomTransitionManager breaks task creation
Summary: usage of old CustomTransitionManager breaks task creation
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P2 normal (vote)
Target Milestone: 3.5   Edit
Assignee: Charley Wang CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 259291
  Show dependency tree
 
Reported: 2010-06-27 11:23 EDT by Thomas Ehrnhoefer CLA
Modified: 2011-01-13 23:04 EST (History)
4 users (show)

See Also:


Attachments
Patch for 318128 (1.47 KB, text/plain)
2010-06-27 22:48 EDT, Charley Wang CLA
steffen.pingel: iplog+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Ehrnhoefer CLA 2010-06-27 11:23:27 EDT
Synced up with Mylyn Head, bootstrapped from it. Then tried to create a task against an existing Bugzilla repository. Got the error message attached below. Tried again, same thing.
Shut down workspace, added breakpoint to BugzillaTaskDataHandler to see what's actually causing this, but on next start it all worked fine. Not really sure how the startStatus got to be null though


-- Error Details --
Date: Sun Jun 27 08:14:47 PDT 2010
Message: Error creating new task
Severity: Error
Product: Eclipse SDK 3.6.0.v201006080911 (org.eclipse.sdk.ide)
Plugin: org.eclipse.mylyn.tasks.ui
Session Data:
eclipse.buildId=I20100608-0911
java.version=1.6.0_20
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_CA
Framework arguments:  -product org.eclipse.sdk.ide -eclipse.keyring C:\work\org.eclipse.equinox.security\secure_storage
Command-line arguments:  -product org.eclipse.sdk.ide -data C:\work\workspaces\to bootstrap from/../to work from -dev file:C:/work/workspaces/to bootstrap from/.metadata/.plugins/org.eclipse.pde.core/bootstrap/dev.properties -os win32 -ws win32 -arch x86 -eclipse.keyring C:\work\org.eclipse.equinox.security\secure_storage


Exception Stack Trace:
org.eclipse.core.runtime.AssertionFailedException: null argument:
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85)
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:73)
at org.eclipse.mylyn.tasks.core.data.TaskAttribute.setValue(TaskAttribute.java:531)
at org.eclipse.mylyn.internal.bugzilla.core.BugzillaTaskDataHandler.initializeNewTaskDataAttributes(BugzillaTaskDataHandler.java:474)
at org.eclipse.mylyn.internal.bugzilla.core.BugzillaTaskDataHandler.initializeTaskData(BugzillaTaskDataHandler.java:435)
at org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal.createTaskData(TasksUiInternal.java:791)
at org.eclipse.mylyn.tasks.ui.wizards.NewTaskWizard$1.run(NewTaskWizard.java:102)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Comment 1 Steffen Pingel CLA 2010-06-27 21:45:32 EDT
Charley, is that the same as bug 317729: resolve custom initial state for Bugzilla?
Comment 2 Charley Wang CLA 2010-06-27 22:48:08 EDT
Created attachment 172866 [details]
Patch for 318128

It looks like an old CustomTransitionManager was saved and reused. The manager is not initialized each time the user clicks 'New Task' (for efficiency).

The attached patch should prevent this from happening again by returning the default start status (NEW) if the start status is null or blank.
Comment 3 Steffen Pingel CLA 2010-06-28 23:03:50 EDT
One of the is also a failing. Does the patch fix that as well or could you include a fix?

http://mylyn.eclipse.org/hudson/job/mylyn--heartbeat--connectors/6/testReport/org.eclipse.mylyn.bugzilla.tests/BugzillaCustomRepositoryTest/testWorkflow_3_6_1_Custom_Workflow_and_Status/

org.eclipse.core.runtime.CoreException: An unknown repository error has occurred: illegal bug status change
	at org.eclipse.mylyn.internal.bugzilla.core.BugzillaClient.parseRepositoryResponse(BugzillaClient.java:1769)
	at org.eclipse.mylyn.internal.bugzilla.core.BugzillaClient.parsePostResponse(BugzillaClient.java:1610)
	at org.eclipse.mylyn.internal.bugzilla.core.BugzillaClient.postTaskData(BugzillaClient.java:1101)
	at org.eclipse.mylyn.bugzilla.tests.support.BugzillaFixture.submitTask(BugzillaFixture.java:276)
	at org.eclipse.mylyn.bugzilla.tests.BugzillaCustomRepositoryTest.doCustomWorkflow(BugzillaCustomRepositoryTest.java:127)
	at org.eclipse.mylyn.bugzilla.tests.BugzillaCustomRepositoryTest.testWorkflow(BugzillaCustomRepositoryTest.java:39)
Comment 4 Charley Wang CLA 2010-06-29 00:45:01 EDT
(In reply to comment #3)
> One of the is also a failing. Does the patch fix that as well or could you
> include a fix?

The failing transition is from ASSIGNED --> NEW. The transition is expected not expected to succeed and the transition manager should see to it that Mylyn does not attempt to make a broken transition. 

I will investigate this issue in a separate bug -- bug 318268.
Comment 5 Steffen Pingel CLA 2010-06-29 01:03:41 EDT
Thanks. Frank, I'll let you handle the patch.
Comment 6 Frank Becker CLA 2010-07-12 17:00:26 EDT
patch commited!