Hello All!
I have a small team of folks who work in a Jira instance. We log tasks and do generally low-tech logging (think of it more like task-based cases like a support system). We are working with out tableau folks to automate the logging of some data from our tasks.
When people open an issue with [Company Name] in the summary field, I need it to use the components field and set it there as well. Alternatively, I think we could use Labels, but some of these names are multiple words and I think that wreaks havoc with the labels field.
When people set a task type (think of something generic like "meeting", or "phone call"), I want the automation to set the category of that type of issue-so maybe it's called "communication" for the above, and the components field should read both "meeting" and "Communication".
I was easily able to get either of these working, but not together and only with caveats:
For the second situation, when I use the IF/THEN automation to edit the components field, it completely wipes out the existing component and replaces it with the automation. That leads to having to have a single rule for every condition/category combination-but surely there is a way to use automation that doesn't just replace the original component, right?
When I combine these 2 rules and put in an issue with "Company Name X", and Component "meeting", all I get is the company name set in components...so it seems like the rules overlap each other and the editing of components just replaces my components.
WAY too much writing for my problem, but hopefully someone knows what I'm going through and can direct me to the right place for this.
Thanks!
Hi @Sam Roza -- Welcome to the Atlassian Community!
For a question like this, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected. Those will provide context for the community to offer ideas. Thanks!
Until we see those...
I suspect a few things are going on:
Kind regards,
Bill
Bill, thanks for the quick response.
Yes, I assume one rule is stepping on the other as well. I just didn't expect that would be an issue.
Here are some screenshots:
This is for rule #2:
"strength" is the category component I was speaking of. I had been hoping I could say make a rule that included all of the children of the category (say Active Success Plan/Quarterly Review/Escalations), as an IF, and then "Add the CATEGORY Strength as a THEN condition.
The other automation I'm in need of is a rule that looks in the Summary field for a company name in brackets
[IBM], for example and also appends the company name to the components field.
I did that in a separate rule, but as mentioned, that was stepping on the first rule:
So I'm struggling to get this all in as functional rules that work and accomplish my goals. I'll look at the link you supplied, but any tips for a newb to Jira automation would be appreciated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for those images, and here are some suggestions:
When using the Issue Created trigger, that can fire so quickly that some issue data may not be available to the rule yet. The fix / work-around for that is to always add the Re-fetch Issue action immediately after the Issue Created trigger. This will slow down the rule by reloading the data before proceeding.
Next, with two rules both with the same trigger, they will most likely collide. Instead I would use one rule with if / else blocks for each section, add the new values with a JSON expression, and then re-fetch the issue before proceeding. For example, you will need separate if / else blocks to replace your earlier rules
I gave the incorrect link before, so here is the correct one for the JSON edit for Jira Server / Data Center version, which includes examples for using the "update" and "add" of values syntax:
https://confluence.atlassian.com/automation/advanced-field-editing-using-json-993924663.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Bill,
I wanted to circle back and thank you for your input.
In the end, I basically made a very long if/else automation that set the task and category as components. Frustratingly, I could never just *add* to the components field as the rule deletes the contents. That required I say "IF task type A, then set task type A and category type 1 in field components".
But it works just fine. There are something like 27 IFs and ELSEs.
The company name was able to be extracted from the summary field, so I didn't have to worry about an automation for that.
I investigated the JSON angle, but we are limited to the standard automations by IT.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am glad to learn you have something working, although 27 if / else blocks may be tricky to maintain. I recommend regularly checking the audit log for that one to watch for problems.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Agreed, it seems potentially problematic. The only other thing I could do is have multiple automations and I was worried they would stomp on each other.
I will keep vigilant watch.
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.