It's all about the answers!

Ask a question

Changing asset's community


Andrés Guerrero (20613218) | asked Feb 23 '11, 7:16 a.m.
Hi all,
I'm just wondering if is it possible to move an asset from a community to another via API.
Is it possible?

Thanks!

Regards

Andrs

One answer



permanent link
Gili Mendel (1.8k56) | answered Feb 23 '11, 8:39 a.m.
JAZZ DEVELOPER
Given that you have permissions to move that asset:


session.setWebServiceTimeout(10000);

RAMAsset asset = session.getAsset(new AssetIdentification("8EBA94E9-3778-FFF7-FC19-8EA4E078963A", "1.0"));


System.out.print("Asset's Community: " + asset.getCommunity().getName());
asset.setCommunity(session.getCommunity("Open Source Pilot"));
session.put(asset, new NullProgressMonitor());
System.out.print("\nAsset updated with Community: " + asset.getCommunity().getName());
session.release();

Your answer


Register or 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.