MCPcopy Index your code
hub / github.com/simstudioai/sim / transformWorklog

Function transformWorklog

apps/sim/tools/jira/get_worklogs.ts:9–22  ·  view source on GitHub ↗

* Transforms a raw Jira worklog object into typed output.

(worklog: any)

Source from the content-addressed store, hash-verified

7 * Transforms a raw Jira worklog object into typed output.
8 */
9function transformWorklog(worklog: any) {
10 return {
11 id: worklog.id ?? '',
12 author: transformUser(worklog.author) ?? { accountId: '', displayName: '' },
13 authorName: worklog.author?.displayName ?? worklog.author?.accountId ?? 'Unknown',
14 updateAuthor: transformUser(worklog.updateAuthor),
15 comment: worklog.comment ? (extractAdfText(worklog.comment) ?? null) : null,
16 started: worklog.started ?? '',
17 timeSpent: worklog.timeSpent ?? '',
18 timeSpentSeconds: worklog.timeSpentSeconds ?? 0,
19 created: worklog.created ?? '',
20 updated: worklog.updated ?? '',
21 }
22}
23
24export const jiraGetWorklogsTool: ToolConfig<JiraGetWorklogsParams, JiraGetWorklogsResponse> = {
25 id: 'jira_get_worklogs',

Callers

nothing calls this directly

Calls 2

transformUserFunction · 0.90
extractAdfTextFunction · 0.90

Tested by

no test coverage detected