Hi,
I want to create a global Automation rule which will link issues between different projects.
When a new Access Request in System project is created, I want it to be linked to an HR project to a user's task. For this purpose I want to compare two custom fields:
As you can see, the information in HR project is more granular while on the System project we have three types of information clustered in a single field. I was thinking I could compare the fields with
"Users' Full Name, Email, Username" ~ "User's Full Name"
or similar
"Users' Full Name, Email, Username" starts with "User's Full Name"
So far everything has failed. I came across this thread and it didn't help. My automation rule looked like this at first:
Which returned this error
I changed the JQL and used custom field IDs instead:
project = HR and "customfield_11870" ~ "{{issue.customfield_11567}}"
A new error appeared:
I changed the JQL again to a combination of a custom field ID and a custom filed name:
project = HR and "User's Full Name" ~ "{{issue.customfield_11567}}"
But...
I'm not sure if this comparison between the two fields can even be done since the field values are essentially different. I was hoping the two could be compared as strings and a value of User's Full Name could be recognized in the field Users' Full Name, Email, Username.
Thanks for the help,
Masa
Have you tried writing to the audit log the issue field for the comparison? I am wondering if there is some reserved character which is preventing the CONTAINS "~" from succeeding?
If you manually try an advanced filter search with a value and your JQL, does your query work as expected?
Kind regards,
Bill
Hey @Bill Sheboy
Thanks for your message and first of all sorry for a little late reply, I was away on a sick leave yesterday.
I can confirm that I get results in advanced search as follows:
Is this what you meant?
Hope you're well,
Masa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, Masa!
Did you try to add some writes to the audit log with the custom value field? That will confirm if you are comparing to what you demonstrated with the stand-alone, advanced filter search test.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, @Bill Sheboy
Thanks, it didn't occur to me to check the audit log for this. I entered the following JQL:
Both returned the same 6 results:
Does this confirm what we're comparing? I'm not sure how to proceed.
Thanks for your time and help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Masa.
Sorry I wasn't more clear. What I meant was before you use the custom field value in the JQL in the rule, add a Log action to write the value to the audit log. That will confirm what you are testing with JQL is what you expect when you run the rule.
After the rule runs, go to the Audit Log, expand the details, and then see if it matches what you expect.
Thanks,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Okay, I think I get it now. Thanks Bill.
I added the action to the rule. You can see it in bold here:
After the rule was run, this is what I found in the audit log of the rule:
Branch rule in JQL somehow fails to find an issue in HR project which would hold a piece of information written in what I called user data above.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Looking at your rule image, is there a space after the quotation mark and before the custom field's smart value, or is that just the way it displayed? An extra space could be part of the problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah, I think this query is mismatched:
Instead you will need to extract the Full Name to perform the query. For example:
project = HR AND "User's Full Name" ~ "{{issue.customfield_11567.split(',').first}}"
That should split apart the System field to get the name for the comparison. A better solution is to not store multiple values in one field as this leads to risks of entry errors and parsing errors in the rule.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Bill Sheboy
this solves it now. Thank you so much! That's exactly what I was looking for.
I am aware that this is far from ideal. We didn't think to link these issues when we were first configuring them. It would be best to granulate the field from our Access Request the same way it is done in the HR task. But at this point we have nearly 4000 Access Requests that would need some sort of difficult editing maneuver to pull this off. I'm afraid this chore will have to wait for a larger time window.
Here's the audit log from the rule after I've changed
Thanks again, hope you have a great rest of the week,
Masa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Awesome! I am glad to learn that worked for you. Have a great day!
__Bill
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.