Skip to content

Commit

Permalink
resolving todos
Browse files Browse the repository at this point in the history
  • Loading branch information
owocki committed Jun 13, 2018
1 parent 8e281a0 commit 509f82f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 0 additions & 4 deletions app/dashboard/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,6 @@ 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 @@ -1175,7 +1174,6 @@ 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 @@ -1202,7 +1200,6 @@ 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)
Expand Down Expand Up @@ -1266,7 +1263,6 @@ def get_quarterly_stats(self):
current_bounty=True,
metadata__icontains=keyword,
idx_status__in=['open'],
#TODO: Identify the random sampling method used, see if it sending mass emails becomes slow
).order_by('?')
)
relevant_bounties = relevant_bounties[:3]
Expand Down
4 changes: 3 additions & 1 deletion app/retail/templates/emails/quarterly_stats.html
Original file line number Diff line number Diff line change
Expand Up @@ -260,15 +260,17 @@ <h4>An overview of your OSS project's stats from the last 3 months.</h4>
{% for developer in user_funded_bounty_developers %}{% if forloop.counter == user_num_funded_bounty_developers %} &amp; {% elif forloop.first %}{% else %}, {% endif %}<a href="https://github.com/{{ developer }}">@{{ developer }}</a>{% endfor %}</p>
</div>
</div>
{% if user_total_funded_hours %}
<div class="centered-contents stat-box row">
<div class="stat-img">
<p class="content bounty-img">{{ user_total_funded_hours | intcomma }} hours</p>
<p class="content bounty-fund-img">{{ user_total_funded_usd | intcomma }} USD</p>
</div>
<div class="stat-contents">
<p>Developers worked an average of {{ user_avg_hours_per_funded_bounty }} hours per issue on your projects. You funded a total of ${{ user_total_funded_usd | intcomma }} USD of work at an average rate of ${{ user_avg_hourly_rate_per_funded_bounty }} USD / hour..</p>
<p>Developers worked an average of {{ user_avg_hours_per_funded_bounty }} hours per issue on your projects (only applies to bounties where users entered their hours). You funded a total of ${{ user_total_funded_usd | intcomma }} USD of work at an average rate of ${{ user_avg_hourly_rate_per_funded_bounty }} USD / hour..</p>
</div>
</div>
{% endif %}

<div class="button-action">
<a class="button" href="{% url 'dashboard' %}">{% trans "Share my stats" %}</a>
Expand Down

0 comments on commit 509f82f

Please sign in to comment.