Skip to content

Commit 8ff8056

Browse files
committed
Merged [7383] from jmh@joelhalpern.com: fixes ticket ietf-tools#924
Changes counting logic in ballots to use actual number of ADs. Causes ballot email to use utility to generate requirements text - Legacy-Id: 7404 Note: SVN reference [7383] has been migrated to Git commit 271c48c
1 parent 6235fa7 commit 8ff8056

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

ietf/doc/mails.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from ietf.doc.models import WriteupDocEvent, BallotPositionDocEvent, LastCallDocEvent, DocAlias, ConsensusDocEvent, DocTagName
1313
from ietf.person.models import Person
1414
from ietf.group.models import Group, Role
15+
from ietf.doc.utils import needed_ballot_positions
1516

1617
def email_state_changed(request, doc, text):
1718
to = [x.strip() for x in doc.notify.replace(';', ',').split(',')]
@@ -373,6 +374,7 @@ def formatted(val):
373374
last_call_expires=last_call_expires,
374375
approval_text=approval_text,
375376
ballot_writeup=ballot_writeup,
377+
approvalneeds=needed_ballot_positions(doc, positions),
376378
)
377379
)
378380

ietf/doc/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ def needed_ballot_positions(doc, active_positions):
7979
if doc.type_id == "draft" and doc.intended_std_level_id in ("bcp", "ps", "ds", "std"):
8080
# For standards-track, need positions from 2/3 of the
8181
# non-recused current IESG.
82-
needed = int(math.ceil((len(active_positions) - len(recuse)) * 2.0/3.0))
82+
active = len(Person.objects.filter(role__name="ad",
83+
role__group__state="active").distinct())
84+
needed = int(math.ceil((active - len(recuse)) * 2.0/3.0))
8385
else:
8486
if len(yes) < 1:
8587
return " ".join(answer)

ietf/templates/doc/mail/issue_ballot_mail.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ Subject: Evaluation: {{ doc.file_tag }} to {{ doc|std_level_prompt }}
1717
{% for fmt in inactive_ad_positions %}{{ fmt }}
1818
{% endfor %}{% endif %}
1919

20-
"Yes" or "No-Objection" positions from 2/3 of non-recused ADs,
21-
with no "Discuss" positions, are needed for approval.
20+
{{ approvalneeds }}
2221

2322
DISCUSSES AND COMMENTS
2423
======================

0 commit comments

Comments
 (0)