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

Bug 360864

Summary: search page should honor canCreateTaskFromKey when invoked from task list
Product: z_Archived Reporter: Thomas Ehrnhoefer <thomas.ehrnhoefer>
Component: MylynAssignee: Project Inbox <mylyn-triaged>
Status: CLOSED MOVED QA Contact:
Severity: normal    
Priority: P2 CC: steffen.pingel
Version: unspecifiedKeywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
mylyn/context/zip none

Description Thomas Ehrnhoefer CLA 2011-10-13 12:19:50 EDT
If  connector returns false on canCreateTaskFromKey, the task key field is disabled in the Task Search page.

However if one uses the "Search repository key or summary" action in the task list, that field gets auto-populated even though it's disabled, and in turn disabling the rest of the search page.
Usually hitting the clear button (or, in Leo's case, switching repositories) can resolve the state of disablement, but I think that it the field is disabled, it shouldn't even get the task key from the task list in the first place
Comment 1 Thomas Ehrnhoefer CLA 2011-10-13 12:27:55 EDT
I wont have time currently to provide a patch, also not entirely sure on how to fix this (due to the repository being able to change, and thus the enablement, but the task key field content remains the same).
Also not sure if one goes through the list of repos, reaches one that can't do that lookup, and the field gets clears, it's weird, especially if he did not intent to query that repository.

Maybe disablement of that key field should lead to not disabling the query page controls? That would mean changing line 221 from
@if (keyText.getText() != null && keyText.getText().trim().length() > 0) {@
to
@if (keyText.getText() != null && keyText.getText().trim().length() > 0 && keyText.isEnabled()) {@

It appears updatePageEnablement is called after the right values are set and the right query page is displayed, so that could work.
Comment 2 Thomas Ehrnhoefer CLA 2011-10-13 12:27:56 EDT
Created attachment 205144 [details]
mylyn/context/zip
Comment 3 Steffen Pingel CLA 2011-10-13 12:31:51 EDT
Thanks Thomas. That needs to be fixed. We should also improve validation of search keys while looking at this. Gerrit for instance allows searching for non numeric ids which are currently ignored when opening the page.
Comment 4 Mik Kersten CLA 2012-02-09 13:47:03 EST
Steffen: Not a plan item?
Comment 5 Steffen Pingel CLA 2012-02-09 15:16:07 EST
I have removed the plan keyword. This must have dropped from the release to the release backlog. Now it's back in the backlog.
Comment 6 Eclipse Webmaster CLA 2022-11-15 11:45:08 EST
Mylyn has been restructured, and our issue tracking has moved to GitHub [1].

We are closing ~14K Bugzilla issues to give the new team a fresh start. If you feel that this issue is still relevant, please create a new one on GitHub.

[1] https://github.com/orgs/eclipse-mylyn