r82958 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82957‎ | r82958 | r82959 >
Date:20:54, 28 February 2011
Author:rfaulk
Status:deferred
Tags:
Comment:
modified query store to utilize new major gift related queries.
Modified paths:
  • /trunk/fundraiser-statistics/fundraiser-scripts/query_store.py (modified) (history)

Diff [purge]

Index: trunk/fundraiser-statistics/fundraiser-scripts/query_store.py
@@ -111,6 +111,23 @@
112112 campaign = args[3]
113113 sql_stmnt = sql_stmnt % (start, end, campaign, lp, start, end, campaign, lp)
114114
 115+ elif query_name == 'report_bannerLP_confidence':
 116+ start = args[0]
 117+ end = args[1]
 118+ banner = args[2]
 119+ lp = args[3]
 120+ campaign = args[4]
 121+ sql_stmnt = sql_stmnt % (start, end, banner, start, end, banner, campaign, start, end, banner, lp, campaign, start, end, banner, lp, campaign)
 122+
 123+ elif query_name == 'report_ecomm_by_amount':
 124+ start_time = args[0]
 125+ end_time = args[1]
 126+ sql_stmnt = sql_stmnt % ('%', '%', '%', '%', start_time, end_time)
 127+
 128+ elif query_name == 'report_ecomm_by_contact':
 129+ where_str = args[0]
 130+ sql_stmnt = sql_stmnt % ('%', '%', '%', '%', where_str)
 131+
115132 else:
116133 return 'no such table\n'
117134
@@ -127,8 +144,10 @@
128145 def get_query_header(self, query_name):
129146 if query_name == 'report_contribution_tracking':
130147 return ['Time','Banner','Landing Page','Campaign','Converted Amount', 'Suffix']
131 - elif query_name == '':
132 - return ''
 148+ elif query_name == 'report_ecomm_by_amount':
 149+ return ['Timestamp','First Name','Last Name','Country','ISO Code', 'Amount']
 150+ elif query_name == 'report_ecomm_by_contact':
 151+ return ['Timestamp','First Name','Last Name','Country','ISO Code', 'Amount']
133152 else:
134153 return 'no such table'
135154
@@ -256,6 +275,10 @@
257276 return 9
258277 elif metric_name == 'amt_per_imp':
259278 return 10
 279+ elif metric_name == 'amt50_per_imp':
 280+ return 14
 281+ elif metric_name == 'amt100_per_imp':
 282+ return 15
260283 else:
261284 return -1
262285 elif query_name == 'report_LP_confidence':
@@ -267,8 +290,33 @@
268291 return 7
269292 elif metric_name == 'amt_per_donation':
270293 return 8
 294+ elif metric_name == 'amt50_per_view':
 295+ return 9
 296+ elif metric_name == 'amt100_per_view':
 297+ return 10
271298 else:
272299 return -1
 300+ elif query_name == 'report_bannerLP_confidence':
 301+ if metric_name == 'click_rate':
 302+ return 7
 303+ elif metric_name == 'completion_rate':
 304+ return 8
 305+ elif metric_name == 'don_per_imp':
 306+ return 9
 307+ elif metric_name == 'amt_per_imp':
 308+ return 10
 309+ elif metric_name == 'don_per_view':
 310+ return 11
 311+ elif metric_name == 'amt_per_view':
 312+ return 12
 313+ elif metric_name == 'amt_per_donation':
 314+ return 13
 315+ elif metric_name == 'amt50_per_imp':
 316+ return 14
 317+ elif metric_name == 'amt100_per_imp':
 318+ return 15
 319+ else:
 320+ return -1
273321 else:
274322 return 'no such table'
275323

Status & tagging log