Skip to content

Fix update xx commit incremental#3706

Closed
warren830 wants to merge 4 commits intoapache:mainfrom
merico-ai:fix-update-xx-commit-incremental
Closed

Fix update xx commit incremental#3706
warren830 wants to merge 4 commits intoapache:mainfrom
merico-ai:fix-update-xx-commit-incremental

Conversation

@warren830
Copy link
Contributor

@warren830 warren830 commented Nov 9, 2022

Summary

As tapd hasn't been used very frequently, so there are some issues when collecting by incremental

  1. we misused UTC and time.Format for the field modified which is used in url, as tapd time are all in China, but we store all data as UTC time in db, so we need to transform time to CstZone
  • already fixed by using since.In(CstZone).Format("2006-01-02")
  1. we used a wrong way to collect xxCommits, the old way will miss data which created after last modification of story/bug/task. For example, we already have story_commit which created on 2022-11-02, and that story was modified on 2022-11-01, then we collect both data on 2022-11-03, and we connected another commit to any story on 2022-11-04, then we tried to collect data again on 2022-11-05, we will not collect commits for the story which modified before 2022-11-02, because connect a commit to a story, the story's filed modified will not be changed.
  • fixed by the way similar to Refactor collector of worklogs and remotelinks #2274, by this way, every time we will collect story_commits as below:
  • will collect story_commit for two kinds of stories described as below:
    1. stories have no story commits (story got modified after creation)
    2. stories have story commits and stories got modified after last time that we collected story commit (story got modified after creation)
  1. another minor issue(never influence our previous data report):
  • the entity task used a wrong tag name for the field title

Does this close any open issues?

Relate to #3632

Screenshots

Include any relevant screenshots here.

Other Information

this new way still has side effect, we cannot collect story commits for the story which already collected commits and never got modified after last collection

@warren830 warren830 force-pushed the fix-update-xx-commit-incremental branch 2 times, most recently from 1fe718d to 4f10c76 Compare November 10, 2022 01:13
@warren830 warren830 force-pushed the fix-update-xx-commit-incremental branch from dcd761a to a977c46 Compare November 10, 2022 03:53
@warren830
Copy link
Contributor Author

As new logic still will miss data, will tackle this later

@warren830 warren830 closed this Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant