I have an automation doing recalculation of Task (Story) size when a child subtask is moved between different Tasks. This rule triggers on When: value change for Parent, and in this rule I can retrieve the "old" parent with fieldChange.fromString, and the new parent with fieldChange.toString (or from triggerissue.parent).
This works well for almost all cases when a subtask is moved between Tasks (or Stories).
However, I've detected that when I create a new subtask in an existing Task, this also triggers the When: value change for Parent event (kind of surprisingly). But this time the fieldChange.fromString does not contain any old parent information (that part makes sense, since it's a subtask newborn in this Task, not forced to leave its previous parent).
However, my rule needs to detect this case too, to avoid crashing.
But I have not been able to figure out how yet.
The fieldChange.fromString is not null, that I have tested, did not work. It look more like it's an empty string (or invalid reference?).
A simple rule to trigger this is:Just open an existing Task, add a child issue (=subtask) and the result is this error:
Which is what I want to avoid, by detecting the lack of useful content in fieldChange.fromString When: value change for parent triggers, before I try to use it in the rule.
I hope you have some suggestions on how to write this test.
Greetings!
The fieldChange.fromString is not null, that I have tested, did not work. It look more like it's an empty string (or invalid reference?).
You got it already :D
A if block with a condition for "smart values" checking for "Empty" should work.
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.