| 16 | |
| 17 | == Task requirements == |
| 18 | A script is required to automatically add all tasks from the sophie2-wbs.py file to the trac's issue tracker. |
| 19 | Also a way to delete tasks/bugs from the tracker. |
| 20 | |
| 21 | = Design = |
| 22 | We will use the [http://trac.edgewall.org/attachment/wiki/TracSynchronize/csv2trac.2.py csv2trac.2.py] script to add tasks to the issue tracker. And implement a function in the sophie2-wbs.py to generate a CSV file. |
| 23 | |
| 24 | = Implementation = |
| 25 | * sophie2-wbs.py: |
| 26 | {{{ |
| 27 | #!python |
| 28 | def print_CSV_line(task): |
| 29 | if isinstance(task, Rev): |
| 30 | print "Planned_Task,,,%s,,3,Astea,Astea,,,%s,new,,%s,,,"% (task.component().name, milestones[task.pre], task.name) |
| 31 | for t in task.children: print_CSV_line(t) |
| 32 | |
| 33 | def outCSV(): |
| 34 | print "type,time,changetime,component,severity,priority,owner,reporter,cc,version, |
| 35 | milestone,status,resolution,summary,description,keywords" |
| 36 | print_CSV_line(Task.root) |
| 37 | }}} |
| 38 | * |
| 39 | = Testing = |