Hello CGRateS team,
I'm setting up a new ActionPlan in CGRateS DataDB, and trying to use an existing TimingID in that ActionPlan, but the new ActionPlan gets created without the
"Years", "Months", "MonthDays" and "WeekDays" as defined in the assigned "TimingID". Please let me know if this is a bug OR if I'm doing something wrong.
1/ Confirm that the required TimingID already exists in DataDB.
{
"id": {{$randomInt}},
"method": "APIerSv1.GetTiming",
"params": [
{
"ID": "TIMING_ID_01"
}
]
}
{
"id": 594,
"result": {
"ID": "TIMING_ID_01",
"Years": [
2026,
2027
],
"Months": [
1,
4,
7,
10
],
"MonthDays": [
1
],
"WeekDays": [
0,
1,
2,
3,
4,
5,
6
],
"StartTime": "01:59:59",
"EndTime": "02:59:59"
},
"error": null
}
2/ Create a new ActionPlan in DataDB, and use the existing TimingID "TIMING_ID_01".
{
"id": {{$randomInt}},
"method": "APIerSv1.SetActionPlan",
"params": [
{
"Id": "ACTION_PLAN_01",
"ActionPlan": [
{
"ActionsId": "ACTION_RESET_TRIGGERS",
"TimingID": "TIMING_ID_01",
"Time": "01:59:59",
"Weight": 10
}
],
"Overwrite": true,
"ReloadScheduler": true
}
]
}
{
"id": 396,
"result": "OK",
"error": null
}
3/ Fetch the newly created ActionPlan from DataDB.
{
"id": {{$randomInt}},
"method": "APIerSv1.GetActionPlan",
"params": [
{
"Id": "ACTION_PLAN_01"
}
]
}
{
"id": 186,
"result": [
{
"Id": "ACTION_PLAN_01",
"AccountIDs": null,
"ActionTimings": [
{
"Uuid": "d8902e5f-bc8a-4f1e-81c4-89e844b83ff9",
"Timing": {
"Timing": {
"ID": "TIMING_ID_01",
"Years": [],
"Months": [],
"MonthDays": [],
"WeekDays": [],
"StartTime": "01:59:59",
"EndTime": "02:59:59"
},
"Rating": null,
"Weight": 0
},
"ActionsID": "ACTION_RESET_TRIGGERS",
"ExtraData": null,
"Weight": 10
}
]
}
],
"error": null
}
Here, the response shows the ActionPlan we just created, but the Timings object is completely missing the values for "Years", "Months", "MonthDays" and "WeekDays", as they were defined in the assigned TimingID. The only value it populated from the TimingID is for "EndTime". Is this expected OR a bug?
Also, when creating a new ActionPlan, "Time" is a mandatory property in the request payload for method "APIerSv1.SetActionPlan", otherwise it gives an error back saying "MANDATORY_IE_MISSING:Action:ACTION_RESET_TRIGGERS:[Time]". But if I'm already assigning a "TimingID" to the new ActionPlan, and that
"TimingID" has a "StartTime" defined in it, why does it still need the "Time" property with a value? Isn't that a duplicated effort?
Thanks,
Sal