Closed
Description
Current behavior
- The legacy processor picks the
typeId
from the payload and fetches theType
from/challenge-types/:typeId
- Then it uses the
Type.abbreviation
as thesubTrack
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
andType.abbreviation
make sense on V5 and should not be set so they can favor v4. - The legacy processor should fetch the
Type
based on thetypeId
- Use the
Type.legacyId
to call thev4/challenge-types
endpoint and find the v4Type
withid === legacyId
- Use v4
Type. subTrack
as thesubTrack
This requires changes on the legacy processor as well as the seed file on the Challenge API.
cc @rootelement