Hi,
I have a custom field (Assets Object), where i have different options objects. Now i want to make a simple automation rule where i send the value of this custom field from a ticket into an email.
So I have configured automation that says, when a ticket is created on this issue type - send an email:
This is a simple rule - and works just fine BUT - being an Assets field - it gets me the value of the field + the ID from the Assets - the result i get on email being:
The Impact is: Very High (HOF-8057)
How do i get rid of the ID ? i tried {{issue.customfield_11406.name}} - doesn't get me anything.
Thanks
Found the solution - the documentation is a bit wrong or hard to understand.
The solution for those who want to get just the name of the Object and Not the ID, in the server/datacenter editions is to use the formula: {{"Name of your field".summary}} works also with
{{issue.customfield_12345.summary}}
for me is more easy use the name of the field as appears in the issue, for example:
{{computer.ID}} or {{computer.user}}
but if the field is configured for supports more than one value, you you should use the sintax:
{{#computer}}{{value}}{{/}}
This sintax create a loop and write all values of the field
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are on the right track.
Just use:
But do note that it is case sensitive. If you use an uppercase in the naming of your attributes in the objectschema, then you need to use it also here.
And 'label' is a special attribute, in the object schema it is mostly used to name your object. But you can have the name attribute called e.g.: Name Nome, Navn, Nom
And with the label you can refer them all as 'label'.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rudy, thanks for jumping in on this.
I have tried all the options with:
I have even created my own attribute etc...nothing works - the email it's coming blank where the value of this field should be.... as i said, if i use just {{issue.customfield_11406.name}} works but if i add anything after - it's getting nothing - i need to research more..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could post the JSON of an issue:
https://{yoursite}.atlassian.net/rest/api/latest/issue/{issue}?expand=names
And
A screenshot of the CMDB object you are referring to in that issue?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sure, here is all the information (I'm in datacenter edition):
Here is the JSON - as you can see, there is nothing else:
So i think this is the problem, that even in the Json, there is nothing else...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Earlier you showed customfield_11406 and now customfield_11415 is this a mistake?
And you are on server (I assumed Cloud), so there could be differences.
You might be able to do a REST API call to get the correct attribute. To do so, you need to add a send web request to
{yoursite}/rest/assets/{version}/object/{issue.customfield_1106.id}/attributes
Use the GET method and add the correct headers (Content-Type: application/json & Authorization: Basic XXXX) Where XXXX is the API-key.
Use the checkbox to wait for a response)
With {{webResponse.body}} you can find the attribute value you are looking for.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.