Changes the type or the gap of a relation. Fields that are not sent keep their values. To set a gap on a relation without one, send gap and gap_type together; to clear the gap, send both as null. After the change, the successor is moved so that its linked date equals the predecessor's linked date plus the gap, and keeps its working duration. If the successor has other predecessors, it is placed by the one that requires the latest date. A completed successor (state 3) or a successor with ignore_planned_dates_recalculation is not moved, but the change is saved.
| Name | Type | Reference |
|---|---|---|
| card_idrequired | integer | Predecessor card ID |
| idrequired | integer | Successor card ID |
| Name | Value |
|---|---|
| Content-Type | application/json |
| Name | Type | Constraints | Description |
|---|---|---|---|
type | enum | [ end-start, start-start, end-end, start-end ] | Which dates are linked, predecessor's date first: end-start: the successor starts when the predecessor ends (finish-to-start) start-start: the successor starts when the predecessor starts (start-to-start) end-end: the successor ends when the predecessor ends (finish-to-finish) start-end: the successor ends when the predecessor starts (start-to-finish) The gap is kept when the type changes |
| gap | integer | minimum: -1000 maximum: 1000 | Offset of the successor's linked date from the predecessor's linked date, in gap_type units. Counted in working time: non-working days and hours are skipped. A negative value moves the successor earlier. When the successor's dates are changed directly, the gap is recalculated to the new distance |
null | No gap. Send together with gap_type: null to clear the gap | ||
| gap_type | enum | [hours,days] | Gap unit |
null | No gap. Send together with gap: null |
| Description | Response type | Example |
|---|---|---|
| Success | Object |
| Name | Type | Description |
|---|---|---|
| source_id | integer | Predecessor card ID |
| target_id | integer | Successor card ID |
| type | string | Relation type: end-start, start-start, end-end or start-end |
| gap | null | integer | Gap in gap_type units, null if the relation has no gap |
| gap_type | null | string | Gap unit: hours or days, null if the relation has no gap |
| author_id | integer | ID of the user who created the relation |
| Description | Response type | Example |
|---|---|---|
| Validation error: unknown type, gap out of range, no fields sent, null sent for only one of gap and gap_type, or only one of gap and gap_type sent for a relation without a gap. also returned with code 53 when moving the successor would shift too many linked cards; nothing is changed in this case | Object |
| Name | Type | Description |
|---|---|---|
| message | string | Error message |
| code | integer | 53 when too many linked cards would be shifted |
| Description | Response type | Example |
|---|---|---|
| Invalid token | String |
| Description | Response type | Example |
|---|---|---|
| The tariff does not include the gantt and resource planning feature | Object |
| Name | Type | Description |
|---|---|---|
| message | string | Error message |
| featurePath | string | Missing tariff feature |
| Description | Response type | Example |
|---|---|---|
| The user cannot edit one of the cards, the relation does not exist, or a card that has to be moved is locked by an asynchronous operation (code 20) | Object | Response body does not exist |
| Name | Type | Description |
|---|---|---|
| code | integer | 20 when a card is locked by an asynchronous operation |
| locked_entity | string | card when a card is locked by an asynchronous operation |
| message | string | Error message when a card is locked by an asynchronous operation |
Change the relation type, the gap is kept
{
"type": "end-end"
}Set a gap of 2 working days
{
"gap": 2,
"gap_type": "days"
}Clear the gap
{
"gap": null,
"gap_type": null
}Path Parameters
1 curl --request PATCH \
2 --url 'https://example.kaiten.ru/api/latest/cards/{card_id}/planned-relation/{id}' \
3 --header 'Accept: application/json' \
4 --header 'Content-Type: application/json'
5 Response
ClickTry It!to start a request and see the response here!