File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -112,9 +112,12 @@ export class ProjectSubtasksService {
112112 if ( ! ( sourceFile instanceof TFile ) ) return false ;
113113
114114 const metadata = this . plugin . app . metadataCache . getFileCache ( sourceFile ) ;
115- if ( ! metadata ?. frontmatter ?. projects ) return false ;
116115
117- const projects = metadata . frontmatter . projects ;
116+ // Use the user's configured field mapping for projects
117+ const projectsFieldName = this . plugin . fieldMapper . toUserField ( 'projects' ) ;
118+ if ( ! metadata ?. frontmatter ?. [ projectsFieldName ] ) return false ;
119+
120+ const projects = metadata . frontmatter [ projectsFieldName ] ;
118121 if ( ! Array . isArray ( projects ) ) return false ;
119122
120123 // Check if any project reference resolves to our target
@@ -172,7 +175,10 @@ export class ProjectSubtasksService {
172175
173176 // Check if source has projects frontmatter
174177 const metadata = this . plugin . app . metadataCache . getCache ( sourcePath ) ;
175- const projects = metadata ?. frontmatter ?. projects ;
178+
179+ // Use the user's configured field mapping for projects
180+ const projectsFieldName = this . plugin . fieldMapper . toUserField ( 'projects' ) ;
181+ const projects = metadata ?. frontmatter ?. [ projectsFieldName ] ;
176182
177183 if ( Array . isArray ( projects ) && projects . some ( ( p : any ) =>
178184 typeof p === 'string' && p . startsWith ( '[[' ) && p . endsWith ( ']]' )
Original file line number Diff line number Diff line change @@ -619,7 +619,8 @@ export class MinimalNativeCache extends Events {
619619 if ( ! metadata ?. frontmatter || ! this . isTaskFile ( metadata . frontmatter ) ) continue ;
620620
621621 // Check if this task has projects field with wikilinks
622- const projectsField = metadata . frontmatter . projects ;
622+ const projectsFieldName = this . fieldMapper ?. toUserField ( 'projects' ) || 'projects' ;
623+ const projectsField = metadata . frontmatter [ projectsFieldName ] ;
623624 if ( ! Array . isArray ( projectsField ) ) continue ;
624625
625626 // Check if projects field contains wikilinks (not just plain text)
You can’t perform that action at this time.
0 commit comments