Changes between Version 12 and Version 13 of SCS_ISSUE_TRACKER_MAINTENANCE_R1


Ignore:
Timestamp:
10/14/08 16:52:14 (17 years ago)
Author:
astea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SCS_ISSUE_TRACKER_MAINTENANCE_R1

    v12 v13  
    4141 * rules about relationship with other tasks, if planned and unplanned overlap. 
    4242= Implementation = 
    43 ^(Implementation results should be described and linked here (from the wiki or the repository)^ 
     43These functions ware added into the [source:/manage/sched/sophie2-wbs.py] file: 
     44{{{ 
     45def outImportancedEffort(): 
     46        for t in Task.all.values() : 
     47                if isinstance(t,Rev) : 
     48                        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) 
     49                        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) 
     50}}} 
     51 
     52Overview: 
     53The 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. 
     54 
     55Usage: 
     56 * Go to the sophie2-wbs.py file folder 
     57 * In the sophie2-wbs.py uncommnet the outImportancedEffort() call 
     58 * Execute:  
     59{{{ 
     60python sophie2-wbs.py | bash 
     61}}} 
     62 
     63 
     64{{{ 
     65def 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 
     75Overview: 
     76This 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]. 
     77Usage: 
     78 * Go to the sophie2-wbs.py file folder 
     79 * In the sophie2-wbs.py uncommnet the outUpdateCustom(sys.argv[1]) call 
     80 * Execute:  
     81{{{ 
     82python sophie2-wbs.py effort | bash 
     83//this will update the effort field 
     84python sophie2-wbs.py importance | bash 
     85//this will update the importance field 
     86}}} 
     87 
    4488 
    4589= Testing =