Merged from source:sprint/77/fenner@2125: Output a summary of what's needed for the document to be approved in the main and ballot views.
- Legacy-Id: 2136
This commit is contained in:
parent
76aad4f419
commit
86f713fc97
|
@ -1,4 +1,4 @@
|
|||
ietfdb (2.46)
|
||||
ietfdb (2.47)
|
||||
|
||||
From Suresh:
|
||||
|
||||
|
@ -10,6 +10,11 @@ ietfdb (2.46)
|
|||
|
||||
* Added a link to the comment feed next to the nits link
|
||||
|
||||
From Bill:
|
||||
|
||||
* Output a summary of what's needed for the document to be approved in
|
||||
the main and ballot views.
|
||||
|
||||
-- Henrik Levkowetz <henrik@levkowetz.com> 21 Mar 2010 00:36:05 +0100
|
||||
|
||||
ietfdb (2.46)
|
||||
|
|
|
@ -373,6 +373,12 @@ class IetfProcessData:
|
|||
self._ballot = BallotWrapper(self._idinternal)
|
||||
return self._ballot
|
||||
|
||||
# don't call this unless has_[active_]iesg_ballot returns True
|
||||
def iesg_ballot_needed( self ):
|
||||
standardsTrack = 'Standard' in self.intended_maturity_level() or \
|
||||
self.intended_maturity_level() == "BCP"
|
||||
return self.iesg_ballot().ballot.needed( standardsTrack )
|
||||
|
||||
def ad_name(self):
|
||||
name = self._idinternal.token_name
|
||||
# Some old documents have token name as "Surname, Firstname";
|
||||
|
|
|
@ -485,6 +485,47 @@ class BallotInfo(models.Model): # Added by Michael Lee
|
|||
for ad in active_iesg:
|
||||
ret.append({'ad': ad, 'pos': positions.get(ad.id, None)})
|
||||
return ret
|
||||
def needed(self, standardsTrack=True):
|
||||
'''Returns text answering the question "what does this document
|
||||
need to pass?". The return value is only useful if the document
|
||||
is currently in IESG evaluation.'''
|
||||
active_iesg = IESGLogin.active_iesg()
|
||||
ads = [ad.id for ad in active_iesg]
|
||||
yes = 0
|
||||
noobj = 0
|
||||
discuss = 0
|
||||
recuse = 0
|
||||
for position in self.positions.filter(ad__in=ads):
|
||||
yes += 1 if position.yes > 0 else 0
|
||||
noobj += 1 if position.noobj > 0 else 0
|
||||
discuss += 1 if position.discuss > 0 else 0
|
||||
recuse += 1 if position.recuse > 0 else 0
|
||||
answer = ''
|
||||
if yes < 1:
|
||||
answer += "Needs a YES. "
|
||||
if discuss > 0:
|
||||
if discuss == 1:
|
||||
answer += "Has a DISCUSS. "
|
||||
else:
|
||||
answer += "Has %d DISCUSSes. " % discuss
|
||||
if standardsTrack:
|
||||
# For standards-track, need positions from 2/3 of the
|
||||
# non-recused current IESG.
|
||||
needed = ( active_iesg.count() - recuse ) * 2 / 3
|
||||
else:
|
||||
# Info and experimental only need one position.
|
||||
needed = 1
|
||||
have = yes + noobj + discuss
|
||||
if have < needed:
|
||||
answer += "Needs %d more positions. " % (needed - have)
|
||||
else:
|
||||
answer += "Has enough positions to pass"
|
||||
if discuss:
|
||||
answer += " once DISCUSSes are resolved"
|
||||
answer += ". "
|
||||
|
||||
return answer.rstrip()
|
||||
|
||||
class Meta:
|
||||
db_table = 'ballot_info'
|
||||
|
||||
|
|
|
@ -65,6 +65,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
<td class="right">
|
||||
|
||||
<h2 style="margin-top:12px;">Discusses and other comments</h2>
|
||||
{% if doc.in_ietf_process and doc.ietf_process.has_active_iesg_ballot %}
|
||||
<p>Summary: <i>{{ doc.ietf_process.iesg_ballot_needed }}</i></p>
|
||||
{% endif %}
|
||||
|
||||
{% for pos in ballot.get_texts %}
|
||||
<h2 class="ballot_ad">{{pos.ad_name|escape}}</h2>
|
||||
|
|
|
@ -46,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
<tr><td>State:</td><td>
|
||||
{{ doc.friendly_state|safe }}
|
||||
{% if doc.rfc_editor_state %}<br />RFC Editor State: <a href="http://www.rfc-editor.org/queue2.html#{{doc.draft_name}}">{{ doc.rfc_editor_state|escape }}</a>{% endif %}
|
||||
{% if doc.in_ietf_process %}{% if doc.ietf_process.telechat_date %}<br/>On agenda of {{ doc.ietf_process.telechat_date }} IESG telechat {% if doc.ietf_process.telechat_returning_item %} (returning item){%endif%}{%endif%}{%endif%}
|
||||
{% if doc.in_ietf_process %}{% if doc.ietf_process.telechat_date %}<br/>On agenda of {{ doc.ietf_process.telechat_date }} IESG telechat {% if doc.ietf_process.telechat_returning_item %} (returning item){%endif%}{%endif%}{% if doc.ietf_process.has_active_iesg_ballot %}<br/><i>({{ doc.ietf_process.iesg_ballot_needed }})</i>{%endif%}{%endif%}
|
||||
</td></tr>
|
||||
<tr><td>Intended status:</td><td>{% if doc.in_ietf_process %}{{ doc.ietf_process.intended_maturity_level|default:"-" }}{% else %}-{%endif%}</td></tr>
|
||||
<tr><td>Responsible AD:</td><td>{% if doc.in_ietf_process %}{{ doc.ietf_process.ad_name|default:"-"|escape }}{%else%}-{%endif%}</td></tr>
|
||||
|
|
Loading…
Reference in a new issue