0
我想通过代码使用redmine API创建新问题, 只是为了测试它,我试图使用邮递员将数据发送到API。 我已经使用亚马逊来承载它。redmine创建问题assigned_to_id不起作用
我尝试通过post方法发送json。 (使用邮递员-plugin铬)
URL: - HTTP:// {USER_NAME}:{密码} @ xxxredmine_urlxxx/issues.json
类型: - POST
身体: -
{
"issue": {
"project_id": 1,
"subject": "New ticket via API",
"description": "API test 27\/6",
"status_id": 1,
"priority_id": 3,
"assigned_to_id": 5
}
}
它成功地创建了票,但从来没有设置受让人
{
"issue": {
"id": 61,
"project": {
"id": 1,
"name": "EasySoft"
},
"tracker": {
"id": 1,
"name": "Bug"
},
"status": {
"id": 1,
"name": "New"
},
"priority": {
"id": 3,
"name": "High"
},
"author": {
"id": 1,
"name": "UserName LastName Admin"
},
"subject": "New ticket via API",
"description": "API test 27/6",
"start_date": "2016-06-27",
"done_ratio": 0,
"custom_fields": [
{
"id": 2,
"name": "Customer name",
"value": ""
}
],
"created_on": "2016-06-27T09:37:58Z",
"updated_on": "2016-06-27T09:37:58Z"
}
}
我试图改变assigned_to_id到
"assigned_to":{"id":5}
预先感谢您。
在传递数字之前,我从redmine API获取了id的列表,这样我就不会传递wrng id,同样redmine中的所有用户都被赋予该项目的赋值权限。 – rohan