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

[Bug][jira] field_id is empty in issue_changelogs #7911

Closed
3 tasks done
usharerose opened this issue Aug 19, 2024 · 2 comments
Closed
3 tasks done

[Bug][jira] field_id is empty in issue_changelogs #7911

usharerose opened this issue Aug 19, 2024 · 2 comments
Assignees
Labels
severity/p1 This bug affects functionality or significantly affect ux type/bug This issue is a bug

Comments

@usharerose
Copy link
Contributor

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

Jira plugin's issue_changelog_convertor doesn't fill field_id

What do you expect to happen

fill field_id value

How to reproduce

Check the data in issue_changelogs table

Anything else

No response

Version

5de4908

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@usharerose usharerose added the type/bug This issue is a bug label Aug 19, 2024
@dosubot dosubot bot added the severity/p1 This bug affects functionality or significantly affect ux label Aug 19, 2024
Copy link

dosubot bot commented Aug 19, 2024

The field_id is empty in the issue_changelogs table because the field_id is not being set in the Convert function of the StatefulDataConverter. The FieldId is directly assigned from row.FieldId, but row.FieldId is not being populated from the database.

Here is the relevant part of the code:

Convert: func(row *IssueChangelogItemResult) ([]interface{}, errors.Error) {
    changelog := &ticket.IssueChangelogs{
        DomainEntity: domainlayer.DomainEntity{Id: changelogIdGenerator.Generate(
            row.ConnectionId,
            row.ChangelogId,
            row.Field,
        )},
        IssueId:           issueIdGenerator.Generate(row.ConnectionId, row.IssueId),
        AuthorId:          accountIdGen.Generate(connectionId, row.AuthorAccountId),
        AuthorName:        row.AuthorDisplayName,
        FieldId:           row.FieldId,  // This is where FieldId is assigned
        FieldName:         row.Field,
        OriginalFromValue: row.FromString,
        OriginalToValue:   row.ToString,
        CreatedDate:       row.Created,
    }
    // ... rest of the code
}

The IssueChangelogItemResult struct does not include a FieldId field, which is why row.FieldId is not populated:

type IssueChangelogItemResult struct {
    models.JiraIssueChangelogItems
    IssueId           uint64 `gorm:"index"`
    AuthorAccountId   string
    AuthorDisplayName string
    Created           time.Time
}

To resolve this issue, ensure that the row.FieldId is correctly populated from the Jira data source during the extraction process [1][2].

To continue talking to Dosu, mention @dosu.

usharerose added a commit to usharerose/incubator-devlake that referenced this issue Aug 19, 2024
usharerose added a commit to usharerose/incubator-devlake that referenced this issue Aug 19, 2024
usharerose added a commit to usharerose/incubator-devlake that referenced this issue Aug 19, 2024
usharerose added a commit to usharerose/incubator-devlake that referenced this issue Aug 19, 2024
usharerose added a commit to usharerose/incubator-devlake that referenced this issue Aug 19, 2024
usharerose added a commit to usharerose/incubator-devlake that referenced this issue Aug 19, 2024
abeizn pushed a commit that referenced this issue Aug 19, 2024
…7912)

* fix: fill field_id of changelog item of Jira in tool layer (#7911)

* fix: e2e test data (#7911)
usharerose added a commit to usharerose/incubator-devlake that referenced this issue Aug 19, 2024
…) (apache#7912)

* fix: fill field_id of changelog item of Jira in tool layer (apache#7911)

* fix: e2e test data (apache#7911)
usharerose added a commit to usharerose/incubator-devlake that referenced this issue Aug 19, 2024
…) (apache#7912)

* fix: fill field_id of changelog item of Jira in tool layer (apache#7911)

* fix: e2e test data (apache#7911)
abeizn pushed a commit that referenced this issue Aug 19, 2024
…7912) (#7918)

* fix: fill field_id of changelog item of Jira in tool layer (#7911)

* fix: e2e test data (#7911)
abeizn pushed a commit that referenced this issue Aug 19, 2024
…7912) (#7919)

* fix: fill field_id of changelog item of Jira in tool layer (#7911)

* fix: e2e test data (#7911)
@abeizn
Copy link
Contributor

abeizn commented Sep 6, 2024

Resloved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/p1 This bug affects functionality or significantly affect ux type/bug This issue is a bug
Projects
None yet
Development

No branches or pull requests

2 participants