Skip to main content
Skip table of contents

Rank issues (REST API)

After having cloned multiple issues, you can rank the issues according to the original order. To get the ranking of cloned issues, send a POST request to https://deep-clone-for-jira.[REGION].connect.codefortynine.com/clone/rest/rank/clonedIssuesRank with the application/json content-type header and the following JSON body:

You have to replace [REGION] with your hostname suffix. You can find out how to determine your suffix here.

JSON
{
    "ORIG-1": "CLONE-1", // We need the mapping of the original and cloned issues, so the cloned issues are ranked
    "ORIG-2": "CLONE-2", // in the same order as the original issues.
    "ORIG-3": "CLONE-3"
}

If the request was successful, you will receive a response with status code 200 OK and the following body:

JSON
{
    {
        "10019": [
            "CLONE-1",
            "CLONE-2",
            "CLONE-3"
        ],
        "10262": [
            "CLONE-3",
            "CLONE-2",
            "CLONE-1"
        ]
    }
}

In the response above, the Jira instance has two rank fields, customfield_10019 and customfield_10262. The issue rank for each field is included in the response.

Please note that at this point, the cloned issues have not been ranked yet. The response returned is only an indication of the intended ranking.

To actually rank issues, send a POST request to https://deep-clone-for-jira.[REGION].connect.codefortynine.com/clone/rest/rank/rankIssuesForField with the application/json content-type header and the following JSON body (similar to the Jira API endpoint):

JSON
{
    "rankCustomFieldId": 10019,
    "rankAfterIssue": "CLONE-1",
    "issues": [
        "CLONE-2",
        "CLONE-3"
    ]
}

If the request was successful, you will receive a response with status code 204 No Content.

Please note that a different request has to be sent for each rank field. If there are many issues to rank, the request might take a long time and eventually a timeout error. We recommend splitting the issues in batches of 50 issues, and sending a request for each batch.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.