Last modified 16 years ago
Last modified on 02/05/09 21:54:39
Analysis
Overview
Since there are sub-teams now a new custom field is added. Wiki is now migrated to Postgresql instead of sqlite so the functions of the previous revision of this task should be corrected or commented.
Task requirements
Functions that should be corrected in manage/sched/sophie2-wbs.py
These functions were added into the manage/sched/sophie2-wbs.py file:
- outImportancedEffort
- 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.
- Usage:
- Go to the sophie2-wbs.py file folder
- In the sophie2-wbs.py uncommnet the outImportancedEffort() call
- Execute:
python sophie2-wbs.py | bash
- outUpdateCustom
- Overview: This function takes one argument: "importance" or "effort". It generates SQL queries that update the information in ticket_custom table according to the manage/sched/sophie2-wbs.py.
- Usage:
- Go to the sophie2-wbs.py file folder
- In the sophie2-wbs.py uncommnet the outUpdateCustom(sys.argv[1]) call
- Execute:
python sophie2-wbs.py effort | bash //this will update the effort field sophie2-wbs.py importance | bash //this will update the importance field
New requirements
- Create a function in the manage/sched/sophie2_wbs.py that updates the "Category" field of the ticket. The category field is needed for the sub-team task lists.
- Remove obsolete page templates in PageTemplates
- Add iteration page template (see Implementation Idea section)
- No more requirements since a research of postgresql queries is needed.
Task result
Tickets with filled category field. Usable page templates.
Implementation idea
- For Iteration Page Template you may use the query from ITERATION_03 or ITERATION_03/AnalysisTeam. Discuss with the team which one would be more convenient. The advantage of ITERATION_03/AnalysisTeam is task division for the teams. The query is flexible enough to handle the different category assignments for different iterations.
Related
manage/sched/sophie2_wbs.py
PageTemplates
SCS_ISSUE_TRACKER_MAINTENANCE_R1
How to demo
Show some tickets with category. Show iteration template. Explain usage.
Design
- Research of postgresql queries was made
- Use these function to insert importance, effort and category:
def outImportanceEffortCategory(): for t in Task.all.values() : if isinstance(t,Rev) : print "INSERT INTO trac.ticket_custom ( ticket,name,value ) SELECT id AS ticket, \'importance\' AS name, %s AS value FROM trac.ticket where ticket.summary = \'%s\' AND id NOT IN (SELECT ticket FROM trac.ticket_custom WHERE name = \'importance\');"% (t.importance(), t.name) print "INSERT INTO trac.ticket_custom ( ticket,name,value ) SELECT id AS ticket, \'effort\' AS name, %s AS value FROM trac.ticket where ticket.summary = \'%s\' AND id NOT IN (SELECT ticket FROM trac.ticket_custom WHERE name = \'effort\');"% (t.effort, t.name) print "INSERT INTO trac.ticket_custom ( ticket,name,value ) SELECT id AS ticket, \'category\' AS name, \'%s\' AS value FROM trac.ticket where ticket.summary = \'%s\' AND id NOT IN (SELECT ticket FROM trac.ticket_custom WHERE name = \'category\');"% (t.category(), t.name)
- With these function we can generate a script file that can be used to update tickets when sophie2_wbs.py is changed:
def outUpdateCustom(field): # field - effort, importance and category. for t in Task.all.values() : if isinstance(t,Rev) : if(field == "effort"): value = t.effort if(field == "importance"): value = t.importance() if(field == "category"): value = t.category() print "UPDATE trac.ticket_custom SET value = \'%s\' WHERE name = \'%s\' and ticket = (SELECT id FROM trac.ticket WHERE summary = \'%s\')\""% (value, field, t.name)
- Remove obsolete page templates
- See PageTemplates
- Iteration page template content
== Related Tickets == [[TicketQuery(group=status,order=owner,milestone=MILESTONE_NAME,format=table,col=summary|owner|status|type|component|priority|effort|importance)]]
Implementation
- The functions listed in the design phase were added.
- The functions were executed and additional content for the tickets was filled.
- Iteration page template was created.
- Obsolete page templates were removed.
Testing
Comments
(Write comments for this or later revisions here.)