-
Notifications
You must be signed in to change notification settings - Fork 535
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* feat: issue add is_subtask field * fix: adapt opsgenie e2e test * fix: adapt pagerduty e2e test * fix: adapt tapd e2e test * fix: adapt teambition e2e test * fix: adapt zentao e2e test Co-authored-by: abeizn <zikuan.an@merico.dev>
- Loading branch information
1 parent
9af5746
commit 0124b4e
Showing
12 changed files
with
145 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
backend/core/models/migrationscripts/20240813_add_is_subtask_to_issue.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
Licensed to the Apache Software Foundation (ASF) under one or more | ||
contributor license agreements. See the NOTICE file distributed with | ||
this work for additional information regarding copyright ownership. | ||
The ASF licenses this file to You under the Apache License, Version 2.0 | ||
(the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package migrationscripts | ||
|
||
import ( | ||
"github.com/apache/incubator-devlake/core/context" | ||
"github.com/apache/incubator-devlake/core/errors" | ||
"github.com/apache/incubator-devlake/core/plugin" | ||
) | ||
|
||
var _ plugin.MigrationScript = (*addIsSubtaskToIssue)(nil) | ||
|
||
type issue20240813 struct { | ||
IsSubtask bool | ||
} | ||
|
||
func (issue20240813) TableName() string { | ||
return "issues" | ||
} | ||
|
||
type addIsSubtaskToIssue struct{} | ||
|
||
func (*addIsSubtaskToIssue) Up(basicRes context.BasicRes) errors.Error { | ||
db := basicRes.GetDal() | ||
if err := db.AutoMigrate(&issue20240813{}); err != nil { | ||
return err | ||
} | ||
return nil | ||
} | ||
|
||
func (*addIsSubtaskToIssue) Version() uint64 { | ||
return 20240813142101 | ||
} | ||
|
||
func (*addIsSubtaskToIssue) Name() string { | ||
return "add is_subtask to issues" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
id,url,icon_url,issue_key,title,description,epic_key,type,original_type,status,original_status,story_point,resolution_date,created_date,updated_date,lead_time_minutes,original_estimate_minutes,time_spent_minutes,time_remaining_minutes,parent_issue_id,priority | ||
opsgenie:Incident:1:3a74524a-f492-4172-b3f5-6041c7cb404a,https://sandesvitor.app.opsgenie.com/incident/detail/3a74524a-f492-4172-b3f5-6041c7cb404a,,3a74524a-f492-4172-b3f5-6041c7cb404a,Incident#1,Test Description,,INCIDENT,,IN_PROGRESS,open,,,2023-09-06T14:30:56.346+00:00,2023-09-06T14:30:57.035+00:00,,,,,,P3 | ||
opsgenie:Incident:1:3f84e009-7548-4e7d-832a-fa82c1ceb6b1,https://sandesvitor.app.opsgenie.com/incident/detail/3f84e009-7548-4e7d-832a-fa82c1ceb6b1,,3f84e009-7548-4e7d-832a-fa82c1ceb6b1,Incident#2,Test Description,,INCIDENT,,DONE,resolved,,2023-09-05T18:21:21.490+00:00,2023-09-05T18:20:28.003+00:00,2023-09-05T18:21:21.490+00:00,0,,,,,P5 | ||
id,url,icon_url,issue_key,title,description,epic_key,type,original_type,status,original_status,story_point,resolution_date,created_date,updated_date,lead_time_minutes,original_estimate_minutes,time_spent_minutes,time_remaining_minutes,parent_issue_id,priority,urgency,is_subtask | ||
opsgenie:Incident:1:3a74524a-f492-4172-b3f5-6041c7cb404a,https://sandesvitor.app.opsgenie.com/incident/detail/3a74524a-f492-4172-b3f5-6041c7cb404a,,3a74524a-f492-4172-b3f5-6041c7cb404a,Incident#1,Test Description,,INCIDENT,,IN_PROGRESS,open,,,2023-09-06T14:30:56.346+00:00,2023-09-06T14:30:57.035+00:00,,,,,,P3,,0 | ||
opsgenie:Incident:1:3f84e009-7548-4e7d-832a-fa82c1ceb6b1,https://sandesvitor.app.opsgenie.com/incident/detail/3f84e009-7548-4e7d-832a-fa82c1ceb6b1,,3f84e009-7548-4e7d-832a-fa82c1ceb6b1,Incident#2,Test Description,,INCIDENT,,DONE,resolved,,2023-09-05T18:21:21.490+00:00,2023-09-05T18:20:28.003+00:00,2023-09-05T18:21:21.490+00:00,0,,,,,P5,,0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
id,url,icon_url,issue_key,title,description,epic_key,type,original_type,status,original_status,story_point,resolution_date,created_date,updated_date,lead_time_minutes,original_estimate_minutes,time_spent_minutes,time_remaining_minutes,creator_id,creator_name,assignee_id,assignee_name,parent_issue_id,priority,severity,urgency,component | ||
pagerduty:Incident:1:4,https://keon-test.pagerduty.com/incidents/Q3YON8WNWTZMRQ,,4,,[#4] Crash reported,,INCIDENT,,TODO,triggered,,,2022-11-03T06:23:06.000+00:00,2022-11-03T07:02:36.000+00:00,,,,,,,P25K520,Kian Amini,,,,high, | ||
pagerduty:Incident:1:5,https://keon-test.pagerduty.com/incidents/Q3CZAU7Q4008QD,,5,,[#5] Slow startup,,INCIDENT,,IN_PROGRESS,acknowledged,,,2022-11-03T06:44:28.000+00:00,2022-11-03T06:44:37.000+00:00,,,,,,,PQYACO3,Keon Amini,,,,high, | ||
pagerduty:Incident:1:6,https://keon-test.pagerduty.com/incidents/Q1OHFWFP3GPXOG,,6,,[#6] Spamming logs,,INCIDENT,,DONE,resolved,,2022-11-03T06:51:44.000+00:00,2022-11-03T06:45:36.000+00:00,2022-11-03T06:51:44.000+00:00,6,,,,,,,,,,,low, | ||
id,url,icon_url,issue_key,title,description,epic_key,type,original_type,status,original_status,story_point,resolution_date,created_date,updated_date,lead_time_minutes,original_estimate_minutes,time_spent_minutes,time_remaining_minutes,creator_id,creator_name,assignee_id,assignee_name,parent_issue_id,priority,severity,urgency,component,is_subtask | ||
pagerduty:Incident:1:4,https://keon-test.pagerduty.com/incidents/Q3YON8WNWTZMRQ,,4,,[#4] Crash reported,,INCIDENT,,TODO,triggered,,,2022-11-03T06:23:06.000+00:00,2022-11-03T07:02:36.000+00:00,,,,,,,P25K520,Kian Amini,,,,high,,0 | ||
pagerduty:Incident:1:5,https://keon-test.pagerduty.com/incidents/Q3CZAU7Q4008QD,,5,,[#5] Slow startup,,INCIDENT,,IN_PROGRESS,acknowledged,,,2022-11-03T06:44:28.000+00:00,2022-11-03T06:44:37.000+00:00,,,,,,,PQYACO3,Keon Amini,,,,high,,0 | ||
pagerduty:Incident:1:6,https://keon-test.pagerduty.com/incidents/Q1OHFWFP3GPXOG,,6,,[#6] Spamming logs,,INCIDENT,,DONE,resolved,,2022-11-03T06:51:44.000+00:00,2022-11-03T06:45:36.000+00:00,2022-11-03T06:51:44.000+00:00,6,,,,,,,,,,,low,,0 |
Oops, something went wrong.