keithsalisbury-subtrac 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +1 -1
- data/bin/subtrac +2 -0
- data/lib/subtrac.rb +85 -50
- data/lib/subtrac/config/config.yml +22 -19
- data/lib/subtrac/templates/location.erb +2 -2
- data/lib/subtrac/templates/projects/blank/trac/wiki/WikiStart +1 -1
- data/lib/subtrac/templates/trac.erb +1 -1
- data/lib/subtrac/templates/vhost.erb +6 -6
- metadata +1 -105
- data/lib/subtrac/trac-plugins/advancedticketworkflowplugin/advancedworkflow/__init__.py +0 -0
- data/lib/subtrac/trac-plugins/advancedticketworkflowplugin/advancedworkflow/controller.py +0 -419
- data/lib/subtrac/trac-plugins/advancedticketworkflowplugin/setup.cfg +0 -3
- data/lib/subtrac/trac-plugins/advancedticketworkflowplugin/setup.py +0 -20
- data/lib/subtrac/trac-plugins/clientsplugin/clients/__init__.py +0 -0
- data/lib/subtrac/trac-plugins/clientsplugin/clients/action.py +0 -28
- data/lib/subtrac/trac-plugins/clientsplugin/clients/action_email.py +0 -168
- data/lib/subtrac/trac-plugins/clientsplugin/clients/action_zendesk_forum.py +0 -137
- data/lib/subtrac/trac-plugins/clientsplugin/clients/admin.py +0 -91
- data/lib/subtrac/trac-plugins/clientsplugin/clients/api.py +0 -199
- data/lib/subtrac/trac-plugins/clientsplugin/clients/client.py +0 -105
- data/lib/subtrac/trac-plugins/clientsplugin/clients/events.py +0 -287
- data/lib/subtrac/trac-plugins/clientsplugin/clients/eventsadmin.py +0 -71
- data/lib/subtrac/trac-plugins/clientsplugin/clients/htdocs/clients.css +0 -4
- data/lib/subtrac/trac-plugins/clientsplugin/clients/model.py +0 -135
- data/lib/subtrac/trac-plugins/clientsplugin/clients/processor.py +0 -70
- data/lib/subtrac/trac-plugins/clientsplugin/clients/reportmanager.py +0 -142
- data/lib/subtrac/trac-plugins/clientsplugin/clients/reports.py +0 -231
- data/lib/subtrac/trac-plugins/clientsplugin/clients/summary.py +0 -27
- data/lib/subtrac/trac-plugins/clientsplugin/clients/summary_milestone.py +0 -152
- data/lib/subtrac/trac-plugins/clientsplugin/clients/summary_ticketchanges.py +0 -160
- data/lib/subtrac/trac-plugins/clientsplugin/clients/templates/admin_client_events.html +0 -124
- data/lib/subtrac/trac-plugins/clientsplugin/clients/templates/admin_clients.html +0 -134
- data/lib/subtrac/trac-plugins/clientsplugin/cron/changes.xslt +0 -132
- data/lib/subtrac/trac-plugins/clientsplugin/cron/run-client-event +0 -97
- data/lib/subtrac/trac-plugins/clientsplugin/cron/summary.xslt +0 -161
- data/lib/subtrac/trac-plugins/clientsplugin/setup.py +0 -43
- data/lib/subtrac/trac-plugins/estimationtoolsplugin/estimationtools/__init__.py +0 -4
- data/lib/subtrac/trac-plugins/estimationtoolsplugin/estimationtools/burndownchart.py +0 -273
- data/lib/subtrac/trac-plugins/estimationtoolsplugin/estimationtools/hoursinplaceeditor.py +0 -44
- data/lib/subtrac/trac-plugins/estimationtoolsplugin/estimationtools/hoursremaining.py +0 -36
- data/lib/subtrac/trac-plugins/estimationtoolsplugin/estimationtools/htdocs/jquery-1.2.3.min.js +0 -32
- data/lib/subtrac/trac-plugins/estimationtoolsplugin/estimationtools/htdocs/jquery.jeditable.js +0 -409
- data/lib/subtrac/trac-plugins/estimationtoolsplugin/estimationtools/htdocs/jquery.jeditable.mini.js +0 -30
- data/lib/subtrac/trac-plugins/estimationtoolsplugin/estimationtools/templates/edithours.html +0 -53
- data/lib/subtrac/trac-plugins/estimationtoolsplugin/estimationtools/tests/burndownchart.py +0 -181
- data/lib/subtrac/trac-plugins/estimationtoolsplugin/estimationtools/tests/hoursremaining.py +0 -66
- data/lib/subtrac/trac-plugins/estimationtoolsplugin/estimationtools/tests/workloadchart.py +0 -47
- data/lib/subtrac/trac-plugins/estimationtoolsplugin/estimationtools/utils.py +0 -93
- data/lib/subtrac/trac-plugins/estimationtoolsplugin/estimationtools/workloadchart.py +0 -86
- data/lib/subtrac/trac-plugins/estimationtoolsplugin/setup.py +0 -20
- data/lib/subtrac/trac-plugins/timingandestimationplugin/scripts/SumRollups.js +0 -23
- data/lib/subtrac/trac-plugins/timingandestimationplugin/scripts/adw_tracdb.py +0 -128
- data/lib/subtrac/trac-plugins/timingandestimationplugin/scripts/git-post-receive +0 -40
- data/lib/subtrac/trac-plugins/timingandestimationplugin/scripts/trac-post-commit.py +0 -285
- data/lib/subtrac/trac-plugins/timingandestimationplugin/scripts/trac_billing.py +0 -173
- data/lib/subtrac/trac-plugins/timingandestimationplugin/scripts/utils/__init__.py +0 -0
- data/lib/subtrac/trac-plugins/timingandestimationplugin/scripts/utils/mail.py +0 -164
- data/lib/subtrac/trac-plugins/timingandestimationplugin/setup.py +0 -69
- data/lib/subtrac/trac-plugins/timingandestimationplugin/timingandestimationplugin/__init__.py +0 -1
- data/lib/subtrac/trac-plugins/timingandestimationplugin/timingandestimationplugin/api.py +0 -292
- data/lib/subtrac/trac-plugins/timingandestimationplugin/timingandestimationplugin/blackmagic.py +0 -172
- data/lib/subtrac/trac-plugins/timingandestimationplugin/timingandestimationplugin/dbhelper.py +0 -178
- data/lib/subtrac/trac-plugins/timingandestimationplugin/timingandestimationplugin/htdocs/billingplugin.css +0 -25
- data/lib/subtrac/trac-plugins/timingandestimationplugin/timingandestimationplugin/htdocs/field_disabler.js +0 -6
- data/lib/subtrac/trac-plugins/timingandestimationplugin/timingandestimationplugin/htdocs/formatDate.js +0 -356
- data/lib/subtrac/trac-plugins/timingandestimationplugin/timingandestimationplugin/htdocs/js/tip_centerwindow.js +0 -100
- data/lib/subtrac/trac-plugins/timingandestimationplugin/timingandestimationplugin/htdocs/js/tip_followscroll.js +0 -84
- data/lib/subtrac/trac-plugins/timingandestimationplugin/timingandestimationplugin/htdocs/js/wz_tooltip.js +0 -1149
- data/lib/subtrac/trac-plugins/timingandestimationplugin/timingandestimationplugin/htdocs/linkifyer.js +0 -119
- data/lib/subtrac/trac-plugins/timingandestimationplugin/timingandestimationplugin/htdocs/query.js +0 -73
- data/lib/subtrac/trac-plugins/timingandestimationplugin/timingandestimationplugin/htdocs/ticket.js +0 -165
- data/lib/subtrac/trac-plugins/timingandestimationplugin/timingandestimationplugin/query_webui.py +0 -28
- data/lib/subtrac/trac-plugins/timingandestimationplugin/timingandestimationplugin/reportmanager.py +0 -221
- data/lib/subtrac/trac-plugins/timingandestimationplugin/timingandestimationplugin/reports.py +0 -675
- data/lib/subtrac/trac-plugins/timingandestimationplugin/timingandestimationplugin/reports_filter.py +0 -150
- data/lib/subtrac/trac-plugins/timingandestimationplugin/timingandestimationplugin/statuses.py +0 -25
- data/lib/subtrac/trac-plugins/timingandestimationplugin/timingandestimationplugin/tande_filters.py +0 -131
- data/lib/subtrac/trac-plugins/timingandestimationplugin/timingandestimationplugin/templates/billing.cs +0 -84
- data/lib/subtrac/trac-plugins/timingandestimationplugin/timingandestimationplugin/templates/billing.html +0 -104
- data/lib/subtrac/trac-plugins/timingandestimationplugin/timingandestimationplugin/ticket_daemon.py +0 -194
- data/lib/subtrac/trac-plugins/timingandestimationplugin/timingandestimationplugin/ticket_policy.py +0 -62
- data/lib/subtrac/trac-plugins/timingandestimationplugin/timingandestimationplugin/ticket_webui.py +0 -28
- data/lib/subtrac/trac-plugins/timingandestimationplugin/timingandestimationplugin/usermanual.py +0 -127
- data/lib/subtrac/trac-plugins/timingandestimationplugin/timingandestimationplugin/webui.py +0 -129
- data/lib/subtrac/trac-plugins/worklogplugin/setup.py +0 -29
- data/lib/subtrac/trac-plugins/worklogplugin/worklog/__init__.py +0 -1
- data/lib/subtrac/trac-plugins/worklogplugin/worklog/api.py +0 -187
- data/lib/subtrac/trac-plugins/worklogplugin/worklog/htdocs/jqModal.css +0 -40
- data/lib/subtrac/trac-plugins/worklogplugin/worklog/htdocs/jqModal.js +0 -67
- data/lib/subtrac/trac-plugins/worklogplugin/worklog/htdocs/jquery.mousewheel.pack.js +0 -12
- data/lib/subtrac/trac-plugins/worklogplugin/worklog/htdocs/jquery.timeentry.pack.js +0 -7
- data/lib/subtrac/trac-plugins/worklogplugin/worklog/htdocs/tracWorklog.js +0 -40
- data/lib/subtrac/trac-plugins/worklogplugin/worklog/htdocs/ui.datepicker.css +0 -208
- data/lib/subtrac/trac-plugins/worklogplugin/worklog/htdocs/ui.datepicker.js +0 -1439
- data/lib/subtrac/trac-plugins/worklogplugin/worklog/htdocs/work.png +0 -0
- data/lib/subtrac/trac-plugins/worklogplugin/worklog/htdocs/work.xcf +0 -0
- data/lib/subtrac/trac-plugins/worklogplugin/worklog/htdocs/worklogplugin.css +0 -80
- data/lib/subtrac/trac-plugins/worklogplugin/worklog/htdocs/workstart.png +0 -0
- data/lib/subtrac/trac-plugins/worklogplugin/worklog/htdocs/workstop.png +0 -0
- data/lib/subtrac/trac-plugins/worklogplugin/worklog/manager.py +0 -336
- data/lib/subtrac/trac-plugins/worklogplugin/worklog/reports.py +0 -598
- data/lib/subtrac/trac-plugins/worklogplugin/worklog/templates/worklog.html +0 -45
- data/lib/subtrac/trac-plugins/worklogplugin/worklog/templates/worklog_stop.html +0 -70
- data/lib/subtrac/trac-plugins/worklogplugin/worklog/templates/worklog_user.html +0 -40
- data/lib/subtrac/trac-plugins/worklogplugin/worklog/templates/worklog_webadminui.html +0 -59
- data/lib/subtrac/trac-plugins/worklogplugin/worklog/ticket_daemon.py +0 -33
- data/lib/subtrac/trac-plugins/worklogplugin/worklog/ticket_filter.py +0 -153
- data/lib/subtrac/trac-plugins/worklogplugin/worklog/timeline_hook.py +0 -96
- data/lib/subtrac/trac-plugins/worklogplugin/worklog/usermanual.py +0 -29
- data/lib/subtrac/trac-plugins/worklogplugin/worklog/util.py +0 -31
- data/lib/subtrac/trac-plugins/worklogplugin/worklog/webadminui.py +0 -47
- data/lib/subtrac/trac-plugins/worklogplugin/worklog/webui.py +0 -174
- data/lib/subtrac/trac-plugins/worklogplugin/worklog/xmlrpc.py +0 -73
data/lib/subtrac/trac-plugins/timingandestimationplugin/timingandestimationplugin/reports.py
DELETED
@@ -1,675 +0,0 @@
|
|
1
|
-
# IF YOU ADD A NEW SECTION OF REPORTS, You will need to make
|
2
|
-
# sure that section is also added to the all_reports hashtable
|
3
|
-
# near the bottom
|
4
|
-
|
5
|
-
#Please try to keep this clean"
|
6
|
-
|
7
|
-
billing_reports = [
|
8
|
-
{
|
9
|
-
"uuid":"b24f08c0-d41f-4c63-93a5-25e18a8513c2",
|
10
|
-
"title":"Ticket Work Summary",
|
11
|
-
"version":21,
|
12
|
-
"sql":"""
|
13
|
-
SELECT __ticket__ as __group__, __style__, ticket,
|
14
|
-
newvalue as Work_added, author, time as datetime, _ord
|
15
|
-
FROM(
|
16
|
-
SELECT '' as __style__, author,
|
17
|
-
t.summary as __ticket__,
|
18
|
-
t.id as ticket,
|
19
|
-
CASE WHEN newvalue = '' OR newvalue IS NULL THEN 0
|
20
|
-
ELSE CAST( newvalue AS DECIMAL ) END AS newvalue,
|
21
|
-
ticket_change.time as time, 0 as _ord
|
22
|
-
FROM ticket_change
|
23
|
-
JOIN ticket t on t.id = ticket_change.ticket
|
24
|
-
LEFT JOIN ticket_custom as billable on billable.ticket = t.id
|
25
|
-
and billable.name = 'billable'
|
26
|
-
WHERE field = 'hours' and
|
27
|
-
t.status IN (#STATUSES#)
|
28
|
-
AND billable.value in ($BILLABLE, $UNBILLABLE)
|
29
|
-
AND ticket_change.time >= $STARTDATE
|
30
|
-
AND ticket_change.time < $ENDDATE
|
31
|
-
|
32
|
-
UNION
|
33
|
-
|
34
|
-
SELECT 'background-color:#DFE;' as __style__,
|
35
|
-
'Total work done on the ticket in the selected time period ' as author,
|
36
|
-
t.summary as __ticket__,
|
37
|
-
t.id as ticket,
|
38
|
-
SUM( CASE WHEN newvalue = '' OR newvalue IS NULL THEN 0
|
39
|
-
ELSE CAST( newvalue AS DECIMAL ) END ) as newvalue,
|
40
|
-
NULL as time, 1 as _ord
|
41
|
-
FROM ticket_change
|
42
|
-
JOIN ticket t on t.id = ticket_change.ticket
|
43
|
-
LEFT JOIN ticket_custom as billable on billable.ticket = t.id
|
44
|
-
and billable.name = 'billable'
|
45
|
-
WHERE field = 'hours' and
|
46
|
-
t.status IN (#STATUSES#)
|
47
|
-
AND billable.value in ($BILLABLE, $UNBILLABLE)
|
48
|
-
AND ticket_change.time >= $STARTDATE
|
49
|
-
AND ticket_change.time < $ENDDATE
|
50
|
-
GROUP By t.id, t.summary
|
51
|
-
) as tbl
|
52
|
-
ORDER BY __ticket__, _ord ASC, time ASC
|
53
|
-
|
54
|
-
"""
|
55
|
-
},#END Ticket work summary
|
56
|
-
{
|
57
|
-
"uuid":"af13564f-0e36-4a17-96c0-632dc68d8d14",
|
58
|
-
"title":"Milestone Work Summary",
|
59
|
-
"version":18,
|
60
|
-
"sql":"""
|
61
|
-
|
62
|
-
SELECT
|
63
|
-
milestone as __group__, __style__, ticket, summary, newvalue as Work_added,
|
64
|
-
time as datetime, _ord
|
65
|
-
FROM(
|
66
|
-
SELECT '' as __style__, t.id as ticket,
|
67
|
-
SUM( CASE WHEN newvalue = '' OR newvalue IS NULL THEN 0
|
68
|
-
ELSE CAST( newvalue AS DECIMAL ) END) as newvalue, t.summary as summary,
|
69
|
-
MAX(ticket_change.time) as time, t.milestone as milestone, 0 as _ord
|
70
|
-
FROM ticket_change
|
71
|
-
JOIN ticket t on t.id = ticket_change.ticket
|
72
|
-
LEFT JOIN ticket_custom as billable on billable.ticket = t.id
|
73
|
-
and billable.name = 'billable'
|
74
|
-
WHERE field = 'hours' and
|
75
|
-
t.status IN (#STATUSES#)
|
76
|
-
AND billable.value in ($BILLABLE, $UNBILLABLE)
|
77
|
-
AND ticket_change.time >= $STARTDATE
|
78
|
-
AND ticket_change.time < $ENDDATE
|
79
|
-
GROUP BY t.milestone, t.id, t.summary
|
80
|
-
|
81
|
-
UNION
|
82
|
-
|
83
|
-
SELECT 'background-color:#DFE;' as __style__, 0 as ticket,
|
84
|
-
sum( CASE WHEN newvalue = '' OR newvalue IS NULL THEN 0
|
85
|
-
ELSE CAST( newvalue AS DECIMAL ) END) as newvalue, 'Total work done' as summary,
|
86
|
-
NULL as time, t.milestone as milestone, 1 as _ord
|
87
|
-
FROM ticket_change
|
88
|
-
JOIN ticket t on t.id = ticket_change.ticket
|
89
|
-
LEFT JOIN ticket_custom as billable on billable.ticket = t.id
|
90
|
-
and billable.name = 'billable'
|
91
|
-
WHERE field = 'hours' and
|
92
|
-
t.status IN (#STATUSES#)
|
93
|
-
AND billable.value in ($BILLABLE, $UNBILLABLE)
|
94
|
-
AND ticket_change.time >= $STARTDATE
|
95
|
-
AND ticket_change.time < $ENDDATE
|
96
|
-
GROUP By t.milestone
|
97
|
-
) as tbl
|
98
|
-
ORDER BY milestone, _ord ASC, ticket, time
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
"""
|
103
|
-
},#END Milestone work summary
|
104
|
-
|
105
|
-
{
|
106
|
-
"uuid":"7bd4b0ce-da6d-4b11-8be3-07e65b540d99",
|
107
|
-
"title":"Developer Work Summary",
|
108
|
-
"version":18,
|
109
|
-
"sql":"""
|
110
|
-
SELECT author as __group__,__style__, ticket, summary,
|
111
|
-
newvalue as Work_added, time as datetime, _ord
|
112
|
-
FROM(
|
113
|
-
SELECT '' as __style__, author, t.id as ticket,
|
114
|
-
t.summary as summary,
|
115
|
-
CASE WHEN newvalue = '' OR newvalue IS NULL THEN 0
|
116
|
-
ELSE CAST( newvalue AS DECIMAL ) END as newvalue,
|
117
|
-
ticket_change.time as time, 0 as _ord
|
118
|
-
FROM ticket_change
|
119
|
-
JOIN ticket t on t.id = ticket_change.ticket
|
120
|
-
LEFT JOIN ticket_custom as billable on billable.ticket = t.id
|
121
|
-
and billable.name = 'billable'
|
122
|
-
WHERE field = 'hours' and
|
123
|
-
t.status IN (#STATUSES#)
|
124
|
-
AND billable.value in ($BILLABLE, $UNBILLABLE)
|
125
|
-
AND ticket_change.time >= $STARTDATE
|
126
|
-
AND ticket_change.time < $ENDDATE
|
127
|
-
|
128
|
-
UNION
|
129
|
-
|
130
|
-
SELECT 'background-color:#DFE;' as __style__, author, 0 as ticket,
|
131
|
-
Null as summary,
|
132
|
-
SUM( CASE WHEN newvalue = '' OR newvalue IS NULL THEN 0
|
133
|
-
ELSE CAST( newvalue AS DECIMAL ) END) as newvalue,
|
134
|
-
NULL as time, 1 as _ord
|
135
|
-
FROM ticket_change
|
136
|
-
JOIN ticket t on t.id = ticket_change.ticket
|
137
|
-
LEFT JOIN ticket_custom as billable on billable.ticket = t.id
|
138
|
-
and billable.name = 'billable'
|
139
|
-
WHERE field = 'hours' and
|
140
|
-
t.status IN (#STATUSES#)
|
141
|
-
AND billable.value in ($BILLABLE, $UNBILLABLE)
|
142
|
-
AND ticket_change.time >= $STARTDATE
|
143
|
-
AND ticket_change.time < $ENDDATE
|
144
|
-
GROUP By author
|
145
|
-
) as tbl
|
146
|
-
ORDER BY author, _ord ASC, time
|
147
|
-
|
148
|
-
"""
|
149
|
-
},#END Hours Per Developer
|
150
|
-
]
|
151
|
-
th_version =16
|
152
|
-
ticket_hours_reports = [
|
153
|
-
{
|
154
|
-
"uuid":"8d785cdb-dcf5-43c9-b2a6-216997b0011a",
|
155
|
-
"title": "Ticket Hours",
|
156
|
-
"version":th_version,
|
157
|
-
"sql": """
|
158
|
-
SELECT __color__, __style__, ticket, summary, component ,version, severity,
|
159
|
-
milestone, status, owner, Estimated_work, Total_work, billable,_ord
|
160
|
-
FROM (
|
161
|
-
SELECT p.value AS __color__,
|
162
|
-
'' as __style__,
|
163
|
-
t.id AS ticket, summary AS summary, -- ## Break line here
|
164
|
-
component,version, severity, milestone, status, owner,
|
165
|
-
CASE WHEN EstimatedHours.value = '' OR EstimatedHours.value IS NULL THEN 0
|
166
|
-
ELSE CAST( EstimatedHours.value AS DECIMAL ) END as Estimated_work,
|
167
|
-
CASE WHEN totalhours.value = '' OR totalhours.value IS NULL THEN 0
|
168
|
-
ELSE CAST( totalhours.value AS DECIMAL ) END as Total_work,
|
169
|
-
CASE WHEN billable.value = '1' THEN 'Y' else 'N' END as billable,
|
170
|
-
time AS created, changetime AS modified, -- ## Dates are formatted
|
171
|
-
description AS _description_, -- ## Uses a full row
|
172
|
-
changetime AS _changetime,
|
173
|
-
reporter AS _reporter
|
174
|
-
,0 as _ord
|
175
|
-
|
176
|
-
FROM ticket as t
|
177
|
-
JOIN enum as p ON p.name=t.priority AND p.type='priority'
|
178
|
-
|
179
|
-
LEFT JOIN ticket_custom as EstimatedHours ON EstimatedHours.name='estimatedhours'
|
180
|
-
AND EstimatedHours.Ticket = t.Id
|
181
|
-
LEFT JOIN ticket_custom as totalhours ON totalhours.name='totalhours'
|
182
|
-
AND totalhours.Ticket = t.Id
|
183
|
-
LEFT JOIN ticket_custom as billable ON billable.name='billable'
|
184
|
-
AND billable.Ticket = t.Id
|
185
|
-
|
186
|
-
WHERE t.status IN (#STATUSES#)
|
187
|
-
AND billable.value in ($BILLABLE, $UNBILLABLE)
|
188
|
-
|
189
|
-
|
190
|
-
UNION
|
191
|
-
|
192
|
-
SELECT '1' AS __color__,
|
193
|
-
'background-color:#DFE;' as __style__,
|
194
|
-
0 as ticket, 'Total' AS summary,
|
195
|
-
NULL as component,NULL as version, NULL as severity, NULL as milestone,
|
196
|
-
'Time Remaining: ' as status,
|
197
|
-
CAST(
|
198
|
-
SUM(CASE WHEN EstimatedHours.value = '' OR EstimatedHours.value IS NULL THEN 0
|
199
|
-
ELSE CAST( EstimatedHours.value AS DECIMAL ) END) -
|
200
|
-
SUM(CASE WHEN totalhours.value = '' OR totalhours.value IS NULL THEN 0
|
201
|
-
ELSE CAST( totalhours.value AS DECIMAL ) END)
|
202
|
-
AS CHAR(512)) as owner,
|
203
|
-
SUM(CASE WHEN EstimatedHours.value = '' OR EstimatedHours.value IS NULL THEN 0
|
204
|
-
ELSE CAST( EstimatedHours.value AS DECIMAL ) END) as Estimated_work,
|
205
|
-
SUM(CASE WHEN totalhours.value = '' OR totalhours.value IS NULL THEN 0
|
206
|
-
ELSE CAST( totalhours.value AS DECIMAL ) END) as Total_work,
|
207
|
-
NULL as billable,
|
208
|
-
NULL as created, NULL as modified, -- ## Dates are formatted
|
209
|
-
|
210
|
-
NULL AS _description_,
|
211
|
-
NULL AS _changetime,
|
212
|
-
NULL AS _reporter
|
213
|
-
,1 as _ord
|
214
|
-
FROM ticket as t
|
215
|
-
JOIN enum as p ON p.name=t.priority AND p.type='priority'
|
216
|
-
|
217
|
-
LEFT JOIN ticket_custom as EstimatedHours ON EstimatedHours.name='estimatedhours'
|
218
|
-
AND EstimatedHours.Ticket = t.Id
|
219
|
-
|
220
|
-
LEFT JOIN ticket_custom as totalhours ON totalhours.name='totalhours'
|
221
|
-
AND totalhours.Ticket = t.Id
|
222
|
-
|
223
|
-
LEFT JOIN ticket_custom as billable ON billable.name='billable'
|
224
|
-
AND billable.Ticket = t.Id
|
225
|
-
|
226
|
-
WHERE t.status IN (#STATUSES#)
|
227
|
-
AND billable.value in ($BILLABLE, $UNBILLABLE)
|
228
|
-
) as tbl
|
229
|
-
ORDER BY _ord ASC, ticket
|
230
|
-
"""
|
231
|
-
},
|
232
|
-
#END Ticket Hours
|
233
|
-
{
|
234
|
-
"uuid":"71e7c36d-e512-4d0b-b499-087d4d20ff0b",
|
235
|
-
"title": "Ticket Hours with Description",
|
236
|
-
"version":th_version,
|
237
|
-
"sql": """
|
238
|
-
SELECT __color__, __style__, ticket, summary, component ,version, severity,
|
239
|
-
milestone, status, owner, Estimated_work, Total_work, billable
|
240
|
-
-- ## ,created, modified, -- ## Dates are formatted
|
241
|
-
,_description_
|
242
|
-
-- ## _changetime,
|
243
|
-
-- ## _reporter
|
244
|
-
,_ord
|
245
|
-
|
246
|
-
FROM (
|
247
|
-
SELECT p.value AS __color__,
|
248
|
-
'' as __style__,
|
249
|
-
t.id AS ticket, summary AS summary, -- ## Break line here
|
250
|
-
component,version, severity, milestone, status, owner,
|
251
|
-
CASE WHEN EstimatedHours.value = '' OR EstimatedHours.value IS NULL THEN 0
|
252
|
-
ELSE CAST( EstimatedHours.value AS DECIMAL ) END as Estimated_work,
|
253
|
-
CASE WHEN totalhours.value = '' OR totalhours.value IS NULL THEN 0
|
254
|
-
ELSE CAST( totalhours.value AS DECIMAL ) END as Total_work,
|
255
|
-
CASE WHEN billable.value = '1' THEN 'Y'
|
256
|
-
else 'N'
|
257
|
-
END as billable,
|
258
|
-
time AS created, changetime AS modified, -- ## Dates are formatted
|
259
|
-
description AS _description_, -- ## Uses a full row
|
260
|
-
changetime AS _changetime,
|
261
|
-
reporter AS _reporter
|
262
|
-
,0 as _ord
|
263
|
-
|
264
|
-
FROM ticket as t
|
265
|
-
JOIN enum as p ON p.name=t.priority AND p.type='priority'
|
266
|
-
|
267
|
-
LEFT JOIN ticket_custom as EstimatedHours ON EstimatedHours.name='estimatedhours'
|
268
|
-
AND EstimatedHours.Ticket = t.Id
|
269
|
-
LEFT JOIN ticket_custom as totalhours ON totalhours.name='totalhours'
|
270
|
-
AND totalhours.Ticket = t.Id
|
271
|
-
LEFT JOIN ticket_custom as billable ON billable.name='billable'
|
272
|
-
AND billable.Ticket = t.Id
|
273
|
-
|
274
|
-
WHERE t.status IN (#STATUSES#)
|
275
|
-
AND billable.value in ($BILLABLE, $UNBILLABLE)
|
276
|
-
|
277
|
-
|
278
|
-
UNION
|
279
|
-
|
280
|
-
SELECT '1' AS __color__,
|
281
|
-
'background-color:#DFE;' as __style__,
|
282
|
-
0 as ticket, 'Total' AS summary,
|
283
|
-
NULL as component,NULL as version, NULL as severity, NULL as milestone,
|
284
|
-
'Time Remaining: ' as status,
|
285
|
-
CAST(
|
286
|
-
SUM(CASE WHEN EstimatedHours.value = '' OR EstimatedHours.value IS NULL THEN 0
|
287
|
-
ELSE CAST( EstimatedHours.value AS DECIMAL ) END) -
|
288
|
-
SUM(CASE WHEN totalhours.value = '' OR totalhours.value IS NULL THEN 0
|
289
|
-
ELSE CAST( totalhours.value AS DECIMAL ) END)
|
290
|
-
AS CHAR(512)) as owner,
|
291
|
-
SUM(CASE WHEN EstimatedHours.value = '' OR EstimatedHours.value IS NULL THEN 0
|
292
|
-
ELSE CAST( EstimatedHours.value AS DECIMAL ) END) as Estimated_work,
|
293
|
-
SUM(CASE WHEN totalhours.value = '' OR totalhours.value IS NULL THEN 0
|
294
|
-
ELSE CAST( totalhours.value AS DECIMAL ) END) as Total_work,
|
295
|
-
NULL as billable,
|
296
|
-
NULL as created, NULL as modified, -- ## Dates are formatted
|
297
|
-
|
298
|
-
NULL AS _description_,
|
299
|
-
NULL AS _changetime,
|
300
|
-
NULL AS _reporter
|
301
|
-
,1 as _ord
|
302
|
-
FROM ticket as t
|
303
|
-
JOIN enum as p ON p.name=t.priority AND p.type='priority'
|
304
|
-
|
305
|
-
LEFT JOIN ticket_custom as EstimatedHours ON EstimatedHours.name='estimatedhours'
|
306
|
-
AND EstimatedHours.Ticket = t.Id
|
307
|
-
|
308
|
-
LEFT JOIN ticket_custom as totalhours ON totalhours.name='totalhours'
|
309
|
-
AND totalhours.Ticket = t.Id
|
310
|
-
|
311
|
-
LEFT JOIN ticket_custom as billable ON billable.name='billable'
|
312
|
-
AND billable.Ticket = t.Id
|
313
|
-
|
314
|
-
WHERE t.status IN (#STATUSES#)
|
315
|
-
AND billable.value in ($BILLABLE, $UNBILLABLE)
|
316
|
-
) as tbl
|
317
|
-
ORDER BY _ord ASC, ticket
|
318
|
-
"""
|
319
|
-
},
|
320
|
-
#END Ticket Hours
|
321
|
-
|
322
|
-
{
|
323
|
-
"uuid":"5f33b102-e6a6-47e8-976c-ac7a6794a909",
|
324
|
-
"title":"Ticket Hours Grouped By Component",
|
325
|
-
"version":th_version,
|
326
|
-
"sql": """
|
327
|
-
SELECT __color__, __group__, __style__, ticket, summary, __component__ ,version,
|
328
|
-
severity, milestone, status, owner, Estimated_work, total_work, billable,
|
329
|
-
_ord
|
330
|
-
|
331
|
-
FROM (
|
332
|
-
SELECT p.value AS __color__,
|
333
|
-
t.component AS __group__,
|
334
|
-
'' as __style__,
|
335
|
-
t.id AS ticket, summary AS summary, -- ## Break line here
|
336
|
-
component as __component__,version, severity, milestone, status, owner,
|
337
|
-
CASE WHEN EstimatedHours.value = '' OR EstimatedHours.value IS NULL THEN 0
|
338
|
-
ELSE CAST( EstimatedHours.value AS DECIMAL ) END as Estimated_work,
|
339
|
-
CASE WHEN totalhours.value = '' OR totalhours.value IS NULL THEN 0
|
340
|
-
ELSE CAST( totalhours.value AS DECIMAL ) END as Total_work,
|
341
|
-
CASE WHEN billable.value = '1' THEN 'Y'
|
342
|
-
else 'N'
|
343
|
-
END as billable,
|
344
|
-
time AS created, changetime AS modified, -- ## Dates are formatted
|
345
|
-
description AS _description_, -- ## Uses a full row
|
346
|
-
changetime AS _changetime,
|
347
|
-
reporter AS _reporter
|
348
|
-
,0 as _ord
|
349
|
-
|
350
|
-
FROM ticket as t
|
351
|
-
JOIN enum as p ON p.name=t.priority AND p.type='priority'
|
352
|
-
|
353
|
-
LEFT JOIN ticket_custom as EstimatedHours ON EstimatedHours.name='estimatedhours'
|
354
|
-
AND EstimatedHours.Ticket = t.Id
|
355
|
-
LEFT JOIN ticket_custom as totalhours ON totalhours.name='totalhours'
|
356
|
-
AND totalhours.Ticket = t.Id
|
357
|
-
LEFT JOIN ticket_custom as billable ON billable.name='billable'
|
358
|
-
AND billable.Ticket = t.Id
|
359
|
-
|
360
|
-
WHERE t.status IN (#STATUSES#)
|
361
|
-
AND billable.value in ($BILLABLE, $UNBILLABLE)
|
362
|
-
|
363
|
-
|
364
|
-
UNION
|
365
|
-
|
366
|
-
SELECT '1' AS __color__,
|
367
|
-
t.component AS __group__,
|
368
|
-
'background-color:#DFE;' as __style__,
|
369
|
-
0 as ticket, 'Total work' AS summary,
|
370
|
-
t.component as __component__, NULL as version, NULL as severity,
|
371
|
-
NULL as milestone, 'Time Remaining: ' as status,
|
372
|
-
CAST(
|
373
|
-
SUM(CASE WHEN EstimatedHours.value = '' OR EstimatedHours.value IS NULL THEN 0
|
374
|
-
ELSE CAST( EstimatedHours.value AS DECIMAL ) END) -
|
375
|
-
SUM(CASE WHEN totalhours.value = '' OR totalhours.value IS NULL THEN 0
|
376
|
-
ELSE CAST( totalhours.value AS DECIMAL ) END)
|
377
|
-
AS CHAR(512)) as owner,
|
378
|
-
SUM(CASE WHEN EstimatedHours.value = '' OR EstimatedHours.value IS NULL THEN 0
|
379
|
-
ELSE CAST( EstimatedHours.value AS DECIMAL ) END) as Estimated_work,
|
380
|
-
SUM(CASE WHEN totalhours.value = '' OR totalhours.value IS NULL THEN 0
|
381
|
-
ELSE CAST( totalhours.value AS DECIMAL ) END) as Total_work,
|
382
|
-
NULL as billable,
|
383
|
-
NULL as created,
|
384
|
-
NULL as modified, -- ## Dates are formatted
|
385
|
-
|
386
|
-
NULL AS _description_,
|
387
|
-
NULL AS _changetime,
|
388
|
-
NULL AS _reporter
|
389
|
-
,1 as _ord
|
390
|
-
FROM ticket as t
|
391
|
-
JOIN enum as p ON p.name=t.priority AND p.type='priority'
|
392
|
-
|
393
|
-
LEFT JOIN ticket_custom as EstimatedHours ON EstimatedHours.name='estimatedhours'
|
394
|
-
AND EstimatedHours.Ticket = t.Id
|
395
|
-
|
396
|
-
LEFT JOIN ticket_custom as totalhours ON totalhours.name='totalhours'
|
397
|
-
AND totalhours.Ticket = t.Id
|
398
|
-
|
399
|
-
LEFT JOIN ticket_custom as billable ON billable.name='billable'
|
400
|
-
AND billable.Ticket = t.Id
|
401
|
-
|
402
|
-
WHERE t.status IN (#STATUSES#)
|
403
|
-
AND billable.value in ($BILLABLE, $UNBILLABLE)
|
404
|
-
GROUP BY t.component
|
405
|
-
) as tbl
|
406
|
-
ORDER BY __component__, _ord ASC,ticket
|
407
|
-
"""
|
408
|
-
},
|
409
|
-
# END Ticket Hours GROUPED BY COMPONENT
|
410
|
-
|
411
|
-
{
|
412
|
-
"uuid":"7816f034-a174-4a94-aed6-358fb648b2fc",
|
413
|
-
"title":"Ticket Hours Grouped By Component with Description",
|
414
|
-
"version":th_version,
|
415
|
-
"sql": """
|
416
|
-
SELECT __color__, __group__, __style__, ticket, summary, __component__ ,
|
417
|
-
version, severity, milestone, status, owner, Estimated_work, Total_work,
|
418
|
-
billable, _description_, _ord
|
419
|
-
|
420
|
-
FROM (
|
421
|
-
SELECT p.value AS __color__,
|
422
|
-
t.component AS __group__,
|
423
|
-
'' as __style__,
|
424
|
-
t.id AS ticket, summary AS summary, -- ## Break line here
|
425
|
-
component as __component__, version, severity, milestone, status, owner,
|
426
|
-
CASE WHEN EstimatedHours.value = '' OR EstimatedHours.value IS NULL THEN 0
|
427
|
-
ELSE CAST( EstimatedHours.value AS DECIMAL ) END as Estimated_work,
|
428
|
-
CASE WHEN totalhours.value = '' OR totalhours.value IS NULL THEN 0
|
429
|
-
ELSE CAST( totalhours.value AS DECIMAL ) END as Total_work,
|
430
|
-
CASE WHEN billable.value = '1' THEN 'Y' else 'N' END as billable,
|
431
|
-
time AS created, changetime AS modified, -- ## Dates are formatted
|
432
|
-
description AS _description_, -- ## Uses a full row
|
433
|
-
changetime AS _changetime,
|
434
|
-
reporter AS _reporter
|
435
|
-
,0 as _ord
|
436
|
-
|
437
|
-
FROM ticket as t
|
438
|
-
JOIN enum as p ON p.name=t.priority AND p.type='priority'
|
439
|
-
|
440
|
-
LEFT JOIN ticket_custom as EstimatedHours ON EstimatedHours.name='estimatedhours'
|
441
|
-
AND EstimatedHours.Ticket = t.Id
|
442
|
-
LEFT JOIN ticket_custom as totalhours ON totalhours.name='totalhours'
|
443
|
-
AND totalhours.Ticket = t.Id
|
444
|
-
LEFT JOIN ticket_custom as billable ON billable.name='billable'
|
445
|
-
AND billable.Ticket = t.Id
|
446
|
-
|
447
|
-
WHERE t.status IN (#STATUSES#)
|
448
|
-
AND billable.value in ($BILLABLE, $UNBILLABLE)
|
449
|
-
|
450
|
-
|
451
|
-
UNION
|
452
|
-
|
453
|
-
SELECT '1' AS __color__,
|
454
|
-
t.component AS __group__,
|
455
|
-
'background-color:#DFE;' as __style__,
|
456
|
-
0 as ticket, 'Total work' AS summary,
|
457
|
-
t.component as __component__, NULL as version, NULL as severity,
|
458
|
-
NULL as milestone, 'Time Remaining: ' as status,
|
459
|
-
CAST(
|
460
|
-
SUM(CASE WHEN EstimatedHours.value = '' OR EstimatedHours.value IS NULL THEN 0
|
461
|
-
ELSE CAST( EstimatedHours.value AS DECIMAL ) END) -
|
462
|
-
SUM(CASE WHEN totalhours.value = '' OR totalhours.value IS NULL THEN 0
|
463
|
-
ELSE CAST( totalhours.value AS DECIMAL ) END)
|
464
|
-
AS CHAR(512)) as owner,
|
465
|
-
SUM(CASE WHEN EstimatedHours.value = '' OR EstimatedHours.value IS NULL THEN 0
|
466
|
-
ELSE CAST( EstimatedHours.value AS DECIMAL ) END) as Estimated_work,
|
467
|
-
SUM(CASE WHEN totalhours.value = '' OR totalhours.value IS NULL THEN 0
|
468
|
-
ELSE CAST( totalhours.value AS DECIMAL ) END) as Total_work,
|
469
|
-
NULL as billable,
|
470
|
-
NULL as created, NULL as modified, -- ## Dates are formatted
|
471
|
-
|
472
|
-
NULL AS _description_,
|
473
|
-
NULL AS _changetime,
|
474
|
-
NULL AS _reporter
|
475
|
-
,1 as _ord
|
476
|
-
FROM ticket as t
|
477
|
-
JOIN enum as p ON p.name=t.priority AND p.type='priority'
|
478
|
-
|
479
|
-
LEFT JOIN ticket_custom as EstimatedHours ON EstimatedHours.name='estimatedhours'
|
480
|
-
AND EstimatedHours.Ticket = t.Id
|
481
|
-
|
482
|
-
LEFT JOIN ticket_custom as totalhours ON totalhours.name='totalhours'
|
483
|
-
AND totalhours.Ticket = t.Id
|
484
|
-
|
485
|
-
LEFT JOIN ticket_custom as billable ON billable.name='billable'
|
486
|
-
AND billable.Ticket = t.Id
|
487
|
-
|
488
|
-
WHERE t.status IN (#STATUSES#)
|
489
|
-
AND billable.value in ($BILLABLE, $UNBILLABLE)
|
490
|
-
GROUP BY t.component
|
491
|
-
) as tbl
|
492
|
-
ORDER BY __component__, _ord ASC, ticket
|
493
|
-
"""
|
494
|
-
},
|
495
|
-
# END Ticket Hours Grouped BY Component with Description
|
496
|
-
{
|
497
|
-
"uuid":"03815803-7688-4f3a-8e65-8d254cc1d1fb",
|
498
|
-
"title":"Ticket Hours Grouped By Milestone",
|
499
|
-
"version":th_version,
|
500
|
-
"sql": """
|
501
|
-
SELECT __color__, __group__, __style__, ticket, summary, component ,version,
|
502
|
-
severity, __milestone__, status, owner, Estimated_work, Total_work, billable,
|
503
|
-
_ord
|
504
|
-
|
505
|
-
FROM (
|
506
|
-
SELECT p.value AS __color__,
|
507
|
-
t.milestone AS __group__,
|
508
|
-
'' as __style__,
|
509
|
-
t.id AS ticket, summary AS summary, -- ## Break line here
|
510
|
-
component,version, severity, milestone as __milestone__, status, owner,
|
511
|
-
CASE WHEN EstimatedHours.value = '' OR EstimatedHours.value IS NULL THEN 0
|
512
|
-
ELSE CAST( EstimatedHours.value AS DECIMAL ) END as Estimated_work,
|
513
|
-
CASE WHEN totalhours.value = '' OR totalhours.value IS NULL THEN 0
|
514
|
-
ELSE CAST( totalhours.value AS DECIMAL ) END as Total_work,
|
515
|
-
CASE WHEN billable.value = '1' THEN 'Y'
|
516
|
-
else 'N'
|
517
|
-
END as billable,
|
518
|
-
time AS created, changetime AS modified, -- ## Dates are formatted
|
519
|
-
description AS _description_, -- ## Uses a full row
|
520
|
-
changetime AS _changetime,
|
521
|
-
reporter AS _reporter, 0 as _ord
|
522
|
-
|
523
|
-
FROM ticket as t
|
524
|
-
JOIN enum as p ON p.name=t.priority AND p.type='priority'
|
525
|
-
|
526
|
-
LEFT JOIN ticket_custom as EstimatedHours ON EstimatedHours.name='estimatedhours'
|
527
|
-
AND EstimatedHours.Ticket = t.Id
|
528
|
-
LEFT JOIN ticket_custom as totalhours ON totalhours.name='totalhours'
|
529
|
-
AND totalhours.Ticket = t.Id
|
530
|
-
LEFT JOIN ticket_custom as billable ON billable.name='billable'
|
531
|
-
AND billable.Ticket = t.Id
|
532
|
-
|
533
|
-
WHERE t.status IN (#STATUSES#)
|
534
|
-
AND billable.value in ($BILLABLE, $UNBILLABLE)
|
535
|
-
|
536
|
-
|
537
|
-
UNION
|
538
|
-
|
539
|
-
SELECT '1' AS __color__,
|
540
|
-
t.milestone AS __group__,
|
541
|
-
'background-color:#DFE;' as __style__,
|
542
|
-
0 as ticket, 'Total work' AS summary,
|
543
|
-
NULL as component,NULL as version, NULL as severity,
|
544
|
-
t.milestone as __milestone__, 'Time Remaining: ' as status,
|
545
|
-
CAST(
|
546
|
-
SUM(CASE WHEN EstimatedHours.value = '' OR EstimatedHours.value IS NULL THEN 0
|
547
|
-
ELSE CAST( EstimatedHours.value AS DECIMAL ) END) -
|
548
|
-
SUM(CASE WHEN totalhours.value = '' OR totalhours.value IS NULL THEN 0
|
549
|
-
ELSE CAST( totalhours.value AS DECIMAL ) END)
|
550
|
-
AS CHAR(512)) as owner,
|
551
|
-
SUM(CASE WHEN EstimatedHours.value = '' OR EstimatedHours.value IS NULL THEN 0
|
552
|
-
ELSE CAST( EstimatedHours.value AS DECIMAL ) END) as Estimated_work,
|
553
|
-
SUM(CASE WHEN totalhours.value = '' OR totalhours.value IS NULL THEN 0
|
554
|
-
ELSE CAST( totalhours.value AS DECIMAL ) END) as Total_work,
|
555
|
-
NULL as billable,
|
556
|
-
NULL as created, NULL as modified, -- ## Dates are formatted
|
557
|
-
|
558
|
-
NULL AS _description_,
|
559
|
-
NULL AS _changetime,
|
560
|
-
NULL AS _reporter
|
561
|
-
,1 as _ord
|
562
|
-
FROM ticket as t
|
563
|
-
JOIN enum as p ON p.name=t.priority AND p.type='priority'
|
564
|
-
|
565
|
-
LEFT JOIN ticket_custom as EstimatedHours ON EstimatedHours.name='estimatedhours'
|
566
|
-
AND EstimatedHours.Ticket = t.Id
|
567
|
-
|
568
|
-
LEFT JOIN ticket_custom as totalhours ON totalhours.name='totalhours'
|
569
|
-
AND totalhours.Ticket = t.Id
|
570
|
-
|
571
|
-
LEFT JOIN ticket_custom as billable ON billable.name='billable'
|
572
|
-
AND billable.Ticket = t.Id
|
573
|
-
|
574
|
-
WHERE t.status IN (#STATUSES#)
|
575
|
-
AND billable.value in ($BILLABLE, $UNBILLABLE)
|
576
|
-
GROUP BY t.milestone
|
577
|
-
) as tbl
|
578
|
-
ORDER BY __milestone__, _ord ASC, ticket
|
579
|
-
"""
|
580
|
-
},
|
581
|
-
#END Ticket Hours Grouped By MileStone
|
582
|
-
{
|
583
|
-
"uuid":"040c9025-7641-4d18-96ad-2b26b4095566",
|
584
|
-
"title":"Ticket Hours Grouped By MileStone with Description",
|
585
|
-
"version":th_version,
|
586
|
-
"sql": """
|
587
|
-
SELECT __color__, __group__, __style__, ticket, summary, component ,version, severity,
|
588
|
-
__milestone__, status, owner, Estimated_work, Total_work, billable,
|
589
|
-
_description_, _ord
|
590
|
-
|
591
|
-
FROM (
|
592
|
-
SELECT p.value AS __color__,
|
593
|
-
t.milestone AS __group__,
|
594
|
-
'' as __style__,
|
595
|
-
t.id AS ticket, summary AS summary, -- ## Break line here
|
596
|
-
component,version, severity, milestone as __milestone__, status, owner,
|
597
|
-
CASE WHEN EstimatedHours.value = '' OR EstimatedHours.value IS NULL THEN 0
|
598
|
-
ELSE CAST( EstimatedHours.value AS DECIMAL ) END as Estimated_work,
|
599
|
-
CASE WHEN totalhours.value = '' OR totalhours.value IS NULL THEN 0
|
600
|
-
ELSE CAST( totalhours.value AS DECIMAL ) END as Total_work,
|
601
|
-
CASE WHEN billable.value = '1' THEN 'Y'
|
602
|
-
else 'N'
|
603
|
-
END as billable,
|
604
|
-
time AS created, changetime AS modified, -- ## Dates are formatted
|
605
|
-
description AS _description_, -- ## Uses a full row
|
606
|
-
changetime AS _changetime,
|
607
|
-
reporter AS _reporter
|
608
|
-
,0 as _ord
|
609
|
-
|
610
|
-
FROM ticket as t
|
611
|
-
JOIN enum as p ON p.name=t.priority AND p.type='priority'
|
612
|
-
|
613
|
-
LEFT JOIN ticket_custom as EstimatedHours ON EstimatedHours.name='estimatedhours'
|
614
|
-
AND EstimatedHours.Ticket = t.Id
|
615
|
-
LEFT JOIN ticket_custom as totalhours ON totalhours.name='totalhours'
|
616
|
-
AND totalhours.Ticket = t.Id
|
617
|
-
LEFT JOIN ticket_custom as billable ON billable.name='billable'
|
618
|
-
AND billable.Ticket = t.Id
|
619
|
-
|
620
|
-
WHERE t.status IN (#STATUSES#)
|
621
|
-
AND billable.value in ($BILLABLE, $UNBILLABLE)
|
622
|
-
|
623
|
-
|
624
|
-
UNION
|
625
|
-
|
626
|
-
SELECT '1' AS __color__,
|
627
|
-
t.milestone AS __group__,
|
628
|
-
'background-color:#DFE;' as __style__,
|
629
|
-
0 as ticket, 'Total work' AS summary,
|
630
|
-
NULL as component,NULL as version, NULL as severity,
|
631
|
-
t.milestone as __milestone__,
|
632
|
-
'Time Remaining: ' as status,
|
633
|
-
CAST(
|
634
|
-
SUM(CASE WHEN EstimatedHours.value = '' OR EstimatedHours.value IS NULL THEN 0
|
635
|
-
ELSE CAST( EstimatedHours.value AS DECIMAL ) END) -
|
636
|
-
SUM(CASE WHEN totalhours.value = '' OR totalhours.value IS NULL THEN 0
|
637
|
-
ELSE CAST( totalhours.value AS DECIMAL ) END)
|
638
|
-
AS CHAR(512)) as owner,
|
639
|
-
SUM(CASE WHEN EstimatedHours.value = '' OR EstimatedHours.value IS NULL THEN 0
|
640
|
-
ELSE CAST( EstimatedHours.value AS DECIMAL ) END) as Estimated_work,
|
641
|
-
SUM(CASE WHEN totalhours.value = '' OR totalhours.value IS NULL THEN 0
|
642
|
-
ELSE CAST( totalhours.value AS DECIMAL ) END) as Total_work,
|
643
|
-
NULL as billable,
|
644
|
-
NULL as created, NULL as modified, -- ## Dates are formatted
|
645
|
-
NULL AS _description_,
|
646
|
-
NULL AS _changetime,
|
647
|
-
NULL AS _reporter, 1 as _ord
|
648
|
-
FROM ticket as t
|
649
|
-
JOIN enum as p ON p.name=t.priority AND p.type='priority'
|
650
|
-
|
651
|
-
LEFT JOIN ticket_custom as EstimatedHours ON EstimatedHours.name='estimatedhours'
|
652
|
-
AND EstimatedHours.Ticket = t.Id
|
653
|
-
|
654
|
-
LEFT JOIN ticket_custom as totalhours ON totalhours.name='totalhours'
|
655
|
-
AND totalhours.Ticket = t.Id
|
656
|
-
|
657
|
-
LEFT JOIN ticket_custom as billable ON billable.name='billable'
|
658
|
-
AND billable.Ticket = t.Id
|
659
|
-
|
660
|
-
WHERE t.status IN (#STATUSES#)
|
661
|
-
AND billable.value in ($BILLABLE, $UNBILLABLE)
|
662
|
-
GROUP BY t.milestone
|
663
|
-
) as tbl
|
664
|
-
ORDER BY __milestone__, _ord ASC, ticket
|
665
|
-
"""
|
666
|
-
}
|
667
|
-
#END Ticket Hours Grouped By MileStone with Description
|
668
|
-
]
|
669
|
-
|
670
|
-
all_reports = [
|
671
|
-
{"title":"Billing Reports",
|
672
|
-
"reports":billing_reports},
|
673
|
-
{"title":"Ticket/Hour Reports",
|
674
|
-
"reports": ticket_hours_reports}
|
675
|
-
]
|