Automation - question

Christopher Yepez May 20, 2024

Hello people,

So, i am trying to setup a automation so that at the end of the day my boss can get an email showing

Help Desk Tech 1:

All tickets assigned to him currently

 

Help Desk Tech 2:

All tickets assigned to him currently

 

i am trying to use this:

{{lookupIssues.assignee.displayName.distinct}},

Here are the list of issues assigned currently 

{{#lookupIssues}}
* {{key}} | {{summary}} | {{assignee.displayName}} | {{url}}
{{/}}

but the email is empty.

 

Thank you for your help inadvance!

2 answers

0 votes
Kalyan Sattaluri
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 20, 2024

Hello @Christopher Yepez 

Need more details about your post.

Are "Help Desk Tech 1" and "Help Desk Tech 2" different projects?

Which project has your current rule?

If those are multiple projects, does your rule have the scope of these other projects?

About your lookupIssues JQL, have you logged {{lookupIssues.size}} to see if you are retrieving expected results?

Please share complete screenshot of your rule and audit log so community can help.

Thanks!

Christopher Yepez May 20, 2024

Censored.

0 votes
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 20, 2024

Hey Christopher - Welcome to the Atlassian Community!

Can you share the entire rule that you have? 

 

Christopher Yepez May 20, 2024

Hello John,

Sorry this is my first time working with this software & that is the whole rule i am trying to use currently.

2024-05-20 12_17_37-Audit log - Automation - IT Service Desk - Jira.png

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 20, 2024

Ah, looks like you are missing the action for the lookupIssues. Add an action between the trigger and the Send email action and select lookupIssues. Then add the code to identify which issues apply. 

Like Bill Sheboy likes this
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 20, 2024

Hi @Christopher Yepez -- Welcome to the Atlassian Community!

Adding to John's suggestions:

After you add the missing Lookup Issues action, you want your email to list the issues for two different assignees.  One way to do that is with list filtering, adding a section for each help desk technician.  For example:

Alice's issues:
{{#lookupIssues}}
{{#if(equals(assignee.displayName,"Alice"))}}* {{key}} | {{summary}} | {{url}}{{/}}
{{/}}

Bob's issues:
{{#lookupIssues}}
{{#if(equals(assignee.displayName,"Bob"))}}* {{key}} | {{summary}} | {{url}}{{/}}
{{/}}

To learn more, please see this article: https://community.atlassian.com/t5/Automation-articles/Filtering-smart-value-lists/ba-p/1827588

Kind regards,
Bill

Christopher Yepez May 20, 2024

is there a way i can narrow the search. 

Currently i added the lookupissues but its giving me tickets for everyone but i want to narrow it down to myself and 4 others only.

 

Christopher Yepez May 20, 2024

@Bill Sheboy 

thank you so much for your comment, in your example would the: "Bob"  be our email address listed within JIRA?

Bob's issues:
{{#lookupIssues}}
{{#if(equals(assignee.displayName,"Bob"))}}* {{key}} | {{summary}} | {{url}}{{/}}
{{/}}

 I updated it but now i get our names but nothing else.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 20, 2024

Certainly: adjust your JQL to limit the assignees:

project = myProject
AND assignee IN ("User 1", "User 2", "User 3", "User 4", "User 5")
...and the rest of your JQL

 

I just saw your additional question about email; to match on that change to this, substituting in Bob's actual email address:

{{#if(equals(assignee.emailAddress, "BobEmailAddress"))}}* {{key}} ... {{/}}

Please note well: this will only work for a company-managed project.  I do not believe the team-managed project's People field contains the email address yet.

 

Christopher Yepez May 20, 2024

@Bill Sheboy 

Sorry Bill - I must have this setup wrong still:

The email gets sent out but it only has our names.

2024-05-20 12_17_37-Audit log - Automation - IT Service Desk - Jira.png

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 20, 2024

Sorry if I caused confusion with so many edits to my post!

 

For the Lookup Issues JQL, select the issues you need, filtered by your assignees.  That can only filter by display name or account id values.  For your user display names, that might be this:

project = "IT Service Desk"
AND assignee IN ("cyepez", "mwing", "slien", "zrendon", "hsantos")
AND statusCategory != Done

That would find the issues for the users which are not completed yet.  Please confirm that information as I typed it from your rule image.

 

For the email body, that is where the Lookup Issues result is filtered.  Please show the email body you are using so we can check it for any errors.

Christopher Yepez May 20, 2024

@Bill Sheboy 

Here what i have in the body of the email:

Christopher Yepez's issues:
{{#lookupIssues}}
{{#if(equals(assignee.displayName,"cyepez"))}}* {{key}} | {{summary}} | {{url}}{{/}}
{{/}}

Michael Wing's issues:
{{#lookupIssues}}
{{#if(equals(assignee.displayName,"mwing"))}}* {{key}} | {{summary}} | {{url}}{{/}}
{{/}}

Zach Rendon's issues:
{{#lookupIssues}}
{{#if(equals(assignee.displayName,"zrendon"))}}* {{key}} | {{summary}} | {{url}}{{/}}
{{/}}

Sherman Lien's issues:
{{#lookupIssues}}
{{#if(equals(assignee.displayName,"slien"))}}* {{key}} | {{summary}} | {{url}}{{/}}
{{/}}

Henry Santos's issues:
{{#lookupIssues}}
{{#if(equals(assignee.displayName,"hsantos"))}}* {{key}} | {{summary}} | {{url}}{{/}}
{{/}}

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 20, 2024

That part looks correct for the filtering by display name values...assuming they exactly match the case of the display names (as they all appear to be lowercase).

Have you updated the JQL for your lookup issues action and retested yet?  The JQL suggestion I offered should work standalone if you want to test that first from Filters > View All Issues.

What type of project is this: company-managed or team-managed?  You may find that information at the bottom-left side of the page expanding area.

Christopher Yepez May 21, 2024

Good Morning @Bill Sheboy  

so i made the changes and its so odd, its working but its only giving data for 1 of the 5 of us. 

 

Company managed 

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 21, 2024

Can you share some screenshots?

 

Like Bill Sheboy likes this
Christopher Yepez May 21, 2024

@John Funk @Bill Sheboy  now the email finally showing data but only for Mike & no one else

progress.png

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 21, 2024

If you use the JQL standalone with an issue search, do you find issues from all of the people?

If "yes", when you look at the user display names for the other people, are they all lowercase, matching the comparisons in your email body?

Like John Funk likes this

Suggest an answer

Log in or Sign up to answer