Hi! I'm developing an automation to create a subtask. The action is simple: the subtask copies the mandatory fields from the parent issue.
However, the main challenge is identifying when one or more of these fields are empty.
Here’s what I’ve implemented so far:
If block: If affectsVersion is empty
Then action: Send email
If block: If severity is empty
Then action: Send email
And so on...
The problem: If there are 10 mandatory fields and the user forgets to fill in 3 of them, they will receive 3 separate emails. In my opinion, this is not the best practice.
So, if you have any suggestions for improving this process, I’d really appreciate your input!
Hi @Victoria Tortelli and welcome to the Community!
Just for my understanding: if these fields are mandatory on the parent issue, how can they be empty? If these are truly and properly configured as mandatory fields on the parent issue, your automation rule does not make any sense, no?
If you do end up in a scenario like this, you could define a variable in your automation rule that you use to build the text of a single email by adding the name of a missing field and send 1 email at the end of your rule using that variable as the body text.
Hope this helps!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This variable that you gave me is an idea, am I not on the right track? Do I need to declare it once and modify it with each check?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Victoria Tortelli -- Welcome to the Atlassian Community!
You could use condition expressions in your email to dynamically show (or not) the content for the missing fields: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-conditional-logic/
Or, you could first set created variables, using if / else blocks to set the values, and then use the variable to decide on the conditional email contents.
Or, use a lookup table with a row for each field, where the key is the field name and the value is the condition detection of emptiness, and then iterate over the entries for the missing fields.
Kind regards,
Bill
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.