Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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 {
.....

0 votes



One answer

Permanent link
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");
}
}

0 votes

Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,940

Question asked: Oct 25 '11, 4:07 a.m.

Question was seen: 4,509 times

Last updated: Oct 25 '11, 4:07 a.m.

Confirmation Cancel Confirm