Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to create an email notification with a list of the assets that will be expire within 45 days.

Vera Valshonok
Contributor
July 10, 2023

I am trying to create an email notification in order to receive a list of the tickets in which a warranty end date will finish in 45 days. Adding here a screenshot of the automation created. It does not work for me and I can't find a solution how to fix it till now.

 

Screenshot 2023-07-10 103003.pngScreenshot 2023-07-10 103228.png

1 answer

2 votes
Evgenii
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 10, 2023

Hi, @Vera Valshonok 

Please, clarify, what you are looking for? Assets or Issues?

If assets, theno you have to edit automation rule.

It must search assets objects with AQL query, and then list of this objects you add to email

Evgenii
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 10, 2023

objectType = assets_category AND "Warranty End Date" <= startOfDay(45d) AND  "Warranty End Date" >= startOfDay()

Like John Funk likes this
Vera Valshonok
Contributor
July 10, 2023

By the logic - looking for warranty end day of assets but i dont see that we have an filed asset_category or we dont need to have one? My JQL looks like filtering tickets which requite warranty indication ( field on yes and no) 

Vera Valshonok
Contributor
July 10, 2023

The issue I get in audit log after running a rule is:

Found multiple fields with the same name and type: Warranty end date. How can I fix it without risking to loose all the info in the Warranty end date field in the tasks retrospectively.
I believe i need to have a new specialized Warranty end date field. but maybe there are more workarounds?
Evgenii
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 10, 2023

Ok, no problems. If you're looking for Issues with such custom field, you have to make rule like in my example. Replace duedate with your field, and instead of adding values to log, add smart values to email body.

image.png

Vera Valshonok
Contributor
July 11, 2023

Thanks, even if my field is called Warranty start date and warranty end date I still need to add diedate in the aufit log as on your example?

Evgenii
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 11, 2023

No, that's just an example, to show, how it works.

You can add such block to email body template, and replace duedate with "Warranty  End Date", for example

Vera Valshonok
Contributor
July 11, 2023

Still does not work , i add such a JQL in lookup issues: Warranty Start Date > startOfDay()"AND Warranty End Date <= startOfDay (300d)

 

I want to generate a list of the issue with  warranty end date will expire within 300 days

Evgenii
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 11, 2023

Make simple JQL search with query:

"Warranty End Date" > startOfDay() AND "Warranty End Date" <= startOfDay(300d)

it returns issues?

Vera Valshonok
Contributor
July 11, 2023

It worked! Thank you so much for your help!

Vera Valshonok
Contributor
July 11, 2023

@Evgenii  at the moment in the email I see the tasks keys but I'd like to get links to each of the tasks int he email. Can you advice what should I add to my current email notification setting?

Current one:

Hi!

Please see the list of the assets below. These assets warranty expires in 45 days.
{{#lookupIssues}} *{{key}}*:
{{summary}}: {{duedate}}{{/}}

Vera Valshonok
Contributor
July 11, 2023

And got a tons of the same emails from the same automation on the email for some reason.

Evgenii
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 11, 2023

You can recive tons of emails, if you're sending it for every issue. Please, take a look at my example screenshot upper. You have to collect issues with lookup issues.

You can add urls with such smart value:

Please see the list of the assets below. These assets warranty expires in 45 days.
{{#lookupIssues}} *{{key}}*:
{{summary}}: {{url}}{{/}}

Evgenii
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 11, 2023

If answer helped you, please, mark it as accepted. It will help other people with same problem.

Vera Valshonok
Contributor
July 11, 2023

Thanks! Its really helpful. I am using Lookup issue's part but in the When "Scheduled part I am asked to mark a part - Run a JQL search and execute actions for each issue in the query. If I save the rule without choosing this part it says that i must add a JQL.Screenshot 2023-07-11 165322.pngScreenshot 2023-07-11 165201.png

Evgenii
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 11, 2023

It's very strange, because in my similar rule there is no need to set JQL. Looks like, that some of actions, you added o rule, require selection of issues. Try to refactor rule.

image.png

Vera Valshonok
Contributor
July 12, 2023

Thanks! IT worked! Really appreciate your help

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events