@dyno181cm.nexsoft/zentao_mcp 1.4.2 → 1.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -49,7 +49,7 @@ export async function renderHistoryAndComments(actions, client, downloadedImages
|
|
|
49
49
|
}
|
|
50
50
|
// 3. Format files if present in action
|
|
51
51
|
let filesStr = "";
|
|
52
|
-
if (act.files
|
|
52
|
+
if (act.files) {
|
|
53
53
|
const parsedFiles = parseFiles(act.files);
|
|
54
54
|
if (parsedFiles.length > 0) {
|
|
55
55
|
const fileLinks = [];
|
|
@@ -29,9 +29,13 @@ export function registerStatusTools(server, client) {
|
|
|
29
29
|
if (action === "finish") {
|
|
30
30
|
// Fetch task details to get realStarted / estStarted if not provided (Zentao requires them)
|
|
31
31
|
const task = await client.getTaskDetails(taskId);
|
|
32
|
-
|
|
32
|
+
let taskRealStarted = task.realStarted || task.estStarted || "";
|
|
33
|
+
if (taskRealStarted.includes("T")) {
|
|
34
|
+
taskRealStarted = taskRealStarted.split("T")[0];
|
|
35
|
+
}
|
|
36
|
+
payload.realStarted = realStarted || taskRealStarted || new Date().toISOString().split("T")[0];
|
|
33
37
|
payload.finishedDate = finishedDate || new Date().toISOString().split("T")[0];
|
|
34
|
-
payload.
|
|
38
|
+
payload.currentConsumed = consumed !== undefined ? consumed : (task.consumed || task.estimate || 1);
|
|
35
39
|
if (assignedTo)
|
|
36
40
|
payload.assignedTo = assignedTo;
|
|
37
41
|
}
|