I'm facing an issue with a Jira Automation rule that's intended to trigger when an issue's type changes from "Bug" to "Related Bug." However, the automation isn't functioning as expected, and I'm encountering multiple issues:
Smart Values Not Working: The automation rule uses smart values to check the previous issue type ({{fieldChange.fromString}}
). This smart value condition is supposed to match when the issue type changes from "Related Bug" To "Bug". However, the rule fails to recognize this condition, even though it appears correct.
Issue Type Change Not Triggering: Despite configuring the rule to trigger on changes to the issue type field, the automation rule does not trigger when I convert an issue type from "Bug" to "Related Bug." This is blocking the execution of the rest of the automation steps.
Here’s a breakdown of the rule:
{{fieldChange.fromString}}
is expected to equal "Bug".I have verified that the issue type change is correctly happening from "Bug" to "Related Bug" on the issues, but the rule is not being triggered or logging the correct smart value in the audit log.
{{fieldChange.fromString}}
for the issue type field in automation rules?Any insights or suggestions on resolving this would be greatly appreciated!
Hello @Sid007
Welcome to the Atlassian community.
Whenever requesting help with an Automation rule please provide the following:
Sometimes the location of the step within the rule is the cause of the problem. Other times there might be a typographical error. These can be determined only if we can see the rule.
I have these additional question:
1. What are the exact steps you are taking to "convert" the issue to a different type?
2. Is more than one field being changed during the conversion process? If multiple fields are changed within the process then the Field Value Changed trigger may not be triggered.
3. You asked if there could be a problem related to the "issue type" field being a custom field. There is a built-in field named Issue Type. Have you created a custom field with the exact same name? That could definitely cause a problem with Automation, depending on which one you are actually changing in the issue and which one you have selected in the Rule.
Other things are working fine and tested: Just that I cannot get the smart value to work. Tried multiple attempts on doing it as:
{{changelog.issuetype.from}} equals id
{{changelog.issuetype.fromString}} string equals "Related Bug"
{{fieldChange.fromString}}
etc- but doesn't work for me.(As you see in the screenshot)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Sid007
There is no known issue with using {{fieldChange.fromString}} in a smart value condition. It works fine for me comparing such a value.
Your screen image does not provide any evidence that the condition does not work. That is why I asked if you would please provide both a screen image of your entire rule and the output for the rule execution log as supporting evidence.
You mentioned that the issue type change is not triggering the rule. I asked:
1. What are the exact steps you are taking to "convert" the issue to a different type?
I asked this because if you are using the Convert to Sub-task function or the Convert to Issue function, those indeed will not be recognized by Automation as a change to the Issue Type field and the rule will not be triggered.
There are reasons for the questions we ask. The information we request helps us debug your issue. Providing the requested information will enable us to get to the root cause faster.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, I'm using the Convert to Issue option since the issuetype changes from Subtask to a Bug. Maybe that is why the automation is not picking it up. Any way it can be set as such?
Right now it looks like this since I'm trying to use it from: {{issue.changelog.isssuetype.fromString}}
but Audit log says:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
According to the documentation for change log
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/
...the correct method for accessing the smart value for changelog is:
{{changelog...
Not
{{issue.changelog....
Also check out the example provided in that document for accessing the fromString attribute. The syntax is different than what you have.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have tried these all:
Conditions
{{fieldChange.fromString}} equals Related Bug
Or
{{issue.changelog.issuetype.fromString}} equals Related Bug
Or
{{changelog.issuetype.from}} equals 10000
Or
{{issue.changelog.issuetype.from}} equals 10000
Or
{{changelog.issuetype.from}} equals 10000
Or
{{changelog.issuetype.fromString}} equals Related Bug
None worked.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It does not appear that you observed this suggestion that I included.
Also check out the example provided in that document for accessing the fromString attribute. The syntax is different than what you have.
Because your list of things you tried does not include the information from the documented examples:
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#--changelog--
Regardless, I have tried this example syntax myself using Log actions in a rule that uses the same trigger you specified (Field Value Changed for Issue Type or Parent), and using the Convert To Subtask and Convert to Issue functions.
While the rule is triggered it appears that the information for those fields is not written into to the Change Log accessible in the Automation Rule, when the Convert To functions are used.
This is what I got when I converted an issue to a Sub-task:
And when I converted a sub-task to an Issue the rule was not triggered at all.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Sid007
For me is correct your condition
Do you have only one condition, or do you have more conditions? If you have more conditions, can you try if else condition ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It working fine with these smartvalue for me .
Can you share the auditlog ? The trigger need to be "When field change"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Sid007
I haven't tested converting a subtask into a task yet.
From what I've found online, it seems that when converting a subtask into a task, you need to trigger a field value change for the 'parent field.
https://jira.atlassian.com/browse/JSWCLOUD-22432
However, it's strange that smart values like changelog
or fieldChange
don't seem to work as expected.
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.