Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with Automating Asset Expiration Email Notification in Jira

Salah Eldin Hassan September 6, 2024

Hello Jira Community,

I'm currently facing an issue while configuring an automation rule in Jira to send an email notification when an asset (object) is about to expire. Specifically, I’m trying to set up an automation that triggers an email notification based on the asset’s expiration date. However, I’m encountering problems with the smart value configuration, as the email always comes through with an empty result.

Here's what I've tried so far:

  • I’ve created a custom field for the expiration date.
  • Set up a Jira automation rule to trigger when the expiration date is approaching (e.g., 30 days before expiration).
  • In the email body, I’ve used the following smart value: {{object.ExpirationDate}} or similar variations.

Unfortunately, every time the rule runs, the email body shows the smart value as blank, and I can’t seem to retrieve the expiration date correctly.

Has anyone faced a similar issue or can guide me on the correct smart value or approach to pull the expiration date of an object into the email? Any help or tips would be greatly appreciated!

Thanks in advance for your support!

 

Best Regards,
Salah Hassan

1 answer

1 accepted

1 vote
Answer accepted
Walter Buggenhout
Community Champion
September 8, 2024

Hi @Salah Eldin Hassan and welcome to the Community!

If you want help with automation rules, please share full details of your automation rule so we can see what you have set up and where you might be missing something.

Apart from that, it might help to replace "object" in your smart value by the actual name of the object you are referring to. Suppose you are looking at licenses here, use {{license.ExpirationDate}} instead.

Hope this helps!

Salah Eldin Hassan September 8, 2024

Hi @Walter Buggenhout

Thank you so much for the quick response and for welcoming me to the Community!

I tried using {{license.ExpirationDate}} as you suggested, but unfortunately, it didn’t work in my case. I’m still facing the same issue, with the discerption and expiration date not being pulled correctly into the email notification.

To give more clarity, here are the steps I’ve taken, along with screenshots of each stage:

  1. Created assets (objects) named Licenses – this is where I need to pull the description and expiration date from:
    1.jpg

  2. Created the automation process to monitor licenses expiring as follows:
    2.jpg

  3. Set an action to send an email when triggered with the note:
    3.jpg

  4. Second action to create a task when triggered:
    4.jpg

  5. The result I get:
    5.jpg

I would really appreciate any further guidance or corrections you can point out based on the screenshots.

Thanks again for your help!

 

Best Regards,
Salah 

Walter Buggenhout
Community Champion
September 8, 2024

Hi @Salah Eldin Hassan, I see you are using a Lookup Objects action to retrieve items from your assets. Which is a good way to retrieve information from assets.

But if you then want to process that information, you need to refer to it, as mentioned in the smart values documentation.

That I mentioned License in my answer is just pure coincidence, as I was guessing from your question that you were trying to manage reminders for expiring licenses. But don't just literally copy what I mentioned there 😅 - I don't have access to your system and can't possibly know how you named things ...

If you can't figure out the right syntax from the documentation link (check the Lookup Objects section specifically), then it might help if you could share the details of your lookup objects action (step 2 of your automation rule). This can return multiple objects, so you may have to keep that in mind when processing the rule.

Anyway, you should refer to the results of your lookup action using {{lookupObjects. Description}} and {{lookupObjects.Expiration Date}}, considering you only get back 1 single result.

Salah Eldin Hassan September 8, 2024

 Dear @Walter Buggenhout

Thank you so much for the valuable hints! I’m happy to say I found exactly what I needed, and everything worked perfectly once I used the right syntax ({{lookupObjects.ExpirationDate}} & {{lookupObjects.Description}}).

Thereafter to ensure I’m only getting expiration dates for licenses expiring in the next 30 days, I updated the query to:

"Expiration Date" >= now() AND "Expiration Date" < now(30d) AND "Expiration Date" > now(29d)

for the records, I didn’t copy/paste your syntax directly but I made some modifications before applying it though I didn’t go into that details in my previous message ;D

Thanks again for your help! Your guidance really made all the difference in solving this.

 

Best Regards,
Salah 

Like Walter Buggenhout likes this
Walter Buggenhout
Community Champion
September 8, 2024

Awesome, great to hear that it helped! If my answer was useful, consider accepting it here; that makes it also easier to find for people looking for a similar solution!

Like Salah Eldin Hassan likes this

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