Optional customParentSynonyms: string[]Discovers the parent field info (key and name) for a given project and issue type.
Similar to getParentFieldKey but returns both the field key and human-readable name, enabling dynamic parent field synonym matching based on actual JIRA configuration.
For Sub-tasks, returns the standard JIRA "parent" field. For other issue types, searches for JPO hierarchy custom fields (type "any") that match common parent field patterns.
The JIRA project key (e.g., "PROJ", "ENG")
The issue type name (e.g., "SuperEpic", "Epic", "Story", "Sub-task")
The parent field info with key and name, or null if not found
const discovery = new ParentFieldDiscovery(schemaDiscovery, cache);
const fieldInfo = await discovery.getParentFieldInfo('PROJ', 'Story');
console.log(fieldInfo); // { key: "customfield_10014", name: "Parent Link" }
const subtaskFieldInfo = await discovery.getParentFieldInfo('PROJ', 'Sub-task');
console.log(subtaskFieldInfo); // { key: "parent", name: "parent" }
Discovers the parent field key for a given project and issue type.
For Sub-tasks, returns the standard JIRA "parent" field. For other issue types, searches for JPO hierarchy custom fields (type "any") that match common parent field patterns like "Parent", "Epic Link", "Parent Link". Results are cached for 1 hour to minimize API calls.
Different hierarchy levels can have different parent fields, so this method must be called with the specific issue type to get the correct parent field.
The JIRA project key (e.g., "PROJ", "ENG")
The issue type name (e.g., "SuperEpic", "Epic", "Story", "Sub-task")
The parent field key (e.g., "customfield_10014" for JPO, "parent" for Sub-tasks) or null if not found
const discovery = new ParentFieldDiscovery(schemaDiscovery, cache);
const fieldKey = await discovery.getParentFieldKey('PROJ', 'SuperEpic');
console.log(fieldKey); // "customfield_10014" (JPO Parent Link for SuperEpic)
const subtaskFieldKey = await discovery.getParentFieldKey('PROJ', 'Sub-task');
console.log(subtaskFieldKey); // "parent" (standard JIRA parent field for Sub-tasks)
Discovers and caches the parent field key for a project.
Parent fields are custom fields (type "any") whose display names typically include "Parent" or "Epic Link". We apply heuristics to select the most appropriate field and cache the result for subsequent lookups.