What are different ways to troubleshoot my SmartHandler configuration?
Problem
My configuration isn't working as expected. What steps can I take to troubleshoot this issue on my own?
Solution
Depending on the error you are seeing, there are many ways to troubleshoot SmartHandler.
- Emails aren't being read or picked up by the plugin.
First, it is important to note how SmartHandler interacts with the inbox depending on which protocol is used (IMAP or POP). If you setup your inbox with POP, SmartHandler will not edit the emails in the inbox at all. However, if you used IMAP, when SmartHandler successfully picks up an email and performs all the actions without error it will mark this email as read and archive in your mailbox. If SmartHandler picks up the email and encounters an error during processing, the email will be marked read yet remain in the inbox. Finally, the email will remain unread and in the inbox if SmartHandler does not pick it up. This means that the email passed no Email Match Criteria for any of the configured handlers watching this inbox.
If the emails are unread in the inbox, it is important to check the intended handler's match criteria. You can find more information about this here.
If the emails are read and remain in the inbox, it is important to check the handler's Activity Log for errors. You can find more information about the Activity Log here.
2. Tickets aren't being created/updated as expected.
Check SmartHandler's Activity Log
Determining if the error is related to Jira configuration by checking the Activity log is a good first step. Common error messages may be that the user creating/updating the ticket doesn't have the proper permissions in the given project, the issue type selected doesn't exist in the given project, an invalid option was selected for custom field, etc. These error messages can help when determining the validity of your data mappings to Jira fields in each Action. You can find more information about Activity Logs here.
Check the Action Criteria
If no Activity Log entry exists for the Action in question, then the Action's criteria to execute was not met. This means you will need to look at your Action Criteria and determine whether or not this condition was true for the email in question. Criteria may take several iterations of tweaking to fully capture the intended functionality. You can find more information on building conditions, or expressions, here.
Check your Data Point values
Another problem may be that the values held in your Data Point variables are not what you expected them to be. There are a few ways to see what these values are for a given email. The first way is to check your Activity Log. If a log entry is created for the given email, you can expand the log message to show the values found for your handler's defined data points. If the data point in question is not listed, then no value was found for this data point.
You can also easily preview data point values for a given email. This can help troubleshoot potential problems with regexes or key-value pairs. For more information on previewing your Data Point values, click here.
Check Jira application logs
You can also see SmartHandler's logging on your Jira server. You can do this by creating a support zip and looking at the Jira application logs folder in the file atlassian-jira.log. Here you will see every time SmartHandler reads an email, each handler checking to see if criteria is matched, whether or not each action's criteria is passed, and line by line what the handler is trying to assign to each field. This can be very helpful in trying to understand how the conditions and logic of the configuration are working. If you do not see these log messages from SmartHandler in this file, you may need to enable logging. You can find information on how to do that here.
3. If all else fails, open a support ticket here. You may be asked to provide your Jira application logs. You can find information on how to do this, here.
Related articles