Skip to content

Commit

Permalink
fix issue #90: item type identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
dixudx committed Jun 2, 2017
1 parent 430f525 commit 78044ca
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions rtcclient/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,7 @@ def createWorkitem(self, item_type, title, description=None,
wi_url_post = "/".join([self.url,
"oslc/contexts",
projectarea_id,
"workitems/%s" % itemtype.identifier.lower()])
"workitems/%s" % itemtype.identifier])
return self._createWorkitem(wi_url_post, wi_raw)

def copyWorkitem(self, copied_from, title=None, description=None,
Expand Down Expand Up @@ -1102,10 +1102,13 @@ def copyWorkitem(self, copied_from, title=None, description=None,
self.log.info("Start to create a new <Workitem>, copied from "
"<Workitem %s>", copied_from)

projectarea = self.getProjectAreaByID(copied_wi.contextId)
itemtype = projectarea.getItemType(copied_wi.type)

wi_url_post = "/".join([self.url,
"oslc/contexts/%s" % copied_wi.contextId,
"workitems",
"%s" % copied_wi.type.lower()])
"%s" % itemtype.identifier])
wi_raw = self.templater.renderFromWorkitem(copied_from,
keep=True,
encoding="UTF-8",
Expand Down

0 comments on commit 78044ca

Please sign in to comment.