Hello guys,
I am working on a new automation to link all issues together based on my customfield "User's Email Address" I used on of the automations scripts in the Atlassian Library and tried to tweak it for my needs, but I can't tell what I am missing/doing wrong. Any help would be much appreciated!!!
Hi @JayJuan Jones - The way I'm interpreting your use case, it sounds like the custom field is a simple short text field. In this case, you would need to change your lookups to use this:
{{issue.reporter.emailAddress}} = {{customfield_10041}}
Because of this, you would want to change your condition to an advanced condition.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @JayJuan Jones - Your Branch is not going to work because it's trying to perform a JQL search where Reporter = an email address where it needs to be an ID value. Instead, try flipping your JQL around like this:
[cf]10041 = {{Reporter.emailAddress}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
still no luck :(
could it be because the logic above is referencing a field called emailAddress and my field name is called User's Email Address which is customfield_10041?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Uggh - Typos on my part. Try this:
In your condition, change {{customfield_10041}} to
{{issue.customfield_10041}}
In the JQL, change to this:
[cf]10041 = {{issue.Reporter.emailAddress}}
Hopefully those two changes fix the issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Still not meeting the condition; I'm wondering if .emailAddress needs to be changed. I have these two issues I am trying to automatically link with this automaiton:
here is the details for one of them; I don't have an email address field completed, but I do have User's Email Address:
Lastly; when I manually run the automation, still no effect, it's not meeting the condition, looking at the automation, everything looks good except .emailAddress
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The problem is that when you're performing action against Reporter, it's going to be a Jira ID that is returned, while your custom field is looking for email. Reporters are users and users have email as an attribute which is why {{Reporter.emailAddress}} needs to play a factor in the logic.
As a troubleshooting step, let's add a Log Action activity with the following:
Reporter Email: {{issue.reporter.emailAddress}} | CF10041: {{issue.customfield_10041}}
Then execute again and look at the log to see what values are captured.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ah, so that would explain why the Reporter seems to be always encrypted when I click their emails from the customer page. Here is what I see:
this would explain why the condition is failing. Should I rethink this approach? My main goal is to link issues based on the customfield User's Email Address; I don't think the reporter matters as much.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yeah, you can change it up where your branch JQL is this:
cf[10041] = {{issue.customfield_10041}} AND KEY != {{issue}}
This will perform a search for all issues that have the same value in your custom field and ignores the trigger issue (needed so you don't get errors when it tries to establish links to itself).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
like this
or should I remove the advanced compare condition all together?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yeah should be no need for the advanced compare now.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Awesome, didn't think we did. Now I'm getting another error:
is the syntax wrong for cf?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My bad... Yes. Just updated my previous post. Should be [cf]10041.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
weird! I updated it and I still got the same error, it looks like it was expecting cf and that's what we put. What am I missing here?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Alright... I'm going to go stand in a corner and flog myself! 🤦♂️ Once again.... Bad syntax on my part. It should be cf[10041]. I will never forget your custom field ID.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
LOL no worries, you have been great help!!! We got past that error, but I have another error I am getting now:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
omg... I can't share my thoughts on the error because of HTML errors
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Interesting - Does it work if you put quotes around the smart value?
cf[10041] = "{{issue.customfield_10041}}" AND KEY != {{issue}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
got past the @ now it's saying this:
should I spell out equals instead of using the sign?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your custom field is a short text field so the "=" operator won't work. This needs to be a fuzzy search. Try this:
cf[10041] ~ "{{issue.customfield_10041}}" AND KEY != {{issue}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
that seemed to have taken care of it!!! thank you so much for all your amazing help! I hope this forum will be of great value to someone else in the future!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.