I am trying to organize my assets and get them assigned to owners for management and tickets, can a dynamic asset tag be created based on the owner of the asset?
This can be done by leveraging a Groovy Tag using the following: return asset.user !=null && asset.user.username == '*****' (replace ***** with username) I would recommend contacting your Technical Account Manager for additional guidance/training related to Groovy Scriptlets.
Joe, I tried this search and the count never rises above zero for this tag. My groovy script:
if (asset.getAssetType()!=Asset.AssetType.HOST) return false;return asset.user.username == 'user_name';
I also tried the last line exactly like you specified and got the same results:
return asset.user !=null && asset.user.username == '*****'
Yes, the username I'm using is correct.
Would you know if Groovy is enabled on your account?
Where would I find that setting? If it lets me select Groovy when creating an asset tag, then logically it should be enabled. Otherwise it shouldn't let me specify Groovy. But that would be too logical. BTW, this isn't the only problem I've had with dynamic asset tags. I have an open ticket (for weeks now) because my dynamic tag based on an XML asset search doesn't work. And I was given that XML asset search by my TAM. I have a tag for assets that haven't been scanned in over 60 days. The number keeps going higher, and when I search for assets with that tag I find that they have been recently scanned. I have zero confidence that dynamic asset tags actually work.
Retrieving data ...