I've created an automation to update a field using the numeric portion of the issue key. Here is the rule. I create a variable using a smart value to extract the numeric portion. The log action indicates that the variable is created correctly and is reporting the expected value.
The field to update has a default value of 100 and I want to append the value in the create variable to the existing value. Why isn't it working correctly? The error message isn't detailed enough for me to understand what I am doing wrong.
When using a smart value as a parameter in a function, like concat(), you do not need to repeat the double-curly brackets inside. Please try removing them.
Kind regards,
Bill
@Bill SheboyI removed the mustache brackets as recommended. Rule audit says success but it isn't updating the field as expected. The field should be filled with 100923, not DOC-923 as shown. The field on the issue is blank as shown in the 2nd screenshot. If the field had populated at all it would appear in the Details section under Type. The 3rd screenshot of the editing screen also shows that the field is empty. I'm going to try to do a refresh action with log actions in case it's a race issue during creation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Tried adding a re-fetch action. The audit log indicates the default value for the field is correct but it still isn't editing correctly and the field is still hidden even with the default value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is the value of the custom field you are trying to concatenate that value to? If it is null, that may explain this.
Would you please post an image of you complete, updated rule, and an image of the edit action?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You may have something there. The field is null on creation even though it should have a default value of 100 which is indicated as being so by the audit log even though the Edit and view screens show it as null as does the find your smart values screen shots.
Is it possible this is an edit issue permission? I am just familiar enough with the server version. I checked and the permission is set for Any logged in user. I would expect to have a project role permission for the automation add-on like I have for my Cloud site, (atlassian-addons-project-access). It isn't an option in the project when I try to add it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Probably not a permissions issue as the rule's audit log shows the edit was successful.
This could be a timing / race-track problem...
The Issue Created trigger can fire so quickly the issue data is not yet available to the rule. This can result in later rule steps working unexpectedly. For your scenario, it is possible the custom field is still empty when it is used in with the concatenation.
The work-around / fix for this is to always add the Re-fetch Issue action immediately after the Issue Created trigger. That will slow the rule by about one second and reload the issue data before proceeding.
Please try adding that and observe the impact.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Bill, I'll work with the re-fetch action some more. I'll reply after I try some variations.
Have a nice holiday.
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.