2011-04-12 18 views
0

我正在使用API​​來與ActiveCollab系統集成。我試圖添加一些委託人到每次創建新項目時創建的票證。這完全無視我的要求,增加受讓人,這讓我相信我做得不對。通過API調用向受票人添加受理人

這裏是API說明的鏈接,我已經發布了我的代碼的代碼片段以及下面。

ActiveCollab API Tickets

我的代碼:

#set up the first original ticket in ac 
     params2 = urllib.urlencode({ 
       'submitted':'submitted', 
       'ticket[name]': '%s %s estimate to be complete by %s' % (project.pre_quote, project.quote, project.due_date), 
       'ticket[created_by_id]': request.user.id, 
       'ticket[assignees][0]': project.estimator_id, 
     }) 
     req3 = urllib2.Request("http://url/public/api.php?path_info=/projects/%s/tickets/add&token=#########" % project.API_id, params2) 
     f2 = urllib2.urlopen(req3) 

任何幫助將非常感激。

感謝,

史蒂夫

回答

0

下面是答案,如果有人跑進了同樣的問題。

'ticket[assignees][0][]': project.estimator_id 
'ticket[assignees][0][]': another assignee ID 
'ticket[assignees][0][]': and another assignee ID 
'ticket[assignees][0][]': ... 
'ticket[assignees][1]': project.estimator_id 
相關問題