Hello,
On a Data Center instance I create an issue when an asset object is created (using the Assets automation rules). In the Create transition of the issue I need to set in a text custom field the name of the object type of the connected asset (there is a custom field of type Asset object, which is set with the corresponding object). I tried with the Assets postfunction that copies object attribute value to custom field, but I cannot make it work and nothing is set in the custom field. Any ideas on how this can be done?
Thanks!
HI @Boyan Angelov (Nemetschek Bulgaria)
You probably need another automaton rule that is triggered after this rule ends.
In cloud you have the option to refresh the data of an issues inside an automation rule, but in DC this is not possible (I think).
The custom field needs to be populated before you can use the value in it and if this is set in an automation rule, then the issue needs a re-index, before this information can be used in automation.
So within Cloud there is an action for this in automation, to do this in the active rule, but in DC I think you can't do this and there for need an additional automation rule
Hi Marc,
Thanks for the quick response. However I could not understand what automation rule you refer to. The Automation I use to automatically create a ticket when asset is created belongs to the Assets automations, not Jira automations. I do not think I can use either to fetch the name of the object type and copy it in a custom field on DC. Or am I wrong? My hope was that I can use the Assets postfunction in the workflow, but so far I was not able to make it work.
Cheers,
Boyan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Boyan Angelov (Nemetschek Bulgaria)
Object type names are not fetch able.
Reading documentation this should be possible on object attributes see https://confluence.atlassian.com/servicemanagementserver/post-functions-1044784443.html#
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Marc - Devoteam ,
I cannot seem to find the right "object attribute name" to use to fetch the name of the object type. I tried with "Object Type", "objectType", "objecttype", etc... but nothing seems to work. I am starting to think it is not supported at all...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Boyan Angelov (Nemetschek Bulgaria)
Objecttype can only be used for context on a field or in an aql.
The name of the object type can be used.
You could create objects in an object type with a name equal as the object types, then you should be able to get the name of any of these objects
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Marc - Devoteam ,
I use the Name attribute of the objects for the real name of the object, so I cannot place there the object type name. I do not want the users to have to select the object type name in an attribute when creating an object, but I cannot see how this can be done automatically, any ideas?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Boyan Angelov (Nemetschek Bulgaria)
Create extra object attribute under the existing object type and name the attribute as the object type, then you can use names of these attributes to fill a custom text field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Let me see if I understand you correctly. The idea is to have an attribute of, let's say Text type, named the same as the Object type? How do I fetch that name in the postfunciton afterwards? The postfunction extract attribute values, not the name of the attributes, right? What am I missing here?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Boyan Angelov (Nemetschek Bulgaria)
If the attribute is a text field you should be able to get the value of that attribute.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Marc - Devoteam ,
I know that if I have a text attribute in the asset I can get the value of that attribute and copy it to a custom field. I am not sure though that I can make a text asset attribute that will have as value the name of the asset object type automatically, that is what I cannot figure out how to do.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Boyan Angelov (Nemetschek Bulgaria)
That is something you will have to put in manually or by import.
You can't set the object type name in an objects attribute automatically.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yeah, that is what I feared as well. Thanks anyway, I will have to see what to do, seems like the manual job cannot be skipped here...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.