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

Bug 183948

Summary: [new uex] add templates for common and recommended queries
Product: z_Archived Reporter: Mik Kersten <mik.kersten>
Component: MylynAssignee: Project Inbox <mylyn-triaged>
Status: CLOSED MOVED QA Contact:
Severity: enhancement    
Priority: P4 CC: dlwhiteman, robert.elves
Version: unspecifiedKeywords: helpwanted
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 359147    

Description Mik Kersten CLA 2007-04-25 05:21:44 EDT
This would remove the burden of having to use the form editor.  As part of this we should also make the flow through the wizard more clear, since we would be support 4 options for creating a query: 
1) Using forms
2) Retrieving from server
3) From template
4) From URL

To start this could support Bugzilla only, but should be generalized to other connectors
Comment 1 Eugene Kuleshov CLA 2007-05-28 23:58:15 EDT
I'd say that template-based query will need to be edited in form editor (for the most cases). So, it would make sense to just add a drop-down for selecting templates to the query name field on form editor and also add an action "Add to templates" to the same page.

Then template management (import, export, remove) could be done from Mylar's general preferences at Window / Preferences / Mylar.
Comment 2 Balazs Brinkus CLA 2007-08-18 17:42:58 EDT
I am thinking about how can we store the queries.
So I think we can store the queries in a xml file (like the psf file).
The file name will be *.mqf (mylyn queries file). The structure could be the following:

<?xml version="1.0" encoding="UTF-8"?>
<mqf version="1.0">
	<query name="Mylyn open bugs" url="....." />
	<query name="Connector bugzilla" url="....." />
</mqf>

I can add a "Queries url" text box to the repository's properties page.
Then the user can modify simply the query file url and he can use his query file.
What do you think about this solution?
Comment 3 Eugene Kuleshov CLA 2007-08-18 19:04:15 EDT
One thing is confusing for me, since we already have query import/export that Jevgeni implemented, do we still need templates? What is the proposed use case and workflow for creating queries from those templates and how templates will be distributed? Also, "templates" should assume that some information need to be filled in, but it is unclear how it is going to look like.

The only feature I can think of is the extension point that Eclipse project could contribute to make it easier to query specific projects. Though same functionality can be achieved simply by importing queries (it is quite convenient, because you can already drag them from the web browser).

BTW, if you are going to save into some files, please leave .zip extension.
Comment 4 Mik Kersten CLA 2007-08-26 22:42:10 EDT
Eugene: Yes, we need to consider overlap with pre-defined queries.  But as you point out those are necessarily project specific and this bug is about generic templates.  What I didn't realize at the outset of this is just how connector-specific these templates likely need to be, because something that's common for an issue-tracker style connector (e.g. email addresses in Bugzilla) may not be common in an agile project management style connector (e.g. one in which iterations are primary).

Balazs: assuming that you still have time on this, here is how I would like you to proceed if you haven't yet done the approach from comment#2.  The goal is that we provide a simplified way of creating common queries for Bugzilla only (for the time being).  The best one to start with is the "everything assigned to person whose email address is <foo>" query.  The easiest way to do that will by adding an option to the current New Bugzilla Query page that allows you to select from:
* Create query using form
* Create query from existing URL
* Create query using template <--- this is the one you'll add

Then you create a template page that allows the person to fill out an email address and automatically populates the right query attributes.  How does that sound?
Comment 5 Eugene Kuleshov CLA 2007-08-26 22:56:03 EDT
it sounds like it will have rather limited benefits comparing to the amount of work and it is still unclear if it can be generalized at all beyond naive example "all bugs assigned to user <foo>".

to make it flexible enough, we will have to parameterize "import query" and let user to fill in these parameters, perhaps using UI, similar to the one used by the web connector, but it is still unclear how to handle dictionary-based choice and multi-choice fields.
Comment 6 Mik Kersten CLA 2007-08-26 23:01:48 EDT
Eugene: yes, we can definitely do more along the lines you propose.  However, I want to keep Balazs focused on the current approach and hard-coded implementation that I have outlined.  If you see major problems with that let's discuss them during next week's call or on separate bug reports.
Comment 7 Eugene Kuleshov CLA 2007-08-26 23:18:22 EDT
I am just saying that while it could be interesting feature, it is more from a project-specific project provisioning story and approach you've suggested is too limited and specific for bugzilla only. So, I'd suggest to review the use case and collect requirements first, then all pieces of the puzzle will lay together.
Comment 8 Mik Kersten CLA 2007-08-27 00:01:52 EDT
Balazs: please proceed as per the description on comment#4 unless you have questions or comments.  This use case is intended for Bugzilla only and is intentionally scoped to be a unit of work that should be straightforward for us to build on or implement, even if I've failed to communicate that to Eugene.  In case you would like background on the requirements for this check out the "Query setup recommendations" section of 183948: [new uex] add templates for common and recommended queries
https://bugs.eclipse.org/bugs/show_bug.cgi?id=183948

Eugene: I understand your opinion, and we can discuss it on the call or on another bug.  
Comment 9 Eugene Kuleshov CLA 2007-08-27 00:07:30 EDT
Something isn't right about the url you posted in your last comment
Comment 10 Mik Kersten CLA 2007-08-27 01:10:11 EDT
Yikes, thanks for catching that, URL should have been: http://www.ibm.com/developerworks/java/library/j-mylyn1/
Comment 11 David Whiteman CLA 2008-04-08 06:59:10 EDT
I'm not sure I'm following the conversation here, so let me give an example, and you can tell me if this enhancement would address this use case.  If I am a user who only works on the Mylyn project, when I create a new Task via the Bugzilla support, I want the Mylyn project already selected.  It would be nice to have a set of templates where certain values are already selected when I create a new Task.  I find myself selecting some of the same values every time, such as component, version, etc.
Comment 12 Robert Elves CLA 2008-06-14 00:53:35 EDT
Need to defer: http://wiki.eclipse.org/index.php/Mylyn/3.0_Plan#Deferred_Items
Comment 13 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