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

Creating an Asset with multiple owners?

Hi All.

How we do we this?

I can be done in the web gui, but I can not work out how to do it from script.

This is what I have so far. The issue with it is that it creates the Asset with the owner set to the second one. Not the first.


<ram>
<ram>
<ram>
<ram>DR ${release.name}-${release.version}_${environment.name}</ram>
<ram>${release.version}</ram>
<ram>Deployment</ram>
<ram>Deployment Record</ram>
<ram>Deployment Request for ${release.name}-${release.version} into ${environment.name}</ram>
<ram>Deployment Request for ${release.name}</ram>
<Add>
<Is>
<These>
<ram>
<ram>${ram.asset.owner}</ram>
</ram>
<ram>
<ram>${ram.asset.additional.owner}</ram>
</ram>
<ram>
<ram>All</ram>
</ram>
<Create>
<ram>
<ram>
</ram>
<ram>
<ram>
</ram>
</ram>
</ram>


-Chris

0 votes



4 answers

Permanent link
hate that.


<ram:modify server="ramServer">
<ram:search query="name:(DR ${release.name}-${release.version}_${environment.name}) version:(${release.version})" />
<ram:asset>
<ram:name>DR ${release.name}-${release.version}_${environment.name}</ram:name>
<ram:version>${release.version}</ram:version>
<ram:community>Deployment</ram:community>
<ram:assetType>Deployment Record</ram:assetType>
<ram:description>Deployment Request for ${release.name}-${release.version} into ${environment.name}</ram:description>
<ram:shortDescription>Deployment Request for ${release.name}</ram:shortDescription>
<!-- Add in extra, custom, mandatory attributes. -->
<!-- Is a build fails due to wierd errors - check the values here. -->
<!-- These values are mostly sourced from settings.xml -->
<ram:attribute name="Owner">
<ram:value>${ram.asset.owner}</ram:value>
</ram:attribute>
<ram:attribute name="Owner">
<ram:value>${ram.asset.additional.owner}</ram:value>
</ram:attribute>
<ram:attribute name="Deployment Type">
<ram:value>All</ram:value>
</ram:attribute>
<!-- Create needed references -->
<ram:relatedAsset type="Deployment of">
<ram:asset guid="${releaseAssetGUID}" />
</ram:relatedAsset>
<ram:relatedAsset type="Hosted By">
<ram:asset guid="${environmentAssetGUID}" />
</ram:relatedAsset>
</ram:asset>
</ram:modify>

-Chris

0 votes


Permanent link
You can't set owners of an asset through the ANT tasks. Owner isn't a
attribute. The submitter is the owner.

Rich

0 votes


Permanent link
Not quite what I asked.
Actually it does work, as when I specified someone else, someone other than (me) the user who logged on, they were recorded as the Asset owner.
So I take it we can not add additional owners, like we can through the GUI?
-Chris
You can't set owners of an asset through the ANT tasks. Owner isn't a
attribute. The submitter is the owner.

Rich

0 votes


Permanent link
On 11/20/2011 6:23 PM, chrisgwarp wrote:
Not quite what I asked.
Actually it does work, as when I specified someone else, someone other
than (me) the user who logged on, they were recorded as the Asset
owner.

I don't see how that is possible. Maybe someone created an attribute
called Owner on their own, and that is what you see. But RAM doesn't use
any attribute by the name of Owner to set the official Asset Owners.
I've looked at the code and it just doesn't do that.

If you or some administrator on your system had created a multi-valued
Owner attribute then you should be able to have more than one. But if
your administrator created it as single valued then only one could be set.

Also, this is not the correct way to set a multi-valued attribute:
<ram>
<ram>${ram.asset.owner}</ram>
</ram>
<ram>
<ram>${ram.asset.additional.owner}</ram>
</ram>

To do a multi-value use:

<ram>
<ram>${ram.asset.owner}</ram>
<ram>${ram.asset.additional.owner}</ram>
</ram>

But I must stress this won't set the official Asset Owners. It will only
set a multi-valued attribute that someone just happened to call Owner.
--
Rich Kulp
Rational Asset Manager developer

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

Question asked: Nov 17 '11, 11:49 p.m.

Question was seen: 10,934 times

Last updated: Nov 17 '11, 11:49 p.m.

Confirmation Cancel Confirm