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

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

commit e542bcad647eb4089ff434eb585be0db4fc11db7
Author: narro wizard <[email protected]>
AuthorDate: Thu Mar 27 13:56:50 2025 +0800

    fix(tapd): ignore step changes in story changelog
    
    - Add IsStepChange, Step, and StepAlias fields to TapdStoryChangelogItemRes
    - Modify ExtractStoryChangelog task to skip step change events
    - This change addresses the issue described in 
https://github.com/apache/incubator-devlake/issues/8355
---
 backend/plugins/tapd/models/story_changelog.go          | 3 +++
 backend/plugins/tapd/tasks/story_changelog_extractor.go | 5 +++++
 2 files changed, 8 insertions(+)

diff --git a/backend/plugins/tapd/models/story_changelog.go 
b/backend/plugins/tapd/models/story_changelog.go
index ed559af7f..29354a2f3 100644
--- a/backend/plugins/tapd/models/story_changelog.go
+++ b/backend/plugins/tapd/models/story_changelog.go
@@ -49,6 +49,9 @@ type TapdStoryChangelogItemRes struct {
        ValueAfter        json.RawMessage `json:"value_after"`
        IterationIdFrom   int64
        IterationIdTo     int64
+       IsStepChange      bool   `json:"is_step_change"`
+       Step              string `json:"step"`
+       StepAlias         string `json:"step_alias"`
        common.NoPKModel
 }
 
diff --git a/backend/plugins/tapd/tasks/story_changelog_extractor.go 
b/backend/plugins/tapd/tasks/story_changelog_extractor.go
index c2a15cb3f..17bf1ce94 100644
--- a/backend/plugins/tapd/tasks/story_changelog_extractor.go
+++ b/backend/plugins/tapd/tasks/story_changelog_extractor.go
@@ -55,6 +55,11 @@ func ExtractStoryChangelog(taskCtx plugin.SubTaskContext) 
errors.Error {
 
                        storyChangelog.ConnectionId = data.Options.ConnectionId
                        for _, fc := range storyChangelog.FieldChanges {
+                               if fc.IsStepChange {
+                                       // ignore step change
+                                       // 
https://github.com/apache/incubator-devlake/issues/8355#issuecomment-2756726463
+                                       continue
+                               }
                                var item models.TapdStoryChangelogItem
                                var valueAfterMap interface{}
                                var valueBeforeMap interface{}

Reply via email to