It's all about the answers!

Ask a question

Add a custom attribute of type Contributor list to a work item programmatically (Java API)


Karim Riad (1189) | asked Aug 30 '12, 10:47 a.m.
Hello,
Please I need to know how to put a custom attribute of type Contributor list to a work item programmatically (via the Java Plain client API).
I am able to do it if the custom attribute is of type Small String:
IAttribute attribute = service.findAttribute(projectArea, "internalState", monitor);
workItem.setValue(attribute, "karim");

But I need to know how to do so if the custom attribute is of type Contributor list..
Thank you so much in advance.

One answer



permanent link
Nate Decker (37814059) | answered Jun 17 '15, 10:01 a.m.

I have the same question. Have you discovered the solution since you originally posted this question?

I think your question could use some clarification though. Your title implies you are actually adding a new attribute to an existing work item, but your problem description implies that what you are actually trying to do is add a contributor to an existing contributor list attribute. Those are very different objectives.

I've done this successfully with the Subscribers list, but that seems to be a special built-in attribute. There is a function "getSubscriptions().add(contributor)". For a custom attribute of type "Contributor List", I would need an equivalent capability.

Your answer


Register or to post your answer.