44 | | == outImportancedEffort == |
45 | | {{{ |
46 | | def outImportancedEffort(): |
47 | | for t in Task.all.values() : |
48 | | if isinstance(t,Rev) : |
49 | | 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) |
50 | | 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) |
51 | | }}} |
52 | | |
53 | | * Overview: The function takes no arguments and generates SQL queries that insert data in the ticket_custom table. This is where the custom fields "importance" and "effort" are stored. This function was used and there is effort and importance for all issues. It will not be used again. If something needs to be changed a function that updates the fields must be used. |
54 | | |
55 | | * Usage: |
56 | | * Go to the sophie2-wbs.py file folder |
57 | | * In the sophie2-wbs.py uncommnet the outImportancedEffort() call |
58 | | * Execute: |
| 44 | * outImportancedEffort |
| 45 | * Overview: The function takes no arguments and generates SQL queries that insert data in the ticket_custom table. This is where the custom fields "importance" and "effort" are stored. This function was used and there is effort and importance for all issues. It will not be used again. If something needs to be changed a function that updates the fields must be used. |
| 46 | * Usage: |
| 47 | * Go to the sophie2-wbs.py file folder |
| 48 | * In the sophie2-wbs.py uncommnet the outImportancedEffort() call |
| 49 | * Execute: |
63 | | == outUpdateCustom == |
64 | | {{{ |
65 | | def outUpdateCustom(field): # field - "effort" or "importance" for now. |
66 | | for t in Task.all.values() : |
67 | | if isinstance(t,Rev) : |
68 | | if(field == "effort"): |
69 | | value = t.effort |
70 | | if(field == "importance"): |
71 | | value = t.importance() |
72 | | print "sqlite3 /sophie-project/sophie2/db/trac.db \"UPDATE ticket_custom SET value = \'%s\' WHERE name = \'%s\' and ticket = (SELECT id FROM ticket WHERE summary = \'%s\')\""% (value, field, t.name) |
73 | | }}} |
74 | | * Overview: This function takes one argument: "importance" or "effort". It generates SQL queries that update the information in ticket_custom table according to the [source:/manage/sched/sophie2-wbs.py]. |
75 | | * Usage: |
76 | | * Go to the sophie2-wbs.py file folder |
77 | | * In the sophie2-wbs.py uncommnet the outUpdateCustom(sys.argv[1]) call |
78 | | * Execute: |
| 54 | * outUpdateCustom |
| 55 | * Overview: This function takes one argument: "importance" or "effort". It generates SQL queries that update the information in ticket_custom table according to the [source:/manage/sched/sophie2-wbs.py]. |
| 56 | * Usage: |
| 57 | * Go to the sophie2-wbs.py file folder |
| 58 | * In the sophie2-wbs.py uncommnet the outUpdateCustom(sys.argv[1]) call |
| 59 | * Execute: |