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

zhangliang2022 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 1c409fd2c fix: the jenkins plugin can not scope name in transformation 
rules (#4045)
1c409fd2c is described below

commit 1c409fd2cec26de20817e6258ef6620de0afb4d6
Author: abeizn <[email protected]>
AuthorDate: Wed Dec 28 11:43:41 2022 +0800

    fix: the jenkins plugin can not scope name in transformation rules (#4045)
---
 plugins/jenkins/api/scope.go | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/plugins/jenkins/api/scope.go b/plugins/jenkins/api/scope.go
index 737de73fa..f0117975c 100644
--- a/plugins/jenkins/api/scope.go
+++ b/plugins/jenkins/api/scope.go
@@ -182,9 +182,10 @@ func GetScope(input *core.ApiResourceInput) 
(*core.ApiResourceOutput, errors.Err
        if err != nil {
                return nil, err
        }
-       var rule models.JenkinsJob
+
+       var rule models.JenkinsTransformationRule
        if job.TransformationRuleId > 0 {
-               err = basicRes.GetDal().First(&rule, 
dal.Where("transformation_rule_id = ?", job.TransformationRuleId))
+               err = basicRes.GetDal().First(&rule, dal.Where("id = ?", 
job.TransformationRuleId))
                if err != nil {
                        return nil, err
                }

Reply via email to