Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/plugins/jenkins/models/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type JenkinsJob struct {
Base string `gorm:"type:varchar(255)" mapstructure:"base,omitempty" json:"base"`
Url string `mapstructure:"url,omitempty" json:"url"`
Description string `mapstructure:"description,omitempty" json:"description"`
PrimaryView string `gorm:"type:varchar(255)" mapstructure:"primaryView,omitempty" json:"primaryView"`
PrimaryView string `gorm:"type:text" mapstructure:"primaryView,omitempty" json:"primaryView"`
}

func (JenkinsJob) TableName() string {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package migrationscripts

import (
"github.com/apache/incubator-devlake/core/context"
"github.com/apache/incubator-devlake/core/errors"
"github.com/apache/incubator-devlake/helpers/migrationhelper"
)

type expandPrimaryView struct{}

type JenkinsJob20260602 struct {
PrimaryView string `gorm:"type:text"`
}

func (JenkinsJob20260602) TableName() string {
return "_tool_jenkins_jobs"
}

func (u *expandPrimaryView) Up(baseRes context.BasicRes) errors.Error {
return migrationhelper.AutoMigrateTables(baseRes, &JenkinsJob20260602{})
}

func (*expandPrimaryView) Version() uint64 {
return 20260602000000
}

func (*expandPrimaryView) Name() string {
return "expand primary_view column to text"
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@ func All() []plugin.MigrationScript {
new(renameTr2ScopeConfig),
new(addRawParamTableForScope),
new(addNumberToJenkinsBuildCommit),
new(expandPrimaryView),
}
}
15 changes: 8 additions & 7 deletions backend/plugins/jira/tasks/issue_changelog_convertor.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,17 @@ func ConvertIssueChangelogs(subtaskCtx plugin.SubTaskContext) errors.Error {
_tool_jira_issue_changelogs.connection_id = _tool_jira_issue_changelog_items.connection_id
AND _tool_jira_issue_changelogs.changelog_id = _tool_jira_issue_changelog_items.changelog_id
)`),
dal.Join(`left join _tool_jira_board_issues on (
_tool_jira_board_issues.connection_id = _tool_jira_issue_changelogs.connection_id
AND _tool_jira_board_issues.issue_id = _tool_jira_issue_changelogs.issue_id
)`),
dal.Where("_tool_jira_issue_changelog_items.connection_id = ? AND _tool_jira_board_issues.board_id = ?", connectionId, boardId),
}
dal.Join(`inner join _tool_jira_board_issues on (
_tool_jira_board_issues.connection_id = _tool_jira_issue_changelogs.connection_id
AND _tool_jira_board_issues.issue_id = _tool_jira_issue_changelogs.issue_id
AND _tool_jira_board_issues.board_id = ?
)`, boardId),
dal.Where("_tool_jira_issue_changelog_items.connection_id = ?", connectionId), }
if stateManager.IsIncremental() {
since := stateManager.GetSince()
if since != nil {
clauses = append(clauses, dal.Where("_tool_jira_issue_changelog_items.created_at >= ? ", since))
clauses = append(clauses, dal.Where("_tool_jira_issue_changelogs.created >= ?", since))

}
}
return db.Cursor(clauses...)
Expand Down
2 changes: 1 addition & 1 deletion config-ui/src/plugins/register/jira/config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const JiraConfig: IPluginConfig = {
'By default, DevLake uses dynamic rate limit for optimized data collection for Jira. But you can adjust the collection speed by setting up your desirable rate limit.',
learnMore: DOC_URL.PLUGIN.JIRA.RATE_LIMIT,
externalInfo:
'Jira Cloud does not specify a maximum value of rate limit. For Jira Server, please contact your admin for more information.',
'Jira Cloud does not specify a maximum value of rate limit. For Jira Data Center, please contact your admin for more information.',
defaultValue: 10000,
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export const Auth = ({ type, initialValues, values, setValues, setErrors }: Prop
<Block title="Jira Version" required>
<Radio.Group value={version} onChange={handleChangeVersion}>
<Radio value="cloud">Jira Cloud</Radio>
<Radio value="server">Jira Server</Radio>
<Radio value="server">Jira Data Center</Radio>
</Radio.Group>

<Block
Expand All @@ -136,7 +136,7 @@ export const Auth = ({ type, initialValues, values, setValues, setErrors }: Prop
? 'Provide the Jira instance API endpoint. For Jira Cloud, e.g. https://your-company.atlassian.net/rest/. Please note that the endpoint URL should end with /.'
: ''}
{version === 'server'
? 'Provide the Jira instance API endpoint. For Jira Server, e.g. https://jira.your-company.com/rest/. Please note that the endpoint URL should end with /.'
? 'Provide the Jira instance API endpoint. For Jira Data Center, e.g. https://jira.your-company.com/rest/. Please note that the endpoint URL should end with /.'
: ''}
</>
}
Expand Down