Skip to content

Conversation

@hentrymartin
Copy link
Collaborator

@hentrymartin hentrymartin commented Nov 13, 2025

What's in this PR?

  • This PR contains the schema changes to support vote tracking(who up/down voted which run item or comment)
  • This remove the old upVotes/downVotes integer
  • Updated the logic in updateRunItem, updateCommentById to create upVotes or downVotes based on the incoming data.

Ticket link - https://topcoder.atlassian.net/browse/PM-2955

@IsInt()
@IsOptional()
upVotes?: number;
upVote?: number;

Choose a reason for hiding this comment

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

[❗❗ correctness]
The upVote field is still defined as an integer in UpdateRunItemCommentDto, whereas it was changed to a boolean in CreateAiWorkflowRunItemDto. Ensure consistency across DTOs unless there's a specific reason for this difference.

Copy link
Contributor

@kkartunov kkartunov left a comment

Choose a reason for hiding this comment

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

@hentrymartin , we can go with proposed structure regardless of mismatch with JIRA spec. Need to work on:

  • Fix the requsted changes on models level
  • Maybe a mistake but not seeing votes included in API response to GET calls to related enpoints. Votes data will be required by the app on front-end.

workflowRunItemCommentId String @db.VarChar(14)
voteType VoteType
createdAt DateTime @default(now()) @db.Timestamp(3)
createdBy String @db.Text

Choose a reason for hiding this comment

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

[❗❗ correctness]
The createdBy field has been changed from String? to String, making it mandatory. Verify that this change is compatible with existing data and logic, as it may cause issues if createdBy is not consistently set.

@hentrymartin
Copy link
Collaborator Author

@hentrymartin , we can go with proposed structure regardless of mismatch with JIRA spec. Need to work on:

  • Fix the requsted changes on models level
  • Maybe a mistake but not seeing votes included in API response to GET calls to related enpoints. Votes data will be required by the app on front-end.

I've updated the PR based on this review comments @kkartunov

@kkartunov kkartunov self-requested a review November 17, 2025 15:36
@hentrymartin hentrymartin merged commit 8e06b9c into develop Nov 17, 2025
6 checks passed
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.

3 participants