Hi everyone
Having a hard time finding out the smart value to use for this one. We use components on both issues and subtasks, but the latter are automatically set to be a copy of the parent's component value when the subtask is created. No issues there.
But if a subtask is then moved to a new parent, I need to be able to update the component to whatever value is now available on the target parent, and am having a hard time finding the smart value for that.
This is the closest I've gotten so far, but am not getting any results. I'm assuming the smartvalue would have to be something like {{issue.changelog.parent. ...}} but cannot find any good examples on this.
Any suggestions?
Hope this was helpful.
Best
Stefan
Hi @david catriel ,
yeah that‘s the timing issue I mentioned. The new parent is not detected at that time therefore the components of the old prent gets copied. I could reproduce this behaviour and the workaround with slowing down the automation rule with some re-fetch actions worked in my system.
Nevertheless guess it might also work with the change-log but the result from the changelog might need to be formated (not quite sure).
did you already try to write the output of the changelog to the audit log to see what and in which format you get the information? If you get a list/array of ids i guess it should be possible to simple write the changelog to the subtask‘s field. You can find detailed description of which format the different fields expect:
https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, gotcha now. The timing issue was definitely the problem. I added the re-fetch and just changed the rule to be a simple Copy, and it works like a charm now.
For anyone else looking into this issue, here's the final setup:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Awesome 👍🏼👍🏼 great job 💪🏼💪🏼
Amd thanks for sharing ypur solution in details. Very much appreciated to help other users with this kind of documentation 🙌🏼
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Stefan Salzl thanks for the answer and apologies for the late reply. I've been trying that out as well, and although there are no errors and the rule's audit log says the values were copied, nothing actually is. I have a feeling that this is because what's being copied is the component value from the current parent and not the new one.
That's why I was hoping there'd be a way to reference the new parent via something like "{{issue.changelog.parent.toValue.Components}}.
Any ideas on how to reference the values in the target parent instead of the current one?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.