diff --git a/app/dashboard/models.py b/app/dashboard/models.py index d938fdb53ac..239a4f244d2 100644 --- a/app/dashboard/models.py +++ b/app/dashboard/models.py @@ -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 @@ -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): @@ -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) @@ -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] diff --git a/app/retail/templates/emails/quarterly_stats.html b/app/retail/templates/emails/quarterly_stats.html index 14af09d4d57..a35870ed315 100644 --- a/app/retail/templates/emails/quarterly_stats.html +++ b/app/retail/templates/emails/quarterly_stats.html @@ -260,15 +260,17 @@

An overview of your OSS project's stats from the last 3 months.

{% for developer in user_funded_bounty_developers %}{% if forloop.counter == user_num_funded_bounty_developers %} & {% elif forloop.first %}{% else %}, {% endif %}@{{ developer }}{% endfor %}

+ {% if user_total_funded_hours %}

{{ user_total_funded_hours | intcomma }} hours

{{ user_total_funded_usd | intcomma }} USD

-

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..

+

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..

+ {% endif %}
{% trans "Share my stats" %}