This is an automated email from the ASF dual-hosted git repository.
abeizn pushed a commit to branch release-v0.19
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/release-v0.19 by this push:
new f78b563c1 fix: jira epic urls look different than issues on domain
layer (#6377)
f78b563c1 is described below
commit f78b563c1d3c3ee459521fa9095752f57b32e065
Author: Klesh Wong <[email protected]>
AuthorDate: Wed Nov 1 16:40:40 2023 +0800
fix: jira epic urls look different than issues on domain layer (#6377)
---
backend/plugins/jira/tasks/issue_convertor.go | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/backend/plugins/jira/tasks/issue_convertor.go
b/backend/plugins/jira/tasks/issue_convertor.go
index fa7e1227e..dccd681b0 100644
--- a/backend/plugins/jira/tasks/issue_convertor.go
+++ b/backend/plugins/jira/tasks/issue_convertor.go
@@ -150,7 +150,10 @@ func convertURL(api, issueKey string) string {
if err != nil {
return api
}
- before, _, _ := strings.Cut(u.Path, "/rest/agile/1.0/issue")
+ before, _, found := strings.Cut(u.Path, "/rest/agile/1.0/issue")
+ if !found {
+ before, _, _ = strings.Cut(u.Path, "/rest/api/2/issue")
+ }
u.Path = filepath.Join(before, "browse", issueKey)
return u.String()
}