@@ -208,6 +208,19 @@ def get_doc_sectionREDESIGN(id):
208208 s = s + "1"
209209 return s
210210
211+ def get_wg_section (wg ):
212+ if wg .state_id == "proposed" :
213+ if wg .charter .charter_state_id == "intrev" :
214+ s = '411'
215+ elif wg .charter .charter_state_id == "iesgrev" :
216+ s = '412'
217+ elif wg .state_id == "active" :
218+ if wg .charter .charter_state_id == "intrev" :
219+ s = '421'
220+ elif wg .charter .charter_state_id == "iesgrev" :
221+ s = '422'
222+ return s
223+
211224if settings .USE_DB_REDESIGN_PROXY_CLASSES :
212225 get_doc_section = get_doc_sectionREDESIGN
213226
@@ -253,15 +266,17 @@ def agenda_docs(date, next_agenda):
253266 return res
254267
255268def agenda_wg_actions (date ):
256- mapping = {12 :'411' , 13 :'412' ,22 :'421' ,23 :'422' }
257- matches = WGAction .objects .filter (agenda = 1 ,telechat_date = date ,category__in = mapping .keys ()).order_by ('category' )
258- res = {}
259- for o in matches :
260- section_key = "s" + mapping [o .category ]
269+ from doc .models import TelechatDocEvent
270+ from group .models import Group
271+
272+ matches = Group .objects .filter (charter__docevent__telechatdocevent__telechat_date = date )
273+
274+ res = dict (("s%s%s%s" % (i , j , k ), []) for i in range (2 , 5 ) for j in range (1 , 4 ) for k in range (1 , 4 ))
275+ for wg in list (matches ):
276+ section_key = "s" + get_wg_section (wg )
261277 if section_key not in res :
262278 res [section_key ] = []
263- area = AreaGroup .objects .get (group = o .group_acronym )
264- res [section_key ].append ({'obj' :o , 'area' :str (area .area )})
279+ res [section_key ].append ({'obj' :wg })
265280 return res
266281
267282def agenda_management_issues (date ):
0 commit comments