Preamble / Context
We have a form for when employees want to request equipment/furniture. When this request comes in, we are wanting a comment placed on the issue letting the assignee know if the employee has made a similar request before.
I know there is a "Similar Request" feature, but it's not always exact and for this we need to be painfully precise. I understand I will need to use the Lookup Issue action and possibly the Create Lookup Table action?
Here is the automation we have been working around.
- Trigger: When Issue Created
- IF: Issue matches JQL
- issuetype = "A" AND Custom_Field_1 = "B"
- Then: Lookup Issues
- issuetype = "A" AND reporter = {{issue.reporter}}
So that alone works perfectly. We can see that it is pulling the correct issues in the audit log.
For a little bit of context for those that caught it. Yes, our Issue Lookup is much broader than the requirements for the automation. This is because the Custom_Field listed wasn't being tracked on previous issues and now it is. (Form Field vs. Jira Field). We actually have two new custom fields in relation to this. One being used here and the other will be used later.
Theoretics
So in the next section of the automation is where we need some help. We want the results of the lookup to be given in a comment for the issue assignee to review, but we need more than just the issue key and we want a little bit of logic behind it.
As I understand it, at this point we would need to take the Issues collected by the Lookup Search and place them into a Lookup Table? We need to do this because we want additional details from the issues available to be actionable by further steps within the automation flow.
In the end, we want 4 items to be displayed in the issue comment.
- Issue Key
- Creation Date
- Custom_Field_2 Data (could end up being null)
- Link to Issue
As mentioned before, the Issue Lookup will potentially pull a broader data set than what we might need. So we want to use logic to provide either select issues from the lookup or all issues from the lookup:
- IF: trigger issue has any exact matches based on the Custom_Field_2, then list issues with the 4 points of data available. Displaying data in a table view would be ideal.
- So this will only be select issues from the lookup/table
- ELSE: list all the matches based on Issue Type, with the 3/4 points of data available. Displaying data in a table view would be ideal.
- So this will be all issues from in the lookup/table
Questions and Guidance
- Is this even possible or did I understand something incorrectly?
- Is using the Lookup Table the correct method for this?
- Assuming I am on the correct path, setting up the table confuses me a little and I'm uncertain if I understand it correctly. Key can be literally anything, but Value is where we need to use Smart Values to access the issues from the Lookup and scope down to the exact detail we are looking for?
- Assuming all the above is possible and correct, can I display that data in a table in an internal comment?
- If not, what would be the least confusing method of displaying the information?
Thank you in advance for any suggestions and brainstorming around this. I am still very green when it comes to understanding and working with data in this fashion.