Skip to content

Commit

Permalink
Added TODOs for further questions as requested by @owocki
Browse files Browse the repository at this point in the history
  • Loading branch information
oogetyboogety committed Jun 5, 2018
1 parent 9a15407 commit 8e281a0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/dashboard/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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):
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 8e281a0

Please sign in to comment.