This is an automated email from the ASF dual-hosted git repository.

abeizn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new b07b952c1 fix: jira epic urls look different than issues on domain 
layer (#6319)
b07b952c1 is described below

commit b07b952c1bf49f1c9b72dad24ff2df6610a08c90
Author: Klesh Wong <[email protected]>
AuthorDate: Tue Oct 24 17:12:14 2023 +0800

    fix: jira epic urls look different than issues on domain layer (#6319)
---
 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()
 }

Reply via email to