Skip to content

[$100] Update business logic behind type/subTrack mapping on the legacy processor #190

Closed
@ThomasKranitsas

Description

@ThomasKranitsas

Current behavior

  • The legacy processor picks the typeId from the payload and fetches the Type from /challenge-types/:typeId
  • Then it uses the Type.abbreviation as the subTrack for the v4 challenge object

This creates confusion as the Type.name does not match with the Type.abbreviation.

Example:

{
  isActive: true,
  abbreviation: "CODE",
  description: "Challenge",
  id: "94eee466-9255-4b60-88d8-4f59c1810dd0",
  legacyId: 39,
  name: "Challenge"
}

Expected behavior

  • The lookup table should be updated (on v5) so Type.name and Type.abbreviation make sense on V5 and should not be set so they can favor v4.
  • The legacy processor should fetch the Type based on the typeId
  • Use the Type.legacyId to call the v4/challenge-types endpoint and find the v4 Type with id === legacyId
  • Use v4 Type. subTrack as the subTrack

This requires changes on the legacy processor as well as the seed file on the Challenge API.

cc @rootelement

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions