I think it'd be helpful if a user could clone a storm project and all the tasks inside of it. Just changing the project field inside each task it clones. Most projects have the same base tasks and it would save a lot of time spent on recreating the same tasks for each project.
Currently, node clone module will only clone the project or each individual task one by one.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | storm-345304.patch | 11.89 KB | recrit |
| #10 | storm-345304-D6.patch | 11.89 KB | recrit |
Comments
Comment #1
cstachris commentedRoberto,
As it stands now, I'm not familiar with much drupal module stuff, but could you give some sort of high-level direction how this could be done seeing as you're familiar with your own code.
Cheers
Chris
Comment #2
cstachris commentedThere is a module called "save as draft" where you create a draft node. Then once published it deletes it. I have just asked if they can "not delete" the finished draft so it can be used again. Therefore creating the project, and it's subtasks and all that has to happen is a new published task node with the changed related project.
http://drupal.org/node/369042
I reckon it'll work until the full-blown version works - would that be enough for now?
Comment #3
flickerfly commentedWill 'Save As Draft' handle the connected task nodes as well as the project node?
Comment #4
cstachris commentedI'll check it out when I have more time. I'd say there'd be a little bit of parent node lookups. May only need a little bit of code added to the save as draft module. They've commented on where to 'not-delete' the draft, so it should be do-able.
Comment #5
cstachris commentedhttp://drupal.org/node/369042
The drafts module now incorporates a "don't delete draft". I'll check back here if it's been tested by someone, otherwise one day I'll get around to it.
Comment #6
Magnity commentedMarked #316662: Project Templates as a duplicate of this.
Comment #7
grandfso commentedI can see this issue died naturally, would anyone have any interest in such mod?
Comment #8
dbt102 commentedYes, the ability to replicate projects and associated tasks and tickets would be quite useful.
Comment #9
grandfso commentedHi, dbt102 - thanks for your feedback, I am not a developer, rather a Drupal newbie... But wanted to create some buzz, to get someone interested in this (in the end, I will learn drupal development, but due to tight schedules, this is gonna take some time)
Comment #10
recrit commentedThe attached patch allows projects to be cloned with all tasks and tickets. This makes it easy to create a skeleton project and then clone it to start another with all tasks and/or initial tickets. When cloning a project, the node edit form will have checkboxes to "Clone all Tasks" and "Clone all Tickets". I have successfully tested using node_clone with 'prepopulate' method.
Patch Details
storm version: latest 6.x-1.x HEAD
defendencies: node_clone needs to be installed for cloning; however, this is not a dependency for any storm modules
files affected:
hook_clone($node, $orig_node, $method)andhook_nodeapi() with op ='clone' $a3 = $orig_node, and $a4 =$methodComment #11
juliangb commentedPatch needs to be reuploaded without the -D6 suffix to be tested. Haven´t reviewed the contents yet, but will do once testbot shows green.
Comment #12
juliangb commentedCNW based on #11.
Comment #13
recrit commentedpatch renamed
Comment #14
JGonzalez commentedComment #15
juliangb commentedThanks. Am abroad at the moment and will review and test soon (a week or so).
In the meantime, anybody else care to review / comment?
Comment #16
tchurch commentedThis is an interesting addition which would save people a lot of time.
I've downloaded and installed the patch and tested it.
It works OK for me.
I tested:
- create project with tasks and tickets
- clone this project with no tasks/tickets
- clone this project with tasks only
- clone this project with tickets only
In all cases it did what it was suppose to do.
Anyone else like to test or should I set to RTBC and commit?
Comment #17
tchurch commentedSorry, I've just done another test with sub-tasks.
It didn't work. The sub-task wasn't cloned.
I had a project with a task and that had a sub-task.
Project and task were cloned but not sub-task.
Is this a problem?
Comment #18
juliangb commentedMy review from reading through led to only the one question below. Also though I think the patch should include some documentation for the README.txt - as otherwise I fear that people will not know this functionality is there.
tchurch - happy for you to commit when you are happy with your tests.
CNW based on my comments and tchurch's from #17.
What is the rational behind this change? For me, it is not clear what a variable a3 and a4 are meant to hold.
Powered by Dreditor.
Comment #19
recrit commented@tchurch:
When cloning a project, the project module calls for all children tasks and tickets.
My thoughts are there are 2 options to handle subtasks:
@juliangb:
The change from $teaser and $page is to restore the generic arguments as specified in hook_nodeapi. These parameters vary based on the $op the hook is called for. In the case of op="clone", $a3 = original node being cloned and $a4 = cloning method.
rough documentation:
Comment #20
juliangb commentedOK, I see the logic behind the argument name change. I don't see it as particularly clear, but if it is the Drupal standard, we can stick with it.
Comment #21
ymmatt commentedWhat is the status of this functionality, has the ability to clone sub-tasks been implemented? If so, can you attach a new patch?
Comment #22
vagabumming commentedJust chiming in here to say that I'd really like to see this functionality as well. Cheers and thanks for the great work!
Comment #23
kfritscheThere is a similar functionality in storm contrib
You can setup default tasks, which you can select when creating a new project. After the creation of the project, this default tasks will be created and appended to the project.
Comment #24
juliangb commentedIs the functionality in Storm Contrib fairly stable?
If so, let's mark this as won't fix so that we don't reinvent the wheel.
Is there documentation about which features are available in Storm Contrib? Perhaps we could add a few more links from Storm?
Comment #25
kfritscheThere is reported a issue with this function, which was fixed last week.
This function issn't properly documented yet, this should be done... I think it would be good to have more links to Storm Contrib, because of all the extensions. But to see what all is done, there should be a proper documentation...
Comment #26
tazus commentedI had tested the patch on #13 manually to storm-2.x, it work ok at this moment. But I don't know the sub-task code should patch to which file? So, could you please let me know and after I test it, I can put a new patch for 2.x here.
Comment #27
tazus commentedActually, the patch here is better than Strom_contrib's function.
In this patch, we can select any project to make a clone with its tasks and tickets but in Strom_contrib it provide a system-wide default tasks and ticket name only. So every time you want to create a new type of project, you have to modified the list again.
So, please keep this patch going and let make it to the formal function of Storm.