'WorkItemTrackingClient' object has no attribute 'get_comments'
I get this exception when I try to use get_comment or get_comments. I am trying to pull the most recent comment and use it for reporting the correct status. I could see there was another issue reported in June 2019 related to get_comment and get_comments but that was closed as not repro I believe.
Hi following up on this, do you know what could be going wrong here?
Hi @suchir001 , you are probably using the wrong version of the WorkItemTrackingClient. There are three:
released/work_item_tracking/work_item_tracking_client.py v5_1/work_item_tracking/work_item_tracking_client.py v6_0/work_item_tracking/work_item_tracking_client.py
If you do a search for get_comments, you will see that get_comments only exists on the v5_1 and the v6_0 versions. The released version does not have it. This means that the underlying REST API is still in preview.
Try getting the client like this:
wit_client = connection.clients_v6_0.get_work_item_tracking_client()
@tedchamb - awesome thanks a lot Ted! This works. sorry i should have looked. What version of the API does the released version of the library support?
@suchir001 ,
The released clients are 5.1, but they only include those endpoints that have been marked as released. I am not sure for what api version they will mark the comments apis as released.