MCPcopy
hub / github.com/callumalpass/tasknotes / resolveTaskCardPropertyLabel

Function resolveTaskCardPropertyLabel

src/ui/taskCardPresentation.ts:144–160  ·  view source on GitHub ↗
(
	propertyId: string,
	options: TaskCardPresentationOptions = {},
	fallbackLabel?: string
)

Source from the content-addressed store, hash-verified

142}
143
144export function resolveTaskCardPropertyLabel(
145 propertyId: string,
146 options: TaskCardPresentationOptions = {},
147 fallbackLabel?: string
148): string {
149 const override = options.propertyLabels?.[propertyId];
150 if (override && override.trim() !== "") {
151 return override;
152 }
153 if (fallbackLabel && fallbackLabel.trim() !== "") {
154 return fallbackLabel;
155 }
156 if (propertyId.startsWith("formula.")) {
157 return propertyId.substring(8);
158 }
159 return propertyId.charAt(0).toUpperCase() + propertyId.slice(1);
160}

Calls

no outgoing calls

Tested by

no test coverage detected