Skip to main content

Change kanban stage

Changes the properties of the existing kanban or My plan stage

Function UpdateKanbansStage(Val URL, Val Name, Val StageID, Val Color = "", Val PrevStageID = 0, Val AsAdmin = False, Val Token = "") Export

ParameterCLI optionTypeDescription
URL--urlStringURL of webhook or a Bitrix24 domain, when token used
Name--titleStringNew stages name
StageID--stageString, NumberStage ID for change
Color--colorStringHEX of new stage color
PrevStageID--prevstageString, NumberStage ID, after which the selected stage should be inserted
AsAdmin--adminBooleanAllows you to add stages without checking permissions (for administrators)
Token--tokenStringAccess token, when app auth method used

Returns: Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API


tip

Method at API documentation: task.stages.update


Code example
    Name    = "New stage name";
Color = "000000";
StageID = "498";

URL = "https://b24-ar17wx.bitrix24.by/rest/1/1o2...";

Result = OPI_Bitrix24.UpdateKanbansStage(URL, Name, StageID, Color);

Name = "New stage name 2";
Color = "000000";
StageID = "500";

URL = "b24-ar17wx.bitrix24.by";
Token = "b529cb66006e9f06006b12e400000001000...";

Result = OPI_Bitrix24.UpdateKanbansStage(URL, Name, StageID, Color, 6, True, Token);
CLI command example
    
oint bitrix24 UpdateKanbansStage --url "b24-ar17wx.bitrix24.by" --title %title% --stage "320" --color "000000" --prevstage %prevstage% --admin %admin% --token "fe3fa966006e9f06006b12e400000001000..."

Result
{
"result": true,
"time": {
"start": 1720816577.57757,
"finish": 1720816577.66624,
"duration": 0.0886678695678711,
"processing": 0.059006929397583,
"date_start": "2024-07-12T20:36:17+00:00",
"date_finish": "2024-07-12T20:36:17+00:00",
"operating_reset_at": 1720817177,
"operating": 0
}
}