Bug 218630 - Use task's name when exporting
Summary: Use task's name when exporting
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: dev   Edit
Hardware: PC Windows XP
: P4 trivial (vote)
Target Milestone: 3.0   Edit
Assignee: Frank Becker CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday, helpwanted
Depends on:
Blocks:
 
Reported: 2008-02-12 10:06 EST by Tomasz Zarna CLA
Modified: 2008-04-08 19:48 EDT (History)
3 users (show)

See Also:


Attachments
mylyn/context/zip (638 bytes, application/octet-stream)
2008-02-18 17:48 EST, Frank Becker CLA
no flags Details
Patch (3.40 KB, patch)
2008-02-28 18:10 EST, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (1.96 KB, application/octet-stream)
2008-02-28 18:10 EST, Frank Becker CLA
no flags Details
updated patch (907 bytes, patch)
2008-04-04 11:18 EDT, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (2.62 KB, application/octet-stream)
2008-04-04 11:18 EDT, Frank Becker CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Zarna CLA 2008-02-12 10:06:20 EST
afaik Mylyn uses query's name when exporting a query. Why not to use the same pattern for exporting individual tasks?
Comment 1 Mik Kersten CLA 2008-02-13 00:01:05 EST
That sounds good to me.  The current scheme uses a unique name, but we could truncate the name after n characters and append an increasing integer if there was a name clash.  If anyone is interested in contributing this please post.  I'll add it for bugday since it's a straightforward contribution.
Comment 2 Frank Becker CLA 2008-02-18 17:47:39 EST
 (In reply to comment #1)
> That sounds good to me.  The current scheme uses a unique name, but we could
> truncate the name after n characters and append an increasing integer if there
> was a name clash.  If anyone is interested in contributing this please post.
> I'll add it for bugday since it's a straightforward contribution.

Mik, what is about the following implementation?

For the export filename we can use the name of the query followed by the taskid.
Comment 3 Frank Becker CLA 2008-02-18 17:48:20 EST
Created attachment 90008 [details]
mylyn/context/zip
Comment 4 Mik Kersten CLA 2008-02-18 20:56:27 EST
I'm concerned that query + name would look weird because we don't have a clear character for delimiting them.  We could use "-", but I have a bunch of queries with that character in the name ;)

How about we take the first 50 characters of the task's label as it appears in the Task List?  I think that's likely enough to be unique.  If it's not the user should be prompted whether or not to overwrite.

Frank: are you interested in taking this one on?
Comment 5 Eugene Kuleshov CLA 2008-02-19 00:24:54 EST
Do we need a query name when exporting tasks?
Comment 6 Frank Becker CLA 2008-02-19 02:03:01 EST
 (In reply to comment #4)
> I'm concerned that query + name would look weird because we don't have a clear
> character for delimiting them.  We could use "-", but I have a bunch of queries
> with that character in the name ;)
What do you think about # to delimiting them?
> 
> How about we take the first 50 characters of the task's label as it appears in
> the Task List?  I think that's likely enough to be unique.  If it's not the user
> should be prompted whether or not to overwrite.
> 
> Frank: are you interested in taking this one on?

Yes, I can start Thursday evening (have to finish my seminar first).

Please tell me if I should use # as a delimiter or the first 50 character suggested. 
Comment 7 Mik Kersten CLA 2008-02-28 16:31:06 EST
(In reply to comment #6)
> Yes, I can start Thursday evening (have to finish my seminar first).

Cool :)
 
> Please tell me if I should use # as a delimiter or the first 50 character suggested.

Go ahead with the first 50 and ignore the query name.  Query names are not related to the identity of tasks and a task can appear in multiple queries.
Comment 8 Frank Becker CLA 2008-02-28 18:10:11 EST
Created attachment 91077 [details]
Patch
Comment 9 Frank Becker CLA 2008-02-28 18:10:14 EST
Created attachment 91078 [details]
mylyn/context/zip
Comment 10 Robert Elves CLA 2008-04-01 19:21:44 EDT
Nice! Patch applied, ip log updated.
Comment 11 Eugene Kuleshov CLA 2008-04-01 22:25:06 EDT
Is it possible to add the task id to that file name?
Comment 12 Robert Elves CLA 2008-04-03 18:34:15 EDT
We could prefix the name with the task ide   "123 - my task". Thoughts?
Comment 13 Frank Becker CLA 2008-04-04 11:18:36 EDT
Created attachment 94866 [details]
updated patch

the name is now build as described in  comment 12
Comment 14 Frank Becker CLA 2008-04-04 11:18:40 EDT
Created attachment 94867 [details]
mylyn/context/zip
Comment 15 Eugene Kuleshov CLA 2008-04-05 17:51:49 EDT
(In reply to comment #12)
> We could prefix the name with the task ide   "123 - my task". Thoughts?
(In reply to comment #13)
> the name is now build as described in  comment 12

Thanks Great. Thnx guys.
Comment 16 Robert Elves CLA 2008-04-08 19:48:59 EDT
Patch applied, Ip log updated. Also updated to apply the same name when multiple tasks are selected.

Created bug#226214 to address file name differences between dnd and this export facility.