@@ -59,7 +59,7 @@ export class Task {
5959
6060 public readonly recurrence : Recurrence | null ;
6161
62- public readonly blockedBy : string [ ] ;
62+ public readonly dependsOn : string [ ] ;
6363 public readonly id : string ;
6464
6565 /** The blockLink is a "^" annotation after the dates/recurrence rules.
@@ -91,7 +91,7 @@ export class Task {
9191 doneDate,
9292 cancelledDate,
9393 recurrence,
94- blockedBy ,
94+ dependsOn ,
9595 id,
9696 blockLink,
9797 tags,
@@ -112,7 +112,7 @@ export class Task {
112112 doneDate : moment . Moment | null ;
113113 cancelledDate : moment . Moment | null ;
114114 recurrence : Recurrence | null ;
115- blockedBy : string [ ] | [ ] ;
115+ dependsOn : string [ ] | [ ] ;
116116 id : string ;
117117 blockLink : string ;
118118 tags : string [ ] | [ ] ;
@@ -139,7 +139,7 @@ export class Task {
139139
140140 this . recurrence = recurrence ;
141141
142- this . blockedBy = blockedBy ;
142+ this . dependsOn = dependsOn ;
143143 this . id = id ;
144144
145145 this . blockLink = blockLink ;
@@ -458,15 +458,15 @@ export class Task {
458458 * @param allTasks - all the tasks in the vault. In custom queries, this is available via query.allTasks.
459459 */
460460 public isBlocked ( allTasks : Readonly < Task [ ] > ) {
461- if ( this . blockedBy . length === 0 ) {
461+ if ( this . dependsOn . length === 0 ) {
462462 return false ;
463463 }
464464
465465 if ( this . isDone ) {
466466 return false ;
467467 }
468468
469- for ( const depId of this . blockedBy ) {
469+ for ( const depId of this . dependsOn ) {
470470 const depTask = allTasks . find ( ( task ) => task . id === depId && ! task . isDone ) ;
471471 if ( ! depTask ) {
472472 // There is no not-done task with this id.
@@ -481,7 +481,7 @@ export class Task {
481481 }
482482
483483 /**
484- * A Task is blocking if there is any other not-done task blockedBy value with its id.
484+ * A Task is blocking if there is any other not-done task dependsOn value with its id.
485485 *
486486 * 'Done' tasks (with status DONE, CANCELLED or NON_TASK) are never blocking.
487487 * Only direct dependencies are considered.
@@ -501,7 +501,7 @@ export class Task {
501501 return false ;
502502 }
503503
504- return task . blockedBy . includes ( this . id ) ;
504+ return task . dependsOn . includes ( this . id ) ;
505505 } ) ;
506506 }
507507
@@ -784,7 +784,7 @@ export class Task {
784784 'blockLink' ,
785785 'scheduledDateIsInferred' ,
786786 'id' ,
787- 'blockedBy ' ,
787+ 'dependsOn ' ,
788788 ] ;
789789 for ( const el of args ) {
790790 if ( this [ el ] ?. toString ( ) !== other [ el ] ?. toString ( ) ) return false ;
@@ -861,15 +861,15 @@ export class Task {
861861 * @param allTasks
862862 */
863863export function isBlocked ( thisTask : Task , allTasks : Task [ ] ) {
864- if ( thisTask . blockedBy . length === 0 ) {
864+ if ( thisTask . dependsOn . length === 0 ) {
865865 return false ;
866866 }
867867
868868 if ( thisTask . isDone ) {
869869 return false ;
870870 }
871871
872- for ( const depId of thisTask . blockedBy ) {
872+ for ( const depId of thisTask . dependsOn ) {
873873 const depTask = allTasks . find ( ( task ) => task . id === depId && ! task . isDone ) ;
874874 if ( ! depTask ) {
875875 // There is no not-done task with this id.
0 commit comments