Bug 290860 - only fetch configuration for projects as needed
Summary: only fetch configuration for projects as needed
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: dev   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.3   Edit
Assignee: Pawel Niewiadomski CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed, noteworthy
Depends on:
Blocks: 273469
  Show dependency tree
 
Reported: 2009-09-30 01:05 EDT by Steffen Pingel CLA
Modified: 2009-10-08 15:50 EDT (History)
1 user (show)

See Also:


Attachments
Jira Filter Definition Page rework (17.57 KB, patch)
2009-09-30 11:10 EDT, Pawel Niewiadomski CLA
no flags Details | Diff
mylyn/context/zip (120.29 KB, application/octet-stream)
2009-09-30 11:10 EDT, Pawel Niewiadomski CLA
no flags Details
Fixed collisions (19.87 KB, patch)
2009-10-01 04:04 EDT, Pawel Niewiadomski CLA
no flags Details | Diff
mylyn/context/zip (144.31 KB, application/octet-stream)
2009-10-01 04:04 EDT, Pawel Niewiadomski CLA
no flags Details
Version 3 (40.90 KB, patch)
2009-10-01 09:32 EDT, Pawel Niewiadomski CLA
no flags Details | Diff
mylyn/context/zip (154.49 KB, application/octet-stream)
2009-10-01 09:32 EDT, Pawel Niewiadomski CLA
no flags Details
Version 4 (33.81 KB, patch)
2009-10-02 05:39 EDT, Pawel Niewiadomski CLA
no flags Details | Diff
mylyn/context/zip (154.49 KB, application/octet-stream)
2009-10-02 05:39 EDT, Pawel Niewiadomski CLA
no flags Details
screenshot (27.76 KB, image/png)
2009-10-02 13:56 EDT, Steffen Pingel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steffen Pingel CLA 2009-09-30 01:05:49 EDT
The download of repository configuration should be postponed to the point when a project is first selected in the query dialog or a new task is created for a project that is not yet cached.
Comment 1 Steffen Pingel CLA 2009-09-30 01:11:04 EDT
I think this basically boils down to setting a flag on the project to track whether configuration has been downloaded for that project or not. 

All methods that require configuration should be changed to scope configuration updates to the required project instead of getting all details, e.g. JiraTaskDataHandler.initializeTaskData(). In addition the query page and new task page need to have a way to limit configuration refresh to fetching the list of projects (and other global attributes).
Comment 2 Pawel Niewiadomski CLA 2009-09-30 11:10:08 EDT
Created attachment 148434 [details]
Jira Filter Definition Page rework

So, this is a first step to implement this story.

Added details flag to Project. Reworked JFDP - if you click on a project it will download details. 

Also fixed some inconsistiency with JIRA - if you select multiple projects you should not be able to select fix for, component or affects. Also issue types in this case are taken from global settings.

JiraClientCache.initializeIssueTypes downloads only global issue types. As we don't have projects available it's not possible to get all issue types here.

Tomorrow I'll work on lazy project updates in RSS reader.
Comment 3 Pawel Niewiadomski CLA 2009-09-30 11:10:13 EDT
Created attachment 148435 [details]
mylyn/context/zip
Comment 4 Steffen Pingel CLA 2009-09-30 15:44:00 EDT
I'm getting a conflict with this patch (possibly due to the changes for bug 211654). Can you recut the patch?
Comment 5 Pawel Niewiadomski CLA 2009-10-01 04:04:54 EDT
Created attachment 148500 [details]
Fixed collisions

Here's a updated patch.
Comment 6 Pawel Niewiadomski CLA 2009-10-01 04:04:59 EDT
Created attachment 148501 [details]
mylyn/context/zip
Comment 7 Pawel Niewiadomski CLA 2009-10-01 09:32:49 EDT
Created attachment 148528 [details]
Version 3

Fixed collisions, added issueTypesById to project, handling case when user wants to create a task for project that doesn't have details downloaded (added icon and message in wizard). Also JiraRSSHandler will update project if version, fix version or component were not found in case. Tomorrow I'll work on issue types, and others.

Steffen please do a code review for this. It'd be great to hear is it the right direction. It's easier to fix the course now than later.

Cheers,
Pawel
Comment 8 Pawel Niewiadomski CLA 2009-10-01 09:32:54 EDT
Created attachment 148529 [details]
mylyn/context/zip
Comment 9 Steffen Pingel CLA 2009-10-02 03:47:42 EDT
The changes look great! It's a big improvement in terms of user experience. 

 A couple of thoughts:
* Can you leave out the changes to JiraRssHandler for now? I would like to track that on bug 189689. 
* The changes to NewJiraTaskWizard.getInitializationData() don't seem necessary. Shouldn't JiraTaskDataHandler.initializeTaskData() take care of updating the configuration? Doing something like this:
		if (!project.hasDetails()) {
			try {
				client.getCache().refreshProjectDetails(project.getId(), monitor);
			} catch (JiraException ex) {
				IStatus status = JiraCorePlugin.toStatus(repository, ex);
				trace(status);
				throw new CoreException(status);
			}
		}
* The icon decoration in the new task wizard looks cool but it's not obvious what it means. I think we should leave it out and just go with the message in the wizard header for now.
* Can you move the loop in JiraFilterDefinitionPage.updateCurrentProjects() inside the job so that there is only continuous progress report?
Comment 10 Pawel Niewiadomski CLA 2009-10-02 05:39:26 EDT
Created attachment 148621 [details]
Version 4

Changed on Steffen's suggestion. Using different icon (if you don't like it, just remove it). Moved JiraRssHandler changes out to 189689.
Comment 11 Pawel Niewiadomski CLA 2009-10-02 05:39:32 EDT
Created attachment 148622 [details]
mylyn/context/zip
Comment 12 Steffen Pingel CLA 2009-10-02 13:56:20 EDT
Created attachment 148669 [details]
screenshot
Comment 13 Steffen Pingel CLA 2009-10-02 14:48:00 EDT
Excellent! I have committed the patch and made the following changes:

New task wizard:
* Used a selection listener instead of post selection listener to provide instant feedback
* Set a title on the wizard page
* Commented out icons for now to discuss this on a UI review

Query page:
* Increased width of date pickers (bug 286286)
* Unified refresh of project list and project details in single operation

Shawn suggested to add a check box to filter projects in the new task wizard to only show the ones that have details. This could be particularly helpful for repositories with many projects where the user is only interested in a subset of the projects. I have put this up for a UI review during the next Mylyn meeting.
Comment 14 Mik Kersten CLA 2009-10-08 13:30:12 EDT
h3. UI review from the latest screenshot

* Icons are confusing because in the common scenario the user can happily interact with projects that don't have a cached configuration.
* Shawn's suggestion makes sense, since it address the offline use case, and is helpful in the connected use case for showing the subset of projects.
* Suggest making a sticky checkbox called "Only show projects active in Task List" to maintain our story of transparent offline use, and indicate that the projects shown are the ones with tasks in the Task List.  
* Remove this filter if user has filter text.
* "Update Projects from Repository" -> "Update Project Listing"
Comment 15 Steffen Pingel CLA 2009-10-08 15:50:33 EDT
Thanks Mik. I have opened bug 291823 to track these suggestions for improvement.