MCPcopy Create free account
hub / github.com/callumalpass/tasknotes / getMappedPropertyLabel

Function getMappedPropertyLabel

src/ui/taskCardHelpers.ts:44–64  ·  view source on GitHub ↗
(
	propertyId: string,
	plugin: TaskNotesPlugin,
	propertyLabels?: Record<string, string>
)

Source from the content-addressed store, hash-verified

42}
43
44function getMappedPropertyLabel(
45 propertyId: string,
46 plugin: TaskNotesPlugin,
47 propertyLabels?: Record<string, string>
48): string | undefined {
49 if (!propertyLabels) {
50 return undefined;
51 }
52
53 for (const [candidatePropertyId, label] of Object.entries(propertyLabels)) {
54 if (candidatePropertyId === propertyId || label.trim() === "") {
55 continue;
56 }
57
58 if (plugin.fieldMapper?.lookupMappingKey?.(candidatePropertyId) === propertyId) {
59 return label;
60 }
61 }
62
63 return undefined;
64}
65
66export function getRecurrenceTooltip(
67 plugin: TaskNotesPlugin,

Callers 1

getTaskCardPropertyLabelFunction · 0.85

Calls 1

lookupMappingKeyMethod · 0.80

Tested by

no test coverage detected