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

chore(api): round trip field id #320

Merged
merged 2 commits into from
Oct 4, 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 CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Unreleased
- Round trip `field_id`

# v0.33.1
- Fix selection index issue on custom label trend reports
- Fix attachments not getting uploaded when syncing comments
Expand Down
6 changes: 6 additions & 0 deletions api/src/resources/comment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -873,12 +873,17 @@ pub struct NewEntityWithSpan {
pub name: EntityName,
pub formatted_value: String,
pub span: NewEntitySpan,
pub field_id: FieldId,
}

#[derive(Debug, Clone, PartialEq, Deserialize, Serialize, Eq)]
pub struct FieldId(pub String);

#[derive(Debug, Clone, PartialEq, Deserialize, Serialize, Eq)]
pub struct NewEntityWithSpans {
pub name: EntityName,
pub formatted_value: String,
pub field_id: FieldId,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also add it to NewEntityWithSpan for the legacy cases no? And what about the non-new one, like Entity? actually I see that Entity doesn't support the legacy span case either...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Entity doesn't support the legacy span case either...

I think I'll address this in a separate PR

We should also add it to NewEntityWithSpan for the legacy cases no?

Yep, good spot!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'll address this in a separate PR

yeah that's totally fair, it's just a bit sad to see the state we left the cli in 😬 thanks for cleaning up the mess

pub spans: Vec<NewEntitySpan>,
}

Expand All @@ -895,6 +900,7 @@ pub struct Entity {
pub name: EntityName,
pub formatted_value: String,
pub spans: Vec<EntitySpan>,
pub field_id: FieldId,
}

#[derive(Debug, PartialEq, Clone, Deserialize, Serialize, Eq)]
Expand Down
Loading