We have contractors and a separate section in our assets for the contractor laptops. When a laptop is assigned to one of those contractors, a contract is sent to them that contains the device information and price.
I want to setup an automation that sends the applicable device information to the right people via email when I assign the device to someone.
I figured out how to trigger the event based on adding the information to a ticket but now I can't get the automation smart values right. Part of the information lives inside the asset, which is getting associated to the ticket.
The field names are included in the screenshot but I can't get it to pull the data. The email is coming back blank.
I was able to get these fields figured out (with Mark's help but thought I'd summarize), in case anyone else is looking for something similar.
{{issue.G7 Contractor Name.label}}
{{issue.G7 Affected Laptop - Contractor.label}}
{{issue.G7 Affected Laptop - Contractor.Manufacturer.name}} {{issue.G7 Affected Laptop - Contractor.Model Name.name}}
{{issue.customfield_10178.Cost}}
Which returns:
John Smith
GAME7LT0120
Dell Vostro 15 5510
$930.05
The top 4 are pulling from fields that are objects in Jira Assets.
Hi @Ashley McDonnell and welcome to the community!
If I understand correctly, G7 Affected Laptop - Contractor is an asset field. If I'm correct on this, you can use what I have below to get the relevant object attribute information from the field:
NOTE - Without visibility into your object schema, I'm basically making assumptions:
{{issue.G7 Affected Laptop - Contractor.Owner.displayName}}
{{issue.G7 Affected Laptop - Contractor.label}}
{{issue.G7 Affected Laptop - Contractor.model name}}
{{issue.G7 Affected Laptop - Contractor.cost}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I put these in and tested it. It pulled the Device name but none of the other information. I have more screenshots for you in case that helps. Also, the contractor is linked to the ticket as well so I was trying to pull their name from that field instead of owner of the device. Not sure which way is easier.
This screenshot is from the ticket (issue) where you can see both the contractor that is assigned and the affected laptop field with the device name, which is what the email did successfully populate with.
I was able to pull the contractors name from the ticket successfully into the email with
{{issue.G7 Contractor Name.label}}
This is what I see if I select the affected laptop object from the ticket so that you can see the additional fields I'm trying to pull the data from.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for sharing the screenshots. This helps.
Regarding Contractor name, neither way of pulling it is really better so you should be fine leaving as is.
I see now that Model Name is referencing another object so that would change to something like this:
{{issue.G7 Affected Laptop - Contractor.Model Name.label}}
Not being able to pull in Cost is puzzling. Perhaps case sensitivity is in play. In my original answer, I kept it lower case but I see the attribute is upper case. It shouldn't be case sensitive, but just in case, let's try:
{{issue.G7 Affected Laptop - Contractor.Cost}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No changes. Is it having issue because I want it to pull the object details from a connected object but it's not a direct field inside the ticket? I'm still learning so asking to gain the knowledge.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hmm... I just verified in my environment. I found that using label wasn't working for me so for Model Name you'll need to use whatever the Model Name object is using. For example, if it uses "Name", it would be something like this:
{{issue.G7 Affected Laptop - Contractor.Model Name.Name}}
I did confirm that attribute names are case sensitive so Cost needs to be capitalized. I don't see any other issues other than perhaps the field name containing a "-". You could try addressing that by using the custom field ID
{{issue.customfield_xxxxx.Cost}}
You can get the custom field id by starting to type out JQL and then using ORDER BY "G7 Affected Laptop - Contractor". In the type ahead helper, it will provide the custom field ID in the form of cf[12345]
I hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I figured out 4 of the five. The last one that I can't figure out is the serial number (called Service Tag now, changed from "Serial #" in the screenshot).
I've tried.
{{issue.G7 Affected Laptop - Contractor.Service Tag.name}}
{{issue.G7 Affected Laptop - Contractor.Service Tag.description}}
{{issue.G7 Affected Laptop - Contractor.Service Tag.summary}}
It doesn't like any of these. And the field isn't listed in my custom field options in the settings, now is it listed in the JQL search so I can't call it out by field ID.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Ashley McDonnell - You should only need the field name.attribute. You only need to add things like .name if the attribute is referencing another object. So, it should work with just this:
{{issue.G7 Affected Laptop - Contractor.Service Tag}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Mark Segall You're amazing. The one thing that I didn't consider trying. This is resolved and working like a charm. Couldn't have done it without you.
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.