Page MenuHomePhabricator

Option to copy a task
Open, LowestPublic

Description

Sometimes it's needed just to copy informations from another existing task and make a new one with slightly changed title and desc, but with same subscribers, same projects, same security, blocked by and so. What about to add an option into the right menu next the task heading?

In order to achieve the link by @mmodell easily: Task could be copied using https://phabricator.wikimedia.org/maniphest/task/create/?template=, but there should be a button to achieve this function easier.

Event Timeline

Dvorapa created this task.Nov 23 2015, 12:18 AM
Dvorapa raised the priority of this task from to Normal.
Dvorapa updated the task description. (Show Details)
Dvorapa added a project: Phabricator.
Dvorapa added a subscriber: Dvorapa.
Restricted Application added subscribers: scfc, Aklapper. · View Herald TranscriptNov 23 2015, 12:18 AM
Dvorapa lowered the priority of this task from Normal to Low.Nov 23 2015, 12:18 AM
Dvorapa set Security to None.
Dvorapa removed a subscriber: Dvorapa.

@Dvorapa: just load the task creation form and append ?template=nnn where nnn is the task id number (but without the T prefix)

For example: https://phabricator.wikimedia.org/maniphest/task/create/?template=119353

This comment was removed by Dvorapa.

@Dvorapa: just load the task creation form and append ?template=nnn where nnn is the task id number (but without the T prefix)
For example: https://phabricator.wikimedia.org/maniphest/task/create/?template=119353

Looks good, but still missing some informations :/ But thanks

@Dvorapa: Can you provide a specific example when this would be useful, and why templates are specifically not sufficient?

Aklapper lowered the priority of this task from Low to Lowest.Nov 24 2015, 3:29 PM
Aklapper edited projects, added Phabricator (Upstream); removed Phabricator.
Dvorapa added a comment.EditedNov 24 2015, 4:10 PM

@Dvorapa: Can you provide a specific example when this would be useful, and why templates are specifically not sufficient?

E.g. when creating exactly the same issue, but for another Wikipedia language. Template copies everything except title and desc. It would be useful to get the whole task into fields (with title, desc too) and change just e.g. bswiki to urwiki (T117991 to T117992) in title and desc. And the button to achieve this in the right menu would be the easiest method.

Dvorapa added a comment.EditedNov 24 2015, 4:19 PM

Another one (and the initial one):
I needed to create exactly the same copy of task for zhwiki T115100 and change just local code in title and discussion link in desc to cswiki ones: T119351. These tasks are ok, but if you have a task with way long desc, you have to copy it by hand.

@Dvorapa The difficulty with a complete copy, is that many subscribers would not want to be CC'd onto the new task, e.g. any Zhwikipedians who were following that original task. If someone else then copied your copy, e.g. to use for Xxwiki, then there would be Zhwiki and Cswiki users who were getting subscriptions that they didn't want!
I do agree that copying the rest of a task, could be a easier, especially the "Projects" and "CC" sections because the autocompleted names are impossible to copy&paste via clipboard.

@mmodell is that .../create/?template=nnn link available in the UI anywhere, or do we need to remember/write it down somewhere ourselves? If it's not already in the UI, I think that could be a worthy upstream request (albeit low-priority): I.e. To place a link in the standard /create/ page, which opens a modal dialog that says something like "Start a new task based on task: [ ]".

@Dvorapa The difficulty with a complete copy, is that many subscribers would not want to be CC'd onto the new task, e.g. any Zhwikipedians who were following that original task. If someone else then copied your copy, e.g. to use for Xxwiki, then there would be Zhwiki and Cswiki users who were getting subscriptions that they didn't want!
I do agree that copying the rest of a task, could be a easier, especially the "Projects" and "CC" sections because the autocompleted names are impossible to copy&paste via clipboard.

You are right, to copy CC's is not good

@mmodell is that .../create/?template=nnn link available in the UI anywhere, or do we need to remember/write it down somewhere ourselves? If it's not already in the UI, I think that could be a worthy upstream request (albeit low-priority): I.e. To place a link in the standard /create/ page, which opens a modal dialog that says something like "Start a new task based on task: [ ]".

I totally agree with this idea

@mmodell is that .../create/?template=nnn link available in the UI anywhere, or do we need to remember/write it down somewhere ourselves? If it's not already in the UI, I think that could be a worthy upstream request (albeit low-priority): I.e. To place a link in the standard /create/ page, which opens a modal dialog that says something like "Start a new task based on task: [ ]".

The only time something similar is visible in the UI is after creating a task, it gives you the option to "create a similar task" link at the top of the page.

This is also documented here and more advanced task template options are documented here

Playing the devil's advocate, the question is if you can convince upstream that this usecase is common, compared to the already existing "Create Subtask" option in the UI and when it comes to distinguishing them plus adding more options to the UI.

Still every time I want to make a similar task I've already done once, I need to find out this task and copy the url @mmodell gave me, because I don't remember its format. One link in the top-right menu would do

Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptApr 29 2016, 9:33 AM

For the record: IIRC either Bugzilla or Phabricator before update(s) used to have "Clone this bug/task" feature.

Any progress?

No; there will not be any progress soon as this is lowest priority (see upper left corner). See https://secure.phabricator.com/rP52f7446eeaa36ee1716fd1ed6e90b26b964e11ac for more information why it was removed by Phabricator's upstream maintainers.

Dvorapa added a comment.EditedJan 14 2017, 4:24 PM

No; there will not be any progress soon as this is lowest priority (see upper left corner). See https://secure.phabricator.com/rP52f7446eeaa36ee1716fd1ed6e90b26b964e11ac for more information why it was removed by Phabricator's upstream maintainers.

Just spending too much time by copying from another tasks when creating a new one or by searching for this task, where @mmodell added a link, how to achieve this, even if there isn't any button. Sorry for me.

Dvorapa updated the task description. (Show Details)Jan 14 2017, 4:27 PM
Dvorapa added a comment.EditedJan 17 2017, 2:41 PM

@Dvorapa: Use URL parameters when creating tasks?

But how to transfer some current task to url parameters by one/two clicks/keypresses? Still best (but not so good) option is to search in
(subscribed) tasks for this task, copy the url from comments description and change the task number. And still one has to remove assignee and manually copy&paste title and description even if they are almost the same. I imagine just to click once or twice and have title, description, projects and possibly subscribers prefilled from a similar task.

There is a drop down menu [v] Create task on the top right corner. In this menu there are Create task (simple) and Report Security Abuse options. What would crash if there is a third one Copy this task leading directly to the url mmodell mentioned above? It necessarily doesn't need to be next to the task description, does it?

Nothing would "crash" but I'd not want to write code for this and then maintain our downstream code for years: The "costs vs. benefit" ratio for this corner case request does not convince me.

This could easily be done with a bookmarklet / userscript / browser extension. Any of those would be reasonable ways to implement this functionality. I don't think it's something that wikimedia should maintain, however, not without a strong demand and clear use-cases.

This could easily be done with a bookmarklet / userscript / browser extension. Any of those would be reasonable ways to implement this functionality. I don't think it's something that wikimedia should maintain, however, not without a strong demand and clear use-cases.

if this functionality just copies some parts of an existing task into the new one, but you can still edit them before submitting the new task (and you usually do, for example I copy about 70 % of new tasks from old tasks and then correct dissimilarities), clear use-cases don't make sense. Bookmarklet / userscript / browser extension would do. But I'm not so experienced in JavaScript to be able to create it

mmodell added a comment.EditedJan 17 2017, 6:33 PM

Example bookmarklet code:

javascript:(function() { document.location.pathname = document.location.pathname.replace('/','/maniphest/task/create/?template=');})()

To use this, create a new bookmark with a title like 'Clone phabricator task' and paste the javascript code into the "location" field for your clone task bookmark.

Dvorapa added a comment.EditedJan 17 2017, 7:28 PM

Example bookmarklet code:

javascript:(function() { document.location.pathname = document.location.pathname.replace('/','/maniphest/task/create/?template=');})()

To use this, create a new bookmark with a title like 'Clone phabricator task' and paste the javascript code into the "location" field for your clone task bookmark.

Thank you, I'll try to make it work tommorrow.