[#154] Add Service API - Recurring Setting

Migrated from Redmine #154 | Author: Rohit Bhattad
Status: New | Priority: Normal | Created: 2018-05-02


In Add Service API, I am able to create a service without recurring option but when i use recurring option, I get an error. Attached json payload and error that I am getting.

Redmine Admin wrote:

there is nothing attached. Please attach it as plain text, no as file

Rohit Bhattad wrote:

{“jsonrpc”:“2.0”,
“method”:“addService”,
“params”:[{“name”:“Rohit Bradsol”,
“duration”:“120”,
“hide_duration”:“0”,
“description”:“Service description”,
“is_public”:“1”,
“is_active”:“1”,
“position”:“1”,
“file_id”:null,
“seo_url”:null,
“is_recurring”:“1”,
“picture”:null,
“picture_sub_path”:null,
“picture_path”:null,
“recurring_settings”:{
“days”:5,
“repeat_count”:30,
“type”:“fixed”,
“mode”:“skip”,
“is_default_settings”:true,
“days_names”:[
“Monday”,
“Tuesday”,
“Wednesday”,
“Thursday”,
“Friday”
]
},
“units”:null,
“price”:0,
“currency”:“AUD”
}],“id”: 1
}

{
"result": {
    "result": false,
    "errors": [
        {
            "field": "recurring_settings",
            "errors": [
                "Error occured for recurring options. Please try again"
            ]
        }
    ]
},
"id": "1",
"jsonrpc": "2.0"

}

Redmine Admin wrote:

please add “is_recurring”:“1” flag to recurrent settings object also