Skip to content

Moving all threads from one challenge to another #686

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

Open
jmgasper opened this issue May 5, 2022 · 0 comments
Open

Moving all threads from one challenge to another #686

jmgasper opened this issue May 5, 2022 · 0 comments

Comments

@jmgasper
Copy link
Collaborator

jmgasper commented May 5, 2022

We would like to add a new endpoint to the REST API of the forums that will move a forum from one challenge to another. This will be used for things like reposts of a challenge, where we want to keep all the original questions and answers available.

New API

The new endpoint should be POST /groups/move with a body like:

{ 
  "originalChallengeId":{GUID},
  "newChallengeId":{GUID},
  "movePermissions":bool, optional
}

Where the "GUID" for each item is the v5 challenge API ID of the challenge. Note that we want to accept the challenge IDs, NOT the group ID, because this will likely be called externally from support tools or the platform that won't know what group ID matches a given challenge ID. You will need to make sure your code internally handles the mapping of challenge ID to internal group ID.

Code

Please look at the code for the groups plugin, which includes the REST API for the current groups paths:
https://github.com/topcoder-platform/forums-groups-plugin

We will target the "develop" branch of all dependencies, but there shouldn't currently be any difference between "develop" and "master" for anything.

What to move

  • We will want to move all threads / groups in the same structure
  • Access permissions should be left as they are for the new challenge, *unless the "movePermissions" flag in the body is set to "true". If "true", then all permissions should be move from the original challenge to the new challenge forums as well.
    • The default for "movePermissions" should be "false"
    • If "movePermissions" is "true", all notifications / watches should be moved as well

Use case

If a challenge fails, like due to a failing review or no submissions, it can be reposted. When a challenge is reposted, it's useful to have the original forum questions and answers available to the repost, to avoid confusion and redundant questions and answers. Currently, for a copilot or Topcoder support, moving the old questions and answers is a manual process. Adding in the new REST API to move the group threads from one challenge forum to a new challenge forum will allow us to automate the repost process.

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