Get :class:`rtcclient.workitem.Workitem` object by its id/number

        :param workitem_id: the workitem id/number
            (integer or equivalent string)
        :param returned_properties: the returned properties that you want.
            Refer to :class:`rtcclient.client.RTCClient` for more explanations
        :return: the :class:`rtcclient.workitem.Workitem` object
        :rtype: rtcclient.workitem.Workitem

def getWorkitem(self, workitem_id, returned_properties=None):
        """Get :class:`rtcclient.workitem.Workitem` object by its id/number

        :param workitem_id: the workitem id/number
            (integer or equivalent string)
        :param returned_properties: the returned properties that you want.
            Refer to :class:`rtcclient.client.RTCClient` for more explanations
        :return: the :class:`rtcclient.workitem.Workitem` object
        :rtype: rtcclient.workitem.Workitem
        """

        try:
            if isinstance(workitem_id, bool):
                raise ValueError("Invalid Workitem id")
            if isinstance(workitem_id, six.string_types):
                workitem_id = int(workitem_id)
            if not isinstance(workitem_id, int):
                raise ValueError("Invalid Workitem id")

            workitem_url = "/".join([self.url,
                                     "oslc/workitems/%s" % workitem_id])

            rp = self._validate_returned_properties(returned_properties)
            if rp is not None:
                req_url = "".join([workitem_url,
                                   "?oslc_cm.properties=",
                                   urlquote(rp)])
            else:
                req_url = workitem_url
            resp = self.get(req_url,
                            verify=False,
                            proxies=self.proxies,
                            headers=self.headers)
            raw_data = xmltodict.parse(resp.content)
            workitem_raw = raw_data["oslc_cm:ChangeRequest"]

            return Workitem(workitem_url,
                            self,
                            workitem_id=workitem_id,
                            raw_data=workitem_raw)

        except ValueError:
            excp_msg = "Please input a valid workitem id"
            self.log.error(excp_msg)
            raise exception.BadValue(excp_msg)
        except Exception as excp:
            self.log.error(excp)
            raise exception.NotFound("Not found <Workitem %s>" % workitem_id)