pythonrational-team-concert

rtcclient ownedBy returns User ID and not email address


I am using the Python package rtclcient (v0.6.0) to get info from work item. Some of the properties I am querying from my RTC work item include:

returned_properties_list = [
    "rtc_cm:modifiedBy",
    "dc:modified",
    "rtc_cm:contextId",
    "dc:subject",
    "oslc_cm:priority",
    "dc:creator",
    "rtc_cm:due",
    "rtc_cm:estimate",
    "rtc_cm:correctedEstimate",
    "rtc_cm:timeSpent",
    "rtc_cm:startDate",
    "dc:created",
    "rtc_cm:resolvedBy",
    "rtc_cm:plannedFor",
    
    "rtc_cm:ownedBy",
]

When the query for these items finish and I examine the returned variables, I notice that the 'ownedBy' value is the user's id, not their email address. enter image description here If I look at the value of raw_data['rtc_cm:ownedBy']['@rdf:resource'] it is a link which goes to that user's profile.

On the profile I can see the same User ID which is being recieved as the 'ownedBy' value. enter image description here Also on the profile is the User's E-mail Address. This email address value is what I need, but I can't seem to find a way to query for this value using the rtcclient python package.

I've tried adding "rtc_cm:emailAddress" to my query properties but no luck,

Can anyone help me get the ownedBy user email address for a RTC ticket using the rtcclient package? Thanks


Solution

  • fixed by cloning the rtcclient repo, and adding my own custom function getUserEmail