Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSONata not evaluated in read/write file nodes in the context of Node-RED 3.1.0 #37

Closed
napsi opened this issue Nov 3, 2023 · 0 comments · Fixed by #38
Closed

JSONata not evaluated in read/write file nodes in the context of Node-RED 3.1.0 #37

napsi opened this issue Nov 3, 2023 · 0 comments · Fixed by #38
Labels
needs-triage Needs looking at to decide what to do

Comments

@napsi
Copy link

napsi commented Nov 3, 2023

Current Behavior

A flow with write file and read file nodes using a $join(['a','b','c']) JSONata expression for the filename, will use that expression string verbatim as filename, rather than evaluating it to 'abc'.

This happens on docker image flowforge/node-red:1.13.2-3.1.0, while on flowforge/node-red:1.13.2 the expression is evaluated.

It would seem related to:

Expected Behavior

The nodes should evaluate the expression and use the filename 'abc'.

Steps To Reproduce

Import and trigger this flow on a flowforge/node-red:1.13.2-3.1.0 instance.

[{"id":"9533c737d8b1bf9c","type":"tab","label":"JSONata filename bug","disabled":false,"info":"","env":[]},{"id":"314d9f0b4e0ac1ed","type":"debug","z":"9533c737d8b1bf9c","name":"debug write","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":550,"y":340,"wires":[]},{"id":"45965d8ef17a431e","type":"file","z":"9533c737d8b1bf9c","name":"","filename":"$join(['a','b','c'])","filenameType":"jsonata","appendNewline":true,"createDir":true,"overwriteFile":"true","encoding":"none","x":380,"y":340,"wires":[["314d9f0b4e0ac1ed","4e1b46a0d777dcf3"]]},{"id":"3214f4b4233a57c2","type":"inject","z":"9533c737d8b1bf9c","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":220,"y":340,"wires":[["45965d8ef17a431e"]]},{"id":"4e1b46a0d777dcf3","type":"file in","z":"9533c737d8b1bf9c","name":"","filename":"$join(['a','b','c'])","filenameType":"jsonata","format":"utf8","chunk":false,"sendError":false,"encoding":"none","allProps":false,"x":540,"y":400,"wires":[["c5da2eb62b8327f4"]]},{"id":"c5da2eb62b8327f4","type":"debug","z":"9533c737d8b1bf9c","name":"debug read","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":710,"y":400,"wires":[]}]

Environment

  • FlowFuse version: 1.13.2
  • FF Node-RED: flowforge/node-red:1.13.2-3.1.0@sha256:a82ebd2d5d38edb356f1ef12ccc36b568ce37ac1a6401dd2529a549d86950fa2
  • Platform/OS: docker, linux/amd64
@napsi napsi added the needs-triage Needs looking at to decide what to do label Nov 3, 2023
knolleary added a commit that referenced this issue Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage Needs looking at to decide what to do
Projects
Status: Closed / Done
Development

Successfully merging a pull request may close this issue.

1 participant