1111from ietf .utils .mail import send_mail , send_mail_text
1212from ietf .idtracker .models import *
1313from ietf .ipr .search import iprs_from_docs
14- from doc .models import WriteupDocEvent , BallotPositionDocEvent , LastCallDocEvent
15- from person .models import Person
14+ from redesign . doc .models import WriteupDocEvent , BallotPositionDocEvent , LastCallDocEvent , DocAlias
15+ from redesign . person .models import Person
1616
1717def email_state_changed (request , doc , text ):
1818 to = [x .strip () for x in doc .idinternal .state_change_notice_to .replace (';' , ',' ).split (',' )]
@@ -157,9 +157,8 @@ def generate_last_call_announcementREDESIGN(request, doc):
157157 cc .append (doc .group .list_email )
158158
159159 doc .filled_title = textwrap .fill (doc .title , width = 70 , subsequent_indent = " " * 3 )
160- url = settings .IDTRACKER_BASE_URL + doc .get_absolute_url ()
161160
162- iprs , docs = iprs_from_docs ([ doc ])
161+ iprs , _ = iprs_from_docs ([ DocAlias . objects . get ( name = doc . canonical_name ()) ])
163162 if iprs :
164163 ipr_links = [ urlreverse ("ietf.ipr.views.show" , kwargs = dict (ipr_id = i .ipr_id )) for i in iprs ]
165164 ipr_links = [ settings .IDTRACKER_BASE_URL + url if not url .startswith ("http" ) else url for url in ipr_links ]
@@ -168,18 +167,18 @@ def generate_last_call_announcementREDESIGN(request, doc):
168167
169168 mail = render_to_string ("idrfc/last_call_announcement.txt" ,
170169 dict (doc = doc ,
171- doc_url = settings .IDTRACKER_BASE_URL + doc .get_absolute_url (),
170+ doc_url = settings .IDTRACKER_BASE_URL + doc .get_absolute_url () + "ballot/" ,
172171 expiration_date = expiration_date .strftime ("%Y-%m-%d" ), #.strftime("%B %-d, %Y"),
173172 cc = ", " .join ("<%s>" % e for e in cc ),
174173 group = group ,
175- docs = docs ,
176- urls = [url ],
174+ docs = [ doc ] ,
175+ urls = [ settings . IDTRACKER_BASE_URL + doc . get_absolute_url () ],
177176 status = status ,
178177 impl_report = "Draft" in status or "Full" in status ,
179178 ipr_links = ipr_links ,
180179 )
181180 )
182-
181+
183182 e = WriteupDocEvent ()
184183 e .type = "changed_last_call_text"
185184 e .by = request .user .get_profile ()
0 commit comments