create workitem automaticly in background
Dear all
I have two question : 1. I want to create workitem automaticly by right click a file in package explorer, I work based on com.ibm.team.workite.common.sample which will prompt a workitem edit window, so how to create workitem without display the window. 2. I have one customized attribute, how to set the value of this attribute. maybe in WorkItemInitialization protected void execute(WorkItemWorkingCopy workingCopy, IProgressMonitor monitor) throws TeamRepositoryException { ..... |
One answer
For the second question, I have solved by this solution:
List<IAttribute> attributes=client.resolveAuditables(workItem.getCustomAttributes(),IAttribute.FULL_PROFILE, monitor); for (Iterator<IAttribute> e = attributes.iterator(); e.hasNext();) { IAttribute aa = (IAttribute) e.next(); aa.getDisplayName(); System.out.println ("==The attribute is"+aa.getDisplayName()); if (aa.getDisplayName().compareTo(PRGANME_VALUE)==0) { workItem.setValue(aa, "AAAA.JAVA"); } } |
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.