Advertisement
ikseek

Untitled

Aug 29th, 2016
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.56 KB | None | 0 0
  1. fb=FogBugz('http://fogbugz.unity3d.com')
  2. fb.logon(LOGIN, PWD)
  3. IXSTATUS_RESOLVED_DUPLICATE = 42
  4. case = 2
  5. duplicate_of = 1
  6. res = self.fb.search(q=str(case), cols='ixBugEventLatest')
  7. latest_event = res.ixbugeventlatest.string
  8. api = slumber.API("http://fogbugz.unity3d.com/f/api/0")
  9. payload = {
  10.     'ixDuplicateOf': int(duplicate_of),
  11.         'ixStatus': IXSTATUS_RESOLVED_DUPLICATE,
  12.             'sCommand': "resolve",
  13.     'ixBugEventLatest': int(latest_event)
  14. }
  15. # post to http://fogbugz.unity3d.com/f/api/0/cases/2?token=fb.token
  16. api.cases(case).post(payload, token=fb._token)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement