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

likyh 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 17869f0a6 fix: fix jenkins plugin not save scope name (#4039)
17869f0a6 is described below

commit 17869f0a6b3c84514fcb5bf9b46a62614793a079
Author: Likyh <[email protected]>
AuthorDate: Tue Dec 27 21:29:01 2022 +0800

    fix: fix jenkins plugin not save scope name (#4039)
---
 config-ui/src/plugins/jenkins/components/miller-columns/index.tsx | 3 ++-
 plugins/jenkins/models/job.go                                     | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/config-ui/src/plugins/jenkins/components/miller-columns/index.tsx 
b/config-ui/src/plugins/jenkins/components/miller-columns/index.tsx
index 7680ddcf6..cdc4f027a 100644
--- a/config-ui/src/plugins/jenkins/components/miller-columns/index.tsx
+++ b/config-ui/src/plugins/jenkins/components/miller-columns/index.tsx
@@ -57,7 +57,8 @@ export const MillerColumns = ({
       .filter((it) => seletedIds.includes(it.id) && it.type !== 'folder')
       .map((it: any) => ({
         connectionId,
-        jobFullName: getJobFullName(it)
+        jobFullName: getJobFullName(it),
+        name: getJobFullName(it),
       }))
 
     onChangeItems(result)
diff --git a/plugins/jenkins/models/job.go b/plugins/jenkins/models/job.go
index 7b77542cc..15f629221 100644
--- a/plugins/jenkins/models/job.go
+++ b/plugins/jenkins/models/job.go
@@ -26,7 +26,7 @@ type JenkinsJob struct {
        ConnectionId         uint64 `gorm:"primaryKey" 
mapstructure:"connectionId,omitempty" json:"connectionId"`
        FullName             string `gorm:"primaryKey;type:varchar(255)" 
mapstructure:"jobFullName" json:"jobFullName"` // "path1/path2/job name"
        TransformationRuleId uint64 
`mapstructure:"transformationRuleId,omitempty" 
json:"transformationRuleId,omitempty"`
-       Name                 string `gorm:"index;type:varchar(255)" 
mapstructure:"-,omitempty" json:"-"` // "job name"
+       Name                 string `gorm:"index;type:varchar(255)" 
mapstructure:"name" json:"name"`     // scope name now is same to `jobFullName`
        Path                 string `gorm:"index;type:varchar(511)" 
mapstructure:"-,omitempty" json:"-"` // "job/path1/job/path2"
        Class                string `gorm:"type:varchar(255)" 
mapstructure:"class,omitempty" json:"class"`
        Color                string `gorm:"type:varchar(255)" 
mapstructure:"color,omitempty" json:"color"`

Reply via email to