File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -348,8 +348,15 @@ fn extract_plan_item(
348
348
}
349
349
350
350
impl PlanItem {
351
- fn teams ( & self ) -> anyhow:: Result < Vec < & ' static TeamName > > {
352
- if !self . owners . contains ( "![Team]" ) {
351
+ /// If true, this item is something being asked of a team.
352
+ /// If false, it's something the goal owner(s) are proposing to do.
353
+ fn is_team_ask ( & self ) -> bool {
354
+ self . owners . contains ( "![Team]" )
355
+ }
356
+
357
+ /// Return the set of teams being asked to do things by this item, or empty vector if this is not a team ask.
358
+ fn teams_being_asked ( & self ) -> anyhow:: Result < Vec < & ' static TeamName > > {
359
+ if !self . is_team_ask ( ) {
353
360
return Ok ( vec ! [ ] ) ;
354
361
}
355
362
@@ -373,7 +380,8 @@ impl PlanItem {
373
380
Ok ( teams)
374
381
}
375
382
376
- /// Return a vector of all the team-asks from this item and its children
383
+ /// Return a vector of all the team-asks from this item and its children.
384
+ /// Invoked during `GoalDocument`.
377
385
///
378
386
/// # Parameters
379
387
///
@@ -388,7 +396,7 @@ impl PlanItem {
388
396
) -> anyhow:: Result < Vec < TeamAsk > > {
389
397
let mut asks = vec ! [ ] ;
390
398
391
- let teams = self . teams ( ) ?;
399
+ let teams = self . teams_being_asked ( ) ?;
392
400
if !teams. is_empty ( ) {
393
401
asks. push ( TeamAsk {
394
402
link_path : link_path. clone ( ) ,
You can’t perform that action at this time.
0 commit comments