Attributes of type Tags
![]() Hello everyone and thank you in advance. A question maybe simple but I could not find anything about it. Using Java api how should the tags type be treated? That is, for any type of attribute I use the getValue (attribute) but I do not know if it can also be used for this type and especially the return then the chaste with the object that serves me, but in this case it can be multiple, so I thought get me back a list of strings, is that correct? Or is there a type of object to use and then I take it to what I need? Thank you so much again.
|
3 answers
![]()
Ralph Schoon (63.3k●3●36●46)
| answered Jul 20 '18, 5:25 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER the work item commandline has code for tags.
Comments Thank you very much, but I have a small problem, in your example the library "com.ibm.js.team.workitem.commandline.framework.ParameterValue" is used and is treated as a parameter. This is because it is not an attribute, but how can I recover it? Because in the example you build it, but I have the need to retrieve the value from a workItem that continue the attribute of type tags, I tried taking a cue from the example to use the .findAttribute but I come back null :( then I saw that uses it as a list of strings so I figured well, I only have the recovery of the attribute itself :( Thanks again. |
![]()
Ralph Schoon (63.3k●3●36●46)
| answered Jul 20 '18, 8:20 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
@Override protected void execute(WorkItemWorkingCopy workingCopy, IProgressMonitor monitor) throws TeamRepositoryException { IWorkItem workItem = workingCopy.getWorkItem(); workItem.setHTMLSummary(XMLString.createFromPlainText(fSummary)); workItem.setHTMLDescription(XMLString.createFromPlainText(fSummary)); workItem.setCategory(fCategory);</string> |
![]() Here it is, thank you very kind I had just found it but recovered from a higher level (it is not deprecated the getTags and the getTags2 uses the attribute to recover only those of that tag). So now I'm trying both solutions, ie the one I found and the one you posted to me, thank you very much.Can I ask you only a very small detail?So once I have the list I work and ok, I do not have to put anything in luck, I just have to verify that there is a certain tag, but I still have a very strong doubt that is: how do I retrieve the tag attribute in question? Because the tags that I found I want it in input (workItemServer.findTags2 (attribute, monitor), but I can not understand how to pass the attribute as the method I use that is: workItemServer.findAttribute (projectArea, "idAttribute", monitor ); I return null :( Thank you very much for the support anyway.
|
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.