Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,298,598
Community Members
 
Community Events
165
Community Groups

Set Insight field using Automation passing reporter email address smart value to IQL syntax

I created a simple automation to set a value in an Insight Custom Field.
The goal is to use the Reporter Email Address as a parameter in the IQL syntax



rule001.png

When hardcoding the email address "Email" = "reporter_email@domain.com" the rule works.

However when replacing the email value with a Smart Value the rule log info states "No objects were returned from query"

These are the two IQL using smart values I tested with:

"Email" = {reporter.emailAddress.asJsonString}

"Email" = {reporter.emailAddress}



Thanks in advance!


1 answer

1 accepted

1 vote
Answer accepted

Hi @Horacio Escalada 

Try this.

"Email" = "{{reporter.emailAddress}}"

Smart value should be in double quotes.

Ravi 

Thank you @Ravi Sagar _Sparxsys_ Ravi. I enclosed the smart value with double quotes and it does work!

If you want to go "the other way" and get data out of an Insight field that is on an issue the following worked for me using Automation Rules:

 

ApproversJiraField is my Jira customer field of type Insight
ApproverUser is an attribute of type 'User' in the Insight db

Example 1 - this an example of what I put into a "add Comment" Automation.

The app name from insight is {{ApproversJiraField.Name}},   approvers are {{ApproversJiraField.ApproverUser.Name}}, {{ApproversJiraField.Approver2}},
Example 2 - Set assignee based on value from the issue's Insight field.
{
    "fields": {
        "assignee":  { "id":"{{ApproversJiraField.ApproverUser.accountId}}"  }
    }
}
Example 3: - set the Approvers customer Jira field based on a 'User' attribute in the issue's Insight field.  Here Approvers can hold multiple values (array) so converting it an array with square brackets []
{
    "fields": {
        "Approvers": [ { "id":"{{ApproversJiraField.ApproverUser.accountId}}"  } ]
    }
}
Like Horacio Escalada likes this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Service Management

Coming Soon: Insight Changing to Assets

The 2020 acquisition of Mindville added powerful asset and configuration management capabilities to Jira Service Management in the form of Insight. Following the completion of that integration, custo...

299 views 2 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you