Changeset 1369
- Timestamp:
- 10/10/06 23:22:17 (4 days ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
timingandestimationplugin/trunk/timingandestimationplugin/api.py
r1365 r1369 1 1 import re 2 2 import dbhelper 3 import time 3 4 from ticket_daemon import * 4 5 from usermanual import * … … 243 244 244 245 def do_user_man_update(self): 246 when = int(time.time()) 245 247 sql = """ 246 248 INSERT INTO wiki (name,version,time,author,ipnr,text,comment,readonly) 247 VALUES ( %s, %s, strftime('%%s', 'now', 'unixepoch', 'localtime'), 'Timing and Estimation Plugin', '127.0.0.1', %s,'',0)249 VALUES ( %s, %s, %s, 'Timing and Estimation Plugin', '127.0.0.1', %s,'',0) 248 250 """ 249 251 dbhelper.execute_non_query(self.env.get_db_cnx(),sql, 250 252 user_manual_wiki_title, 251 253 user_manual_version, 254 when, 252 255 user_manual_content) 253 256 timingandestimationplugin/trunk/timingandestimationplugin/reports.py
r1283 r1369 9 9 "title":"Ticket Work Summary", 10 10 "reportnumber":None, 11 "version": 3,11 "version":4, 12 12 "sql":""" 13 13 SELECT ticket as __group__,__style__, ticket, 14 newvalue as [Hours-added], time as _time, strtime as [Time-Entered],14 newvalue as Hours_added, time as _time, strtime as Time_Entered, 15 15 _ord 16 16 FROM( … … 54 54 "title":"Milestone Work Summary", 55 55 "reportnumber":None, 56 "version": 3,56 "version":4, 57 57 "sql":""" 58 58 SELECT … … 61 61 ticket, 62 62 summary, 63 newvalue as [Hours-added],63 newvalue as Hours_added, 64 64 time as _time, 65 strtime as [Last-Updated],65 strtime as Last_Updated, 66 66 _ord 67 67 FROM( … … 114 114 "title":"Developer Work Summary", 115 115 "reportnumber":None, 116 "version": 3,116 "version":4, 117 117 "sql":""" 118 118 SELECT author as __group__,__style__, ticket, 119 newvalue as [Hours-added], time as _time, strtime as [Time-Entered],119 newvalue as Hours_added, time as _time, strtime as Time_Entered, 120 120 _ord 121 121 FROM( … … 160 160 "title": "Ticket Hours", 161 161 "reportnumber": None, 162 "version": 2,162 "version":3, 163 163 "sql": """ 164 164 SELECT __color__, __style__, ticket, summary_, component ,version, severity, 165 milestone, status, owner, [Estimated-hours], [total-hours], billable165 milestone, status, owner, Estimated_hours, total_hours, billable 166 166 --,created, modified, -- ## Dates are formatted 167 167 -- _description_, -- ## Uses a full row … … 175 175 t.id AS ticket, summary AS summary_, -- ## Break line here 176 176 component,version, severity, milestone, status, owner, 177 EstimatedHours.value as [Estimated-hours],178 totalhours.value as [total-hours],177 EstimatedHours.value as Estimated_hours, 178 totalhours.value as total_hours, 179 179 CASE WHEN billable.value = 1 THEN 'Y' 180 180 else 'N' … … 206 206 '' as ticket, 'Time Summary' AS summary_, 207 207 '' as component,'' as version, '' as severity, '' as milestone, '' as status, '' as owner, 208 SUM(EstimatedHours.value) as [Estimated-hours],209 SUM(totalhours.value) as [total-hours],208 SUM(EstimatedHours.value) as Estimated_hours, 209 SUM(totalhours.value) as total_hours, 210 210 '' as billable, 211 211 '' as created, '' as modified, -- ## Dates are formatted … … 237 237 "title": "Ticket Hours with Description", 238 238 "reportnumber": None, 239 "version": 2,239 "version":3, 240 240 "sql": """ 241 241 SELECT __color__, __style__, ticket, summary_, component ,version, severity, 242 milestone, status, owner, [Estimated-hours], [total-hours], billable242 milestone, status, owner, Estimated_hours, total_hours, billable 243 243 --,created, modified, -- ## Dates are formatted 244 244 ,_description_ … … 252 252 t.id AS ticket, summary AS summary_, -- ## Break line here 253 253 component,version, severity, milestone, status, owner, 254 EstimatedHours.value as [Estimated-hours],255 totalhours.value as [total-hours],254 EstimatedHours.value as Estimated_hours, 255 totalhours.value as total_hours, 256 256 CASE WHEN billable.value = 1 THEN 'Y' 257 257 else 'N' … … 283 283 '' as ticket, 'Time Summary' AS summary_, 284 284 '' as component,'' as version, '' as severity, '' as milestone, '' as status, '' as owner, 285 SUM(EstimatedHours.value) as [Estimated-hours],286 SUM(totalhours.value) as [total-hours],285 SUM(EstimatedHours.value) as Estimated_hours, 286 SUM(totalhours.value) as total_hours, 287 287 '' as billable, 288 288 '' as created, '' as modified, -- ## Dates are formatted … … 315 315 "title":"Ticket Hours Grouped By Component", 316 316 "reportnumber":None, 317 "version": 2,317 "version":3, 318 318 "sql": """ 319 319 SELECT __color__, __group__, __style__, ticket, summary_, component ,version, severity, 320 milestone, status, owner, [Estimated-hours], [total-hours], billable320 milestone, status, owner, Estimated_hours, total_hours, billable 321 321 --,created, modified, -- ## Dates are formatted 322 322 -- _description_, -- ## Uses a full row … … 331 331 t.id AS ticket, summary AS summary_, -- ## Break line here 332 332 component,version, severity, milestone, status, owner, 333 EstimatedHours.value as [Estimated-hours],334 totalhours.value as [total-hours],333 EstimatedHours.value as Estimated_hours, 334 totalhours.value as total_hours, 335 335 CASE WHEN billable.value = 1 THEN 'Y' 336 336 else 'N' … … 363 363 '' as ticket, 'Time Summary' AS summary_, 364 364 t.component as component,'' as version, '' as severity, '' as milestone, '' as status, '' as owner, 365 SUM(EstimatedHours.value) as [Estimated-hours],366 SUM(totalhours.value) as [total-hours],365 SUM(EstimatedHours.value) as Estimated_hours, 366 SUM(totalhours.value) as total_hours, 367 367 '' as billable, 368 368 '' as created, '' as modified, -- ## Dates are formatted … … 396 396 "title":"Ticket Hours Grouped By Component with Description", 397 397 "reportnumber":None, 398 "version": 2,398 "version":3, 399 399 "sql": """ 400 400 SELECT __color__, __group__, __style__, ticket, summary_, component ,version, severity, 401 milestone, status, owner, [Estimated-hours], [total-hours], billable401 milestone, status, owner, Estimated_hours, total_hours, billable 402 402 --,created, modified -- ## Dates are formatted 403 403 ,_description_ -- ## Uses a full row … … 412 412 t.id AS ticket, summary AS summary_, -- ## Break line here 413 413 component,version, severity, milestone, status, owner, 414 EstimatedHours.value as [Estimated-hours],415 totalhours.value as [total-hours],414 EstimatedHours.value as Estimated_hours, 415 totalhours.value as total_hours, 416 416 CASE WHEN billable.value = 1 THEN 'Y' 417 417 else 'N' … … 444 444 '' as ticket, 'Time Summary' AS summary_, 445 445 t.component as component,'' as version, '' as severity, '' as milestone, '' as status, '' as owner, 446 SUM(EstimatedHours.value) as [Estimated-hours],447 SUM(totalhours.value) as [total-hours],446 SUM(EstimatedHours.value) as Estimated_hours, 447 SUM(totalhours.value) as total_hours, 448 448 '' as billable, 449 449 '' as created, '' as modified, -- ## Dates are formatted … … 476 476 "title":"Ticket Hours Grouped By Milestone", 477 477 "reportnumber":None, 478 "version": 2,478 "version":3, 479 479 "sql": """ 480 480 SELECT __color__, __group__, __style__, ticket, summary_, component ,version, severity, 481 milestone, status, owner, [Estimated-hours], [total-hours], billable481 milestone, status, owner, Estimated_hours, total_hours, billable 482 482 --,created, modified, -- ## Dates are formatted 483 483 --,_description_ -- ## Uses a full row … … 492 492 t.id AS ticket, summary AS summary_, -- ## Break line here 493 493 component,version, severity, milestone, status, owner, 494 EstimatedHours.value as [Estimated-hours],495 totalhours.value as [total-hours],494 EstimatedHours.value as Estimated_hours, 495 totalhours.value as total_hours, 496 496 CASE WHEN billable.value = 1 THEN 'Y' 497 497 else 'N' … … 524 524 '' as ticket, 'Time Summary' AS summary_, 525 525 '' as component,'' as version, '' as severity, t.milestone as milestone, '' as status, '' as owner, 526 SUM(EstimatedHours.value) as [Estimated-hours],527 SUM(totalhours.value) as [total-hours],526 SUM(EstimatedHours.value) as Estimated_hours, 527 SUM(totalhours.value) as total_hours, 528 528 '' as billable, 529 529 '' as created, '' as modified, -- ## Dates are formatted … … 556 556 "title":"Ticket Hours Grouped By MileStone with Description", 557 557 "reportnumber":None, 558 "version": 2,558 "version":3, 559 559 "sql": """ 560 560 SELECT __color__, __group__, __style__, ticket, summary_, component ,version, severity, 561 milestone, status, owner, [Estimated-hours], [total-hours], billable561 milestone, status, owner, Estimated_hours, total_hours, billable 562 562 --,created, modified, -- ## Dates are formatted 563 563 ,_description_ -- ## Uses a full row … … 572 572 t.id AS ticket, summary AS summary_, -- ## Break line here 573 573 component,version, severity, milestone, status, owner, 574 EstimatedHours.value as [Estimated-hours],575 totalhours.value as [total-hours],574 EstimatedHours.value as Estimated_hours, 575 totalhours.value as total_hours, 576 576 CASE WHEN billable.value = 1 THEN 'Y' 577 577 else 'N' … … 604 604 '' as ticket, 'Time Summary' AS summary_, 605 605 '' as component,'' as version, '' as severity, t.milestone as milestone, '' as status, '' as owner, 606 SUM(EstimatedHours.value) as [Estimated-hours],607 SUM(totalhours.value) as [total-hours],606 SUM(EstimatedHours.value) as Estimated_hours, 607 SUM(totalhours.value) as total_hours, 608 608 '' as billable, 609 609 '' as created, '' as modified, -- ## Dates are formatted timingandestimationplugin/trunk/timingandestimationplugin/webui.py
r1365 r1369 80 80 billing_dates = [] 81 81 billing_time_sql = """ 82 SELECT DISTINCT time as value, str_value as [text]82 SELECT DISTINCT time as value, str_value as text 83 83 FROM bill_date 84 84 """ … … 87 87 billing_info = {'text':text , 'value':value} 88 88 billing_dates.extend([billing_info]) 89 self.log.debug("bill-dates: %s"%billing_dates)89 #self.log.debug("bill-dates: %s"%billing_dates) 90 90 req.hdf['billing_info.billdates'] = billing_dates 91 91