I created a new Jira issue type called "Customer". The purpose is to store information about specific customer as well as identify who the project manager is for one.
On "Customer" I have a couple fields
On our normal stories, bugs, etc it also have the same fields.
Today I have some automation where if the "Customer" field is updated on a normal Jira ticket, it automatically updates the "Project Manager" field based upon the "Customer" field. As of right now I have an automation script per project manager where I hard code customers (which works but not a good solution).
What I would like to do is have some automation where it can reference the new "Customer" artifact and lookup the project manager attached to a particular customer. In Excel terms I'm basically looking to do a vlookup on a customer record to pull across the PM for a particular ticket. I know I need to leverage the lookupissues function just can't get it to work. Not sure if it's an issue because I have the "Customer" artifact in another project or if that shouldn't impact it.
Here is the field information
Project Information
Hi @Adam Hasselgren ,
How far did you come so far? Could you show your current automation rule? That would help the community to better understand the problem.
Best
Stefan
I'm sure I'm missing something but I did verify the customer had an entry in the ticket that matched on the "Customer" artifact.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Adam Hasselgren ,
First thing: smart values are case sensitive. So try to change to {{lookupIssues...}} (capital „i“) in your esit action.
furthermore (as the field is still a list) could you try the following in your edit action:
{{lookupIssues.PdM.value}}
see the documentation below:
https://support.atlassian.com/cloud-automation/docs/examples-of-using-smart-values-with-lists/
Please let me know if this works.
Best
Stefan
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..I've included all the screenshots from each part of the automation just in case I'm completely missing something
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It seems your JQL doesn‘t even deliver any results.
I would suggest the following:
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So it looks like the PdM field is the thing giving me trouble. I need to use {{issue.PdM.displayName}} for it to work correctly so getting there. I now think I have an issue with my lookup...first issue I see is it doesn't want to display the customer from the lookup (log: Customer: {{lookupIssues.Customer}}
I did notice it can't "Validate query" as it's greyed out. Is my syntax incorrect?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Adam Hasselgren ,
yeah as I mentioned before try to use the smart value directly in your lookupIssues.
so instead of your variable name (as shown in your last screenshot) use {{issue.Customer.value}}.
The JQL cant be validated as it uses a smart value which is resolved during runtime. This depends on the issue the rule is activated by.
You could just copy the jql and replace the smart value with a real example of one of your issues (like let‘s say you have Issue A and in the this issue the customer is John Smith —> try your jql in the normal issue search with „John Smith“ instead of you smart value)
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So the weird thing is in my JQL I'm only specifying the project "TA" but when I look at the log it's adding another project which is "AM". Would this be my issue? I have must customer record in TA but the tickets it's looking up against is in "AM". Is there a way to modify this or do I need to move my "Customer" issue type into the "AM" project?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It looks like your issues are located in different projets. is this correct?
In this case the rule must be configured as a multi-project or global rule. You can add another project to the scope in your rule details. All projects that are in the scope of your automation rule (so to say that are part of the processing) needs to be added.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I updated it to global and now I feel like we're sooooo close..It's sees the correct values, the JQL is fixed, however when it tries to update the field it says I'm inactive. It's the same custom field and I'm a valid user in both projects.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
could you try to just use lookupIssues.PdM or lookupIssues.PdM.value in your edit action?
The displayName is mainly meant for user picker fields. As far as I got your description you are getting the information/value from a select field (single choice). So in this case the result is already the expected value (from a user picker field you would get the id and to use the plain name you would use displayName).
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Brilliant! I just used the {{lookupIssues.PdM}} and it worked!!!!! Thank you @Stefan Salzl for all your help!!!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
AWESOME!!! sooo good to know you got that working.
It´s my pleasure ;)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I'm trying to implement the same kind of logic but it seems I'm not able to retrieve
my custom field from my lookupIssue to put it in the audit log.
Here's the automation details:
Here's the audit log:
I've no error, the rule is a success...
I've tried with and without .value but it's never working.
Any idea ?
My custom field is a URL, could it be due to a known limitation with this kind of field ?
Thanks in advance for your help !
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.