Undefined in notification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2024 02:39 AM
I have created a notification on ticket closure in that it will display variables and moved to production.Later that i have added few more varialbles to that catalog item and modified the notification to include those variables as well.
For already created ticket when the Notification triggered its showing that variable as undefined. For newly created ticket its working as expected.
Could you please help me to fix it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2024 04:17 AM
Hi @JPSS ,
As you are saying you have added those variables later on to that catalog item, Since the existing catalog item doesn't have those variables, that explains why they're showing as undefined in the notification for already created tickets.
To address this issue, you'll need to update the existing tickets with values for the newly added variables.
Please hit helpful and accept this as a solution if it solved your problem.
Thanks,
M.Ismail
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2024 04:49 AM
The issue you're experiencing likely stems from the fact that existing tickets do not have the newly added variables, and thus when the notification tries to access those variables, they are undefined. This happens because the variable values are stored at the time the ticket is created, and existing tickets won't have the new variables unless they are explicitly set.
Here are a few steps you can take to address this issue:
Check for Undefined Variables: Update your notification script to check if the variables are defined before trying to use them. This will prevent the notification from showing "undefined".
Backfill Data: Optionally, you could backfill the new variable data for the existing records if applicable.
Please Mark ✅Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.
Thanks