d4x1 opened a new pull request, #5691:
URL: https://github.com/apache/incubator-devlake/pull/5691

   
   
   ### ⚠️ Pre Checklist
   
   > Please complete _ALL_ items in this checklist, and remove before submitting
   
   - [x] I have read through the [Contributing 
Documentation](https://devlake.apache.org/community/).
   - [x] I have added relevant tests.
   - [x] I have added relevant documentation.
   - [x] I will add labels to the PR, such as `pr-type/bug-fix`, 
`pr-type/feature-development`, etc.
   
   <!--
   Thanks for submitting a pull request!
   
   We appreciate you spending the time to work on these changes.
   Please fill out as many sections below as possible.
   -->
   
   ### Summary
   What does this PR do?
   Add blueprint and latest ran pipeline information for project list api
   
   ### Does this close any open issues?
   Closes #4654 
   
   ### Screenshots
   Include any relevant screenshots here.
   
![image](https://github.com/apache/incubator-devlake/assets/5844806/d1cabf85-c884-474b-a8b2-f8198ec9a2d6)
   
   
   
   a demo response
   ```
   {
        "projects": [{
                "name": "101",
                "description": "",
                "metrics": [{
                        "pluginName": "dora",
                        "pluginOption": "",
                        "enable": true
                }],
                "blueprint": {
                        "name": "101-Blueprint",
                        "projectName": "101",
                        "mode": "NORMAL",
                        "plan": [
                                [{
                                        "plugin": "org",
                                        "subtasks": ["setProjectMapping"],
                                        "options": {
                                                "projectMappings": [{
                                                        "projectName": "101",
                                                        "scopes": [{
                                                                "table": 
"boards",
                                                                "rowId": 
"tapd:TapdWorkspace:1:56105097"
                                                        }, {
                                                                "table": 
"boards",
                                                                "rowId": 
"tapd:TapdWorkspace:1:59718559"
                                                        }, {
                                                                "table": 
"boards",
                                                                "rowId": 
"tapd:TapdWorkspace:1:66043013"
                                                        }, {
                                                                "table": 
"boards",
                                                                "rowId": 
"jira:JiraBoard:1:121"
                                                        }]
                                                }]
                                        }
                                }],
                                [{
                                        "plugin": "tapd",
                                        "subtasks": ["convertWorkspace", 
"collectWorkitemTypes", "extractWorkitemTypes", "collectStoryCustomFields", 
"extractStoryCustomFields", "collectTaskCustomFields", 
"extractTaskCustomFields", "collectBugCustomFields", "extractBugCustomFields", 
"collectStoryCategories", "extractStoryCategories", "collectStoryStatus", 
"extractStoryStatus", "collectStoryStatusLastStep", 
"enrichStoryStatusLastStep", "collectBugStatus", "extractBugStatus", 
"collectBugStatusLastStep", "enrichBugStatusLastStep", "collectAccounts", 
"extractAccounts", "collectIterations", "extractIterations", "collectStorys", 
"collectBugs", "collectTasks", "extractStories", "extractBugs", "extractTasks", 
"collectBugChangelogs", "extractBugChangelog", "collectStoryChangelogs", 
"extractStoryChangelog", "collectTaskChangelogs", "extractTaskChangelog", 
"collectWorklogs", "extractWorklogs", "collectBugCommits", "extractBugCommits", 
"collectStoryCommits", "extractStoryCommits", "collectTaskCommits", 
"extractTaskCommits", "co
 nvertAccounts", "convertIteration", "convertStory", "convertBug", 
"convertTask", "convertWorklog", "convertBugChangelog", 
"convertStoryChangelog", "convertTaskChangelog", "convertBugCommit", 
"convertStoryCommit", "convertTaskCommit", "convertStoryLabels", 
"convertTaskLabels", "convertBugLabels", "enrichStoryCustomFields", 
"enrichBugCustomFields", "enrichTaskCustomFields"],
                                        "options": {
                                                "connectionId": 1,
                                                "timeAfter": 
"2023-01-12T00:00:00+08:00",
                                                "workspaceId": 56105097
                                        }
                                }, {
                                        "plugin": "jira",
                                        "subtasks": ["collectStatus", 
"extractStatus", "collectProjects", "extractProjects", "collectIssueTypes", 
"extractIssueType", "collectIssues", "extractIssues", "convertIssueLabels", 
"collectIssueChangelogs", "extractIssueChangelogs", "collectAccounts", 
"collectWorklogs", "extractWorklogs", "collectRemotelinks", 
"extractRemotelinks", "collectSprints", "extractSprints", "convertBoard", 
"convertIssues", "convertWorklogs", "convertIssueChangelogs", "convertSprints", 
"convertSprintIssues", "collectDevelopmentPanel", "ExtractDevelopmentPanel", 
"convertIssueCommits", "convertIssueRepoCommits", "extractAccounts", 
"convertAccounts", "collectEpics", "extractEpics"],
                                        "options": {
                                                "connectionId": 1,
                                                "scopeId": "121",
                                                "timeAfter": 
"2023-01-12T00:00:00+08:00"
                                        }
                                }],
                                [{
                                        "plugin": "tapd",
                                        "subtasks": ["convertWorkspace", 
"collectWorkitemTypes", "extractWorkitemTypes", "collectStoryCustomFields", 
"extractStoryCustomFields", "collectTaskCustomFields", 
"extractTaskCustomFields", "collectBugCustomFields", "extractBugCustomFields", 
"collectStoryCategories", "extractStoryCategories", "collectStoryStatus", 
"extractStoryStatus", "collectStoryStatusLastStep", 
"enrichStoryStatusLastStep", "collectBugStatus", "extractBugStatus", 
"collectBugStatusLastStep", "enrichBugStatusLastStep", "collectAccounts", 
"extractAccounts", "collectIterations", "extractIterations", "collectStorys", 
"collectBugs", "collectTasks", "extractStories", "extractBugs", "extractTasks", 
"collectBugChangelogs", "extractBugChangelog", "collectStoryChangelogs", 
"extractStoryChangelog", "collectTaskChangelogs", "extractTaskChangelog", 
"collectWorklogs", "extractWorklogs", "collectBugCommits", "extractBugCommits", 
"collectStoryCommits", "extractStoryCommits", "collectTaskCommits", 
"extractTaskCommits", "co
 nvertAccounts", "convertIteration", "convertStory", "convertBug", 
"convertTask", "convertWorklog", "convertBugChangelog", 
"convertStoryChangelog", "convertTaskChangelog", "convertBugCommit", 
"convertStoryCommit", "convertTaskCommit", "convertStoryLabels", 
"convertTaskLabels", "convertBugLabels", "enrichStoryCustomFields", 
"enrichBugCustomFields", "enrichTaskCustomFields"],
                                        "options": {
                                                "connectionId": 1,
                                                "timeAfter": 
"2023-01-12T00:00:00+08:00",
                                                "workspaceId": 59718559
                                        }
                                }],
                                [{
                                        "plugin": "tapd",
                                        "subtasks": ["convertWorkspace", 
"collectWorkitemTypes", "extractWorkitemTypes", "collectStoryCustomFields", 
"extractStoryCustomFields", "collectTaskCustomFields", 
"extractTaskCustomFields", "collectBugCustomFields", "extractBugCustomFields", 
"collectStoryCategories", "extractStoryCategories", "collectStoryStatus", 
"extractStoryStatus", "collectStoryStatusLastStep", 
"enrichStoryStatusLastStep", "collectBugStatus", "extractBugStatus", 
"collectBugStatusLastStep", "enrichBugStatusLastStep", "collectAccounts", 
"extractAccounts", "collectIterations", "extractIterations", "collectStorys", 
"collectBugs", "collectTasks", "extractStories", "extractBugs", "extractTasks", 
"collectBugChangelogs", "extractBugChangelog", "collectStoryChangelogs", 
"extractStoryChangelog", "collectTaskChangelogs", "extractTaskChangelog", 
"collectWorklogs", "extractWorklogs", "collectBugCommits", "extractBugCommits", 
"collectStoryCommits", "extractStoryCommits", "collectTaskCommits", 
"extractTaskCommits", "co
 nvertAccounts", "convertIteration", "convertStory", "convertBug", 
"convertTask", "convertWorklog", "convertBugChangelog", 
"convertStoryChangelog", "convertTaskChangelog", "convertBugCommit", 
"convertStoryCommit", "convertTaskCommit", "convertStoryLabels", 
"convertTaskLabels", "convertBugLabels", "enrichStoryCustomFields", 
"enrichBugCustomFields", "enrichTaskCustomFields"],
                                        "options": {
                                                "connectionId": 1,
                                                "timeAfter": 
"2023-01-12T00:00:00+08:00",
                                                "workspaceId": 66043013
                                        }
                                }],
                                [{
                                        "plugin": "dora",
                                        "subtasks": 
["generateDeploymentCommits", "enrichPrevSuccessDeploymentCommits"],
                                        "options": {
                                                "projectName": "101"
                                        }
                                }],
                                [{
                                        "plugin": "refdiff",
                                        "subtasks": 
["calculateDeploymentCommitsDiff"],
                                        "options": {
                                                "projectName": "101"
                                        }
                                }],
                                [{
                                        "plugin": "dora",
                                        "subtasks": ["calculateChangeLeadTime", 
"ConnectIncidentToDeployment"],
                                        "options": {
                                                "projectName": "101"
                                        }
                                }]
                        ],
                        "enable": true,
                        "cronConfig": "0 0 * * *",
                        "isManual": false,
                        "skipOnFail": true,
                        "labels": [],
                        "settings": {
                                "connections": [{
                                        "connectionId": 1,
                                        "plugin": "tapd",
                                        "scopes": [{
                                                "id": "56105097"
                                        }, {
                                                "id": "59718559"
                                        }, {
                                                "id": "66043013"
                                        }]
                                }, {
                                        "connectionId": 1,
                                        "plugin": "jira",
                                        "scopes": [{
                                                "id": "121"
                                        }]
                                }],
                                "timeAfter": "2023-01-12T00:00:00+08:00",
                                "version": "2.0.0"
                        },
                        "id": 3,
                        "createdAt": "2023-07-12T16:42:03.628+08:00",
                        "updatedAt": "2023-07-12T16:58:25.328+08:00"
                },
                "latest_pipeline": {
                        "id": 1,
                        "createdAt": "2023-07-12T16:42:16.994+08:00",
                        "updatedAt": "2023-07-12T16:44:01.573+08:00",
                        "name": "101-Blueprint",
                        "blueprintId": 3,
                        "plan": [
                                [{
                                        "plugin": "org",
                                        "subtasks": ["setProjectMapping"],
                                        "options": {
                                                "projectMappings": [{
                                                        "projectName": "101",
                                                        "scopes": [{
                                                                "table": 
"boards",
                                                                "rowId": 
"tapd:TapdWorkspace:1:56105097"
                                                        }, {
                                                                "table": 
"boards",
                                                                "rowId": 
"tapd:TapdWorkspace:1:59718559"
                                                        }, {
                                                                "table": 
"boards",
                                                                "rowId": 
"tapd:TapdWorkspace:1:66043013"
                                                        }]
                                                }]
                                        }
                                }],
                                [{
                                        "plugin": "tapd",
                                        "subtasks": ["convertWorkspace", 
"collectWorkitemTypes", "extractWorkitemTypes", "collectStoryCustomFields", 
"extractStoryCustomFields", "collectTaskCustomFields", 
"extractTaskCustomFields", "collectBugCustomFields", "extractBugCustomFields", 
"collectStoryCategories", "extractStoryCategories", "collectStoryStatus", 
"extractStoryStatus", "collectStoryStatusLastStep", 
"enrichStoryStatusLastStep", "collectBugStatus", "extractBugStatus", 
"collectBugStatusLastStep", "enrichBugStatusLastStep", "collectAccounts", 
"extractAccounts", "collectIterations", "extractIterations", "collectStorys", 
"collectBugs", "collectTasks", "extractStories", "extractBugs", "extractTasks", 
"collectBugChangelogs", "extractBugChangelog", "collectStoryChangelogs", 
"extractStoryChangelog", "collectTaskChangelogs", "extractTaskChangelog", 
"collectWorklogs", "extractWorklogs", "collectBugCommits", "extractBugCommits", 
"collectStoryCommits", "extractStoryCommits", "collectTaskCommits", 
"extractTaskCommits", "co
 nvertAccounts", "convertIteration", "convertStory", "convertBug", 
"convertTask", "convertWorklog", "convertBugChangelog", 
"convertStoryChangelog", "convertTaskChangelog", "convertBugCommit", 
"convertStoryCommit", "convertTaskCommit", "convertStoryLabels", 
"convertTaskLabels", "convertBugLabels", "enrichStoryCustomFields", 
"enrichBugCustomFields", "enrichTaskCustomFields"],
                                        "options": {
                                                "connectionId": 1,
                                                "timeAfter": 
"2023-01-12T00:00:00+08:00",
                                                "workspaceId": 56105097
                                        }
                                }],
                                [{
                                        "plugin": "tapd",
                                        "subtasks": ["convertWorkspace", 
"collectWorkitemTypes", "extractWorkitemTypes", "collectStoryCustomFields", 
"extractStoryCustomFields", "collectTaskCustomFields", 
"extractTaskCustomFields", "collectBugCustomFields", "extractBugCustomFields", 
"collectStoryCategories", "extractStoryCategories", "collectStoryStatus", 
"extractStoryStatus", "collectStoryStatusLastStep", 
"enrichStoryStatusLastStep", "collectBugStatus", "extractBugStatus", 
"collectBugStatusLastStep", "enrichBugStatusLastStep", "collectAccounts", 
"extractAccounts", "collectIterations", "extractIterations", "collectStorys", 
"collectBugs", "collectTasks", "extractStories", "extractBugs", "extractTasks", 
"collectBugChangelogs", "extractBugChangelog", "collectStoryChangelogs", 
"extractStoryChangelog", "collectTaskChangelogs", "extractTaskChangelog", 
"collectWorklogs", "extractWorklogs", "collectBugCommits", "extractBugCommits", 
"collectStoryCommits", "extractStoryCommits", "collectTaskCommits", 
"extractTaskCommits", "co
 nvertAccounts", "convertIteration", "convertStory", "convertBug", 
"convertTask", "convertWorklog", "convertBugChangelog", 
"convertStoryChangelog", "convertTaskChangelog", "convertBugCommit", 
"convertStoryCommit", "convertTaskCommit", "convertStoryLabels", 
"convertTaskLabels", "convertBugLabels", "enrichStoryCustomFields", 
"enrichBugCustomFields", "enrichTaskCustomFields"],
                                        "options": {
                                                "connectionId": 1,
                                                "timeAfter": 
"2023-01-12T00:00:00+08:00",
                                                "workspaceId": 59718559
                                        }
                                }],
                                [{
                                        "plugin": "tapd",
                                        "subtasks": ["convertWorkspace", 
"collectWorkitemTypes", "extractWorkitemTypes", "collectStoryCustomFields", 
"extractStoryCustomFields", "collectTaskCustomFields", 
"extractTaskCustomFields", "collectBugCustomFields", "extractBugCustomFields", 
"collectStoryCategories", "extractStoryCategories", "collectStoryStatus", 
"extractStoryStatus", "collectStoryStatusLastStep", 
"enrichStoryStatusLastStep", "collectBugStatus", "extractBugStatus", 
"collectBugStatusLastStep", "enrichBugStatusLastStep", "collectAccounts", 
"extractAccounts", "collectIterations", "extractIterations", "collectStorys", 
"collectBugs", "collectTasks", "extractStories", "extractBugs", "extractTasks", 
"collectBugChangelogs", "extractBugChangelog", "collectStoryChangelogs", 
"extractStoryChangelog", "collectTaskChangelogs", "extractTaskChangelog", 
"collectWorklogs", "extractWorklogs", "collectBugCommits", "extractBugCommits", 
"collectStoryCommits", "extractStoryCommits", "collectTaskCommits", 
"extractTaskCommits", "co
 nvertAccounts", "convertIteration", "convertStory", "convertBug", 
"convertTask", "convertWorklog", "convertBugChangelog", 
"convertStoryChangelog", "convertTaskChangelog", "convertBugCommit", 
"convertStoryCommit", "convertTaskCommit", "convertStoryLabels", 
"convertTaskLabels", "convertBugLabels", "enrichStoryCustomFields", 
"enrichBugCustomFields", "enrichTaskCustomFields"],
                                        "options": {
                                                "connectionId": 1,
                                                "timeAfter": 
"2023-01-12T00:00:00+08:00",
                                                "workspaceId": 66043013
                                        }
                                }],
                                [{
                                        "plugin": "dora",
                                        "subtasks": 
["generateDeploymentCommits", "enrichPrevSuccessDeploymentCommits"],
                                        "options": {
                                                "projectName": "101"
                                        }
                                }],
                                [{
                                        "plugin": "refdiff",
                                        "subtasks": 
["calculateDeploymentCommitsDiff"],
                                        "options": {
                                                "projectName": "101"
                                        }
                                }],
                                [{
                                        "plugin": "dora",
                                        "subtasks": ["calculateChangeLeadTime", 
"ConnectIncidentToDeployment"],
                                        "options": {
                                                "projectName": "101"
                                        }
                                }]
                        ],
                        "totalTasks": 7,
                        "finishedTasks": 7,
                        "beganAt": "2023-07-12T16:42:17.987+08:00",
                        "finishedAt": "2023-07-12T16:44:01.572+08:00",
                        "status": "TASK_PARTIAL",
                        "message": "",
                        "errorName": "",
                        "spentSeconds": 104,
                        "stage": 7,
                        "labels": [],
                        "skipOnFail": true
                }
        }, {
                "name": "1233",
                "description": "",
                "metrics": [{
                        "pluginName": "dora",
                        "pluginOption": "",
                        "enable": true
                }],
                "blueprint": {
                        "name": "1233-Blueprint",
                        "projectName": "1233",
                        "mode": "NORMAL",
                        "plan": [
                                [{
                                        "plugin": "org",
                                        "subtasks": ["setProjectMapping"],
                                        "options": {
                                                "projectMappings": [{
                                                        "projectName": "1233",
                                                        "scopes": null
                                                }]
                                        }
                                }],
                                [{
                                        "plugin": "dora",
                                        "subtasks": 
["generateDeploymentCommits", "enrichPrevSuccessDeploymentCommits"],
                                        "options": {
                                                "projectName": "1233"
                                        }
                                }],
                                [{
                                        "plugin": "refdiff",
                                        "subtasks": 
["calculateDeploymentCommitsDiff"],
                                        "options": {
                                                "projectName": "1233"
                                        }
                                }],
                                [{
                                        "plugin": "dora",
                                        "subtasks": ["calculateChangeLeadTime", 
"ConnectIncidentToDeployment"],
                                        "options": {
                                                "projectName": "1233"
                                        }
                                }]
                        ],
                        "enable": true,
                        "cronConfig": "0 0 * * *",
                        "isManual": false,
                        "skipOnFail": true,
                        "labels": [],
                        "settings": {
                                "version": "2.0.0",
                                "timeAfter": "2023-01-11T00:00:00+08:00",
                                "connections": []
                        },
                        "id": 2,
                        "createdAt": "2023-07-11T16:47:44.416+08:00",
                        "updatedAt": "2023-07-11T16:47:44.416+08:00"
                }
        }, {
                "name": "1222",
                "description": "",
                "metrics": [{
                        "pluginName": "dora",
                        "pluginOption": "",
                        "enable": true
                }],
                "blueprint": {
                        "name": "1222-Blueprint",
                        "projectName": "1222",
                        "mode": "NORMAL",
                        "plan": [
                                [{
                                        "plugin": "org",
                                        "subtasks": ["setProjectMapping"],
                                        "options": {
                                                "projectMappings": [{
                                                        "projectName": "1222",
                                                        "scopes": null
                                                }]
                                        }
                                }],
                                [{
                                        "plugin": "dora",
                                        "subtasks": 
["generateDeploymentCommits", "enrichPrevSuccessDeploymentCommits"],
                                        "options": {
                                                "projectName": "1222"
                                        }
                                }],
                                [{
                                        "plugin": "refdiff",
                                        "subtasks": 
["calculateDeploymentCommitsDiff"],
                                        "options": {
                                                "projectName": "1222"
                                        }
                                }],
                                [{
                                        "plugin": "dora",
                                        "subtasks": ["calculateChangeLeadTime", 
"ConnectIncidentToDeployment"],
                                        "options": {
                                                "projectName": "1222"
                                        }
                                }]
                        ],
                        "enable": true,
                        "cronConfig": "0 0 * * *",
                        "isManual": false,
                        "skipOnFail": true,
                        "labels": [],
                        "settings": {
                                "version": "2.0.0",
                                "timeAfter": "2023-01-11T00:00:00+08:00",
                                "connections": []
                        },
                        "id": 1,
                        "createdAt": "2023-07-11T16:47:18.414+08:00",
                        "updatedAt": "2023-07-11T16:47:18.414+08:00"
                }
        }],
        "count": 3
   }
   ```
   
   
   ### Other Information
   Any other information that is important to this PR.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to