(item *TaskRecord)
| 3111 | } |
| 3112 | |
| 3113 | func taskBundle(item *TaskRecord) outputBundle { |
| 3114 | return outputBundle{ |
| 3115 | jsonValue: *item, |
| 3116 | human: func() (string, error) { |
| 3117 | return renderHumanSection(taskTaskValue, []keyValue{ |
| 3118 | {Label: "ID", Value: stringOrDash(item.ID)}, |
| 3119 | {Label: taskIdentifierValue, Value: stringOrDash(item.Identifier)}, |
| 3120 | {Label: taskScopeValue, Value: stringOrDash(string(item.Scope))}, |
| 3121 | {Label: taskWorkspaceValue, Value: stringOrDash(item.WorkspaceID)}, |
| 3122 | {Label: taskParentValue, Value: stringOrDash(item.ParentTaskID)}, |
| 3123 | {Label: taskTitleValue, Value: stringOrDash(item.Title)}, |
| 3124 | {Label: taskDescriptionValue, Value: stringOrDash(item.Description)}, |
| 3125 | {Label: taskStatusValue, Value: stringOrDash(string(item.Status))}, |
| 3126 | {Label: "Paused", Value: strconv.FormatBool(item.Paused)}, |
| 3127 | {Label: "Paused By", Value: stringOrDash(item.PausedBy)}, |
| 3128 | {Label: taskReasonValue, Value: stringOrDash(item.PausedReason)}, |
| 3129 | {Label: taskOwnerValue, Value: stringOrDash(formatTaskOwnership(item.Owner))}, |
| 3130 | {Label: taskCreatedByValue, Value: stringOrDash(formatTaskActor(item.CreatedBy))}, |
| 3131 | {Label: taskOriginValue, Value: stringOrDash(formatTaskOrigin(item.Origin))}, |
| 3132 | {Label: taskChannelValue, Value: stringOrDash(item.NetworkChannel)}, |
| 3133 | {Label: taskCreatedValue, Value: stringOrDash(formatTime(item.CreatedAt))}, |
| 3134 | {Label: taskUpdatedValue, Value: stringOrDash(formatTime(item.UpdatedAt))}, |
| 3135 | {Label: "Closed", Value: stringOrDash(formatTimePtr(item.ClosedAt))}, |
| 3136 | {Label: "Metadata", Value: stringOrDash(compactJSON(item.Metadata))}, |
| 3137 | }), nil |
| 3138 | }, |
| 3139 | toon: func() (string, error) { |
| 3140 | return renderToonObject(taskTaskKey, []string{ |
| 3141 | "id", |
| 3142 | taskIdentifierKey, |
| 3143 | taskScopeKey, |
| 3144 | taskWorkspaceIDKey, |
| 3145 | "parent_task_id", |
| 3146 | taskTitleKey, |
| 3147 | taskDescriptionKey, |
| 3148 | taskStatusKey, |
| 3149 | "paused", |
| 3150 | "paused_by", |
| 3151 | "paused_reason", |
| 3152 | taskOwnerKey, |
| 3153 | createdByKey, |
| 3154 | taskOriginKey, |
| 3155 | taskNetworkChannelKey, |
| 3156 | taskCreatedAtKey, |
| 3157 | taskUpdatedAtKey, |
| 3158 | "closed_at", |
| 3159 | "metadata", |
| 3160 | }, []string{ |
| 3161 | item.ID, |
| 3162 | item.Identifier, |
| 3163 | string(item.Scope), |
| 3164 | item.WorkspaceID, |
| 3165 | item.ParentTaskID, |
| 3166 | item.Title, |
| 3167 | item.Description, |
| 3168 | string(item.Status), |
| 3169 | strconv.FormatBool(item.Paused), |
| 3170 | item.PausedBy, |
no test coverage detected