25 | | ^(Implementation results should be described and linked here (from the wiki or the repository)^ |
| 25 | |
| 26 | This function from the [source:/manage/sched/sophie2-wbs.py] file generates a scrypt that inserts data into the custion fields: order and importance. |
| 27 | {{{ |
| 28 | def outImportancedEffort(): |
| 29 | for t in Task.all.values() : |
| 30 | if isinstance(t,Rev) : |
| 31 | print "sqlite3 /sophie-project/sophie2/db/trac.db \"INSERT INTO ticket_custom ( ticket,name,value ) SELECT id AS ticket, \'importance\' AS name, %s AS value FROM ticket where ticket.summary = \'%s\' AND id NOT IN (SELECT ticket FROM ticket_custom WHERE name = \'importance\');\""% (t.importance(), t.name) |
| 32 | print "sqlite3 /sophie-project/sophie2/db/trac.db \"INSERT INTO ticket_custom ( ticket,name,value ) SELECT id AS ticket, \'effort\' AS name, %s AS value FROM ticket where ticket.summary = \'%s\' AND id NOT IN (SELECT ticket FROM ticket_custom WHERE name = \'effort\');\""% (t.effort, t.name) |
| 33 | }}} |
| 34 | |