Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add jira jql checker debug log #7376

Merged
merged 1 commit into from
Apr 25, 2024
Merged
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
3 changes: 3 additions & 0 deletions backend/plugins/jira/tasks/board_filter_begin_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,19 @@ func CollectBoardFilterBegin(taskCtx plugin.SubTaskContext) errors.Error {
if err != nil {
return errors.Default.Wrap(err, fmt.Sprintf("error updating record in _tool_jira_boards table for connection_id:%d board_id:%d", data.Options.ConnectionId, data.Options.BoardId))
}
logger.Info("full sync mode, update jql to %s", record.Jql)
}
return nil
}

// first run
if record.Jql == "" {
record.Jql = jql
err = db.Update(&record, dal.Where("connection_id = ? AND board_id = ? ", data.Options.ConnectionId, data.Options.BoardId))
if err != nil {
return errors.Default.Wrap(err, fmt.Sprintf("error updating record in _tool_jira_boards table for connection_id:%d board_id:%d", data.Options.ConnectionId, data.Options.BoardId))
}
logger.Info("first run, update jql to %s", record.Jql)
return nil
}
// change
Expand Down
3 changes: 1 addition & 2 deletions backend/plugins/jira/tasks/board_filter_end_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ func CollectBoardFilterEnd(taskCtx plugin.SubTaskContext) errors.Error {
if err != nil {
return errors.Default.Wrap(err, fmt.Sprintf("error getting board filter jql for connection_id:%d board_id:%d", data.Options.ConnectionId, data.Options.BoardId))
}
logger.Info("collect board filter jql:%s", filterInfo.Jql)

jql := filterInfo.Jql
logger.Info("collect board filter jql:%s", jql)

Expand All @@ -63,6 +61,7 @@ func CollectBoardFilterEnd(taskCtx plugin.SubTaskContext) errors.Error {
if err != nil {
return errors.Default.Wrap(err, fmt.Sprintf("error finding record in _tool_jira_boards table for connection_id:%d board_id:%d", data.Options.ConnectionId, data.Options.BoardId))
}
logger.Info("get board filter jql:%s", record.Jql)

if record.Jql != jql {
return errors.Default.New(fmt.Sprintf("connection_id:%d board_id:%d filter jql has changed, please use fullSync mode. And the previous jql is %s, now jql is %s", data.Options.ConnectionId, data.Options.BoardId, record.Jql, jql))
Expand Down
Loading