WI queries and Results question
Hello,
I have some questions about the way to get values from a WI. I customize a WI and i'm trying to do some queries. After this point: IQueryResult<IResolvedResult<IWorkItem>> result = queryService.getResolvedExpressionResults(prjAreaHandle, term2, IWorkItem.FULL_PROFILE); while (result.hasNext(null)){ IWorkItem myWI = result.next(null).getItem(); MyIWorkItem custom = new MyIWorkItem(myWI); ***** } ****I have a Class (MyIWorkItem) which contains several attributes: id, appname, owner, etc. I found several values but i still looking for some others. Is it supposed that "IWorkItem.FULL_PROFILE" above in the method brings all the record for every WI in the result? Does exists some methods as findAttributeValue(String AttributeName) or similar??? How can i find those values then?? Thanks in advance |
2 answers
Hi,
First, "IWorkItem.FULL_PROFILE" is used to bring all attributes from an WorkItem. SMALL_PROFILE < DEFAULT_PROFILE < MEDIUM_PROFILE < LARGE_PROFILE < FULL_PROFILE Second, there is the method
Note that this code works on server side. If you want to use at client side you must access the findAttribute method from IWorkItemClient |
Hi Eduardo,
I learned a lot of things reading your plug-ins posts a few weeks ago. They are really interesting. Thanks for your answer. I used the IWorkItemClient as you suggested and it works very good. Now i have a similar problem: In my WI there is a link to the build. In this build, ( IBuildResult object) I cannot found the person who made the Request. And i have the same problem with the IBuildDefinitionInstance object and the "Project or Team Area" field. I have something like this:
Thanks for your help. |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.