diff --git a/app/dashboard/models.py b/app/dashboard/models.py index 87c1866eeb7..d938fdb53ac 100644 --- a/app/dashboard/models.py +++ b/app/dashboard/models.py @@ -1166,6 +1166,7 @@ def get_quarterly_stats(self): for bounty in funded_bounties ]) total_funded_hourly_rate = float(0) + #TODO: Explain to the user that we only counted Bounties that developers entered # of hours worked on hourly_rate_bounties_counted = float(0) for bounty in funded_bounties: hourly_rate = bounty.hourly_rate @@ -1174,6 +1175,7 @@ def get_quarterly_stats(self): hourly_rate_bounties_counted += 1 funded_bounty_fulfillments = [] for bounty in funded_bounties: + #TODO: Check that all bounty fulfillments have acceptance and that there are no bounties that have skipped the Acceptance in fulfillment step of workflow fulfillments = bounty.fulfillments.filter(accepted=True) for fulfillment in fulfillments: if isinstance(fulfillment, BountyFulfillment): @@ -1200,11 +1202,12 @@ def get_quarterly_stats(self): avg_hourly_rate_per_funded_bounty = 0 avg_hours_per_funded_bounty = 0 funded_fulfilled_bounties = [ + #TODO: Change this to check for terminal statuses instead? bounty for bounty in funded_bounties if bounty.status == 'done' ] num_funded_fulfilled_bounties = len(funded_fulfilled_bounties) funded_fulfilled_percent = float( - # Roudn to 0 places of decimals to be displayed in template + # Round to 0 places of decimals to be displayed in template round(num_funded_fulfilled_bounties * 1.0 / funded_bounties_count, 2) * 100 ) user_funded_bounties = True @@ -1263,7 +1266,8 @@ def get_quarterly_stats(self): current_bounty=True, metadata__icontains=keyword, idx_status__in=['open'], - ).order_by('?') + #TODO: Identify the random sampling method used, see if it sending mass emails becomes slow + ).order_by('?') ) relevant_bounties = relevant_bounties[:3] relevant_bounties = list(relevant_bounties)