Skip to content

Can't fully remove profile traits #949

@jmgasper

Description

@jmgasper

REF: https://topcoder.atlassian.net/browse/TAL-95

Steps (in dev)

  • Login with Ghostar / appirio123
  • Go to profiles.topcoder-dev.com
  • Open the Experience panel and delete the single item in there, so that there are no more jobs listed
  • Click Save

Problem 1

The save will fail because it’s trying to save empty trait data, instead of removing the trait completely.

Currently, it tries to PUT and then POST empty data, both of which fail.

Problem 2

Additionally: When a new trait is created, the app is sending both a PUT and a POST. The PUT fails because there’s no trait to update (it’s being created)

Fix 1

When there is no data, the trait should be removed via the DELETE HTTP action.
Sample call: DELETE https://api.topcoder-dev.com/v5/members/Ghostar/traits?traitIds=work

Fix 2

When creating a new trait, we should use the POST. When updating an existing trait to remove or add data (without removing the trait entirely), we should use PUT.

Screenshot

SCR-20231129-icws

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions