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

Supporting v5 scorecard id #246

Open
callmekatootie opened this issue Aug 20, 2021 · 1 comment
Open

Supporting v5 scorecard id #246

callmekatootie opened this issue Aug 20, 2021 · 1 comment

Comments

@callmekatootie
Copy link
Contributor

We tried to update scorecardId to support both v5 and legacy but ES complained - it seems to have already mapped scorecardId to a number and thus does not support uuids for that field.

As of now, we intend to keep scorecardId as a legacy scorecard id and have a new field named v5ScorecardId to support uuids.

Logging this ticket as a tech debt

@callmekatootie
Copy link
Contributor Author

callmekatootie commented Aug 21, 2021

NOTE - The new field v5ScoreCardId is internal only. The request clients will continue to use scoreCardId in the review, and depending on whether it is a legacy or v5 id, submission api processes the review. In the tests, you would never pass v5ScoreCardId attribute, but instead pass the v5 scorecard id in the scoreCardId attribute and expect the submission api to handle it

Tests to carry out for the new field:

Create Reviews

  • POST /reviews with legacy scorecard id - Should work. The returned review should contain legacy scorecard id but NOT v5 scorecard id
  • POST /reviews with v5 scorecard id - Should work. The returned review should contain legacy scorecard id AND v5 scorecard id
  • POST /reviews with v5 scorecard id that does not exist in this list - it should result in 400 status code with the message Legacy scorecard id not found for the provided v5 scorecard id

Update Reviews

  • PATCH /reviews/:reviewId with legacy scorecard id - should work ONLY IF the review did not have a v5 scorecard id before. Else it should result in error. The returned review should NOT contain v5 scorecard id
  • PATCH /reviews/:reviewId with v5 scorecard id - should work. The returned review should contain both legacy and v5 scorecard id
  • PUT /reviews/:reviewId with legacy scorecard id - should work ONLY IF the review did not have a v5 scorecard id before. Else it should result in error. The returned review should NOT contain v5 scorecard id
  • PUT /reviews/:reviewId with v5 scorecard id - should work The returned review should contain both legacy and v5 scorecard id
  • PUT or PATCH with a v5 scorecard id that does not exist in the list - it should result in 400 status code with the message Legacy scorecard id not found for the provided v5 scorecard id

Query for Reviews

  • GET /reviews?scoreCardId with legacy scorecard id - Should work. The returned reviews should contain legacy scorecard id and may or may not contain v5 scorecard id
  • GET /reviews?scoreCardId with v5 scorecard id - Should work. The returned reviews should contain legacy scorecard id as well as v5 scorecard id
  • GET /reviews?scoreCardId with v5 scorecard id that does not exist in this list - it should result in 400 status code with the message Legacy scorecard id not found for the provided v5 scorecard id

Query Submission

  • GET /submissions?review.scoreCardId= with legacy scorecard id should work. The returned submissions may or may not contain the review (depending on the role of the user making the request). If the review is returned, it may or may not contain v5 scorecard id, but will contain legacy scorecard id
  • GET /submissions?review.scoreCardId= with v5 scorecard id should work. The returned submissions may or may not contain the review (depending on the role of the user making the request) If the review is returned, it may or may not contain v5 scorecard id, but will contain legacy scorecard id
  • GET /submissions?review.scoreCardId= with a v5 scorecard id that does not exist in the list - it should result in 400 status code with the message Legacy scorecard id not found for the provided v5 scorecard id

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

No branches or pull requests

1 participant