Found a bug (?) with ternary conditions in Set node

Hello!
Stuck with some troubles while try to do some reports
I’ve use a condition inside Set node to fill some fields:

{{$node["Jira"].json["fields"]["status"]["name"] = "Done" ? "Закрыто" : "Идентифицировано"}}
But when my report was built - I see that only the first value of $node[“Jira”].json[“fields”][“status”][“name”] is taken

So, if I have status “Done” on a first issue from Jira - all of my column filled up with “Закрыто” but I need to fill rows per ticket

Maybe I made a mistake in condition?

Would you mind to share workflow?

Short if (.. ? .. : ..) will return value always so $node[“Jira”].json[“fields”][“status”][“name”] correctly would be always set, but maybe I understand it wrong since I don’t see whole workflow.

Yep, short part of WF with this node here

It should be ‘==‘ not a single ‘=‘ for a ternary condition.

3 Likes

Oops!
Thank You very much, need to learn JS
Problem solved