Hi, may this will help you:
[{"id":"fabeea6bbea43070","type":"tab","label":"NodeRED Forum","disabled":false,"info":"","env":[]},{"id":"720c666f865b3362","type":"tab","label":"NodeRED Forum","disabled":false,"info":"","env":[]},{"id":"16761018a3f73c6d","type":"mqtt-broker","name":"105j","broker":"0.0.0.0","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"sessionExpiry":""},{"id":"b35eecd9bd46b63b","type":"inject","z":"fabeea6bbea43070","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":120,"y":2760,"wires":[["43a8df33999deb21"]]},{"id":"8ae7850eadaf7857","type":"http request","z":"fabeea6bbea43070","name":"","method":"POST","ret":"txt","paytoqs":"ignore","url":"https://y1digital.atlassian.net/rest/api/3/search","tls":"","persist":false,"proxy":"","authType":"basic","senderr":false,"x":410,"y":2760,"wires":[["a671be3fb3d0b9ad"]]},{"id":"43a8df33999deb21","type":"function","z":"fabeea6bbea43070","name":"","func":"msg.payload = {\n \"jql\": \"project = TEST AND issuetype = Offer AND status NOT IN ('Done')\",\n \"maxResults\": 99999,\n \"fieldsByKeys\": false,\n \"fields\": [\n \"subtasks\",\n \"issuelinks\"\n ],\n \"startAt\": 0\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":260,"y":2760,"wires":[["8ae7850eadaf7857"]]},{"id":"8618f290272db363","type":"debug","z":"fabeea6bbea43070","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1970,"y":3060,"wires":[]},{"id":"a671be3fb3d0b9ad","type":"json","z":"fabeea6bbea43070","name":"","property":"payload","action":"","pretty":false,"x":550,"y":2760,"wires":[["8618f290272db363","579705a5e6ebdf01"]]},{"id":"91aff4d75bcc9aff","type":"comment","z":"fabeea6bbea43070","name":"Get all billable offers","info":"","x":150,"y":2720,"wires":[]},{"id":"579705a5e6ebdf01","type":"switch","z":"fabeea6bbea43070","name":"","property":"payload.issues","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":670,"y":2760,"wires":[["bc517ab3d7d0aa7a"]]},{"id":"bc517ab3d7d0aa7a","type":"function","z":"fabeea6bbea43070","name":"","func":"var issues = [];\nmsg.payload.issues.forEach(function(issue, i){\n issues.push(issue);\n});\nmsg.payload = issues;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":800,"y":2760,"wires":[["801661c0be1b62a1"]]},{"id":"801661c0be1b62a1","type":"split","z":"fabeea6bbea43070","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":930,"y":2760,"wires":[["8b1afb9e17039617"]]},{"id":"8b1afb9e17039617","type":"switch","z":"fabeea6bbea43070","name":"","property":"payload.fields.subtasks","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":1050,"y":2760,"wires":[["fc5971ce78d630e0"]]},{"id":"fc5971ce78d630e0","type":"function","z":"fabeea6bbea43070","name":"","func":"msg.payload = {\n \"jql\": \"project = TEST AND issuekey IN ('TEST-7', 'TEST-8', 'TEST-9')\",\n \"maxResults\": 99999,\n \"fieldsByKeys\": false,\n \"fields\": [\n \"worklog\",\n \"parent\"\n ],\n \"startAt\": 0\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1180,"y":2760,"wires":[["141e66b8ea8c5e0a"]]},{"id":"141e66b8ea8c5e0a","type":"http request","z":"fabeea6bbea43070","name":"","method":"POST","ret":"txt","paytoqs":"ignore","url":"https://y1digital.atlassian.net/rest/api/3/search","tls":"","persist":false,"proxy":"","authType":"basic","senderr":false,"x":1330,"y":2760,"wires":[["4312971efb6ffb20"]]},{"id":"4312971efb6ffb20","type":"json","z":"fabeea6bbea43070","name":"","property":"payload","action":"","pretty":false,"x":1470,"y":2760,"wires":[["8618f290272db363","bb4f1492ebc6f211"]]},{"id":"d42cf7b863eba505","type":"switch","z":"fabeea6bbea43070","name":"","property":"payload.issues","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":1590,"y":2760,"wires":[["bb4f1492ebc6f211"]]},{"id":"bb4f1492ebc6f211","type":"function","z":"fabeea6bbea43070","name":"","func":"var timeSpent = 0;\nvar issueKey = \"\";\n\nmsg.payload.issues.forEach(function(issue, i){\n if(issue.fields.hasOwnProperty('worklog') && issue.fields.worklog.total > 0){\n issue.fields.worklog.worklogs.forEach(function(worklog, n){\n timeSpent += worklog.timeSpentSeconds;\n });\n }\n issueKey = issue.fields.parent.key;\n});\n\nmsg.payload = {\n \"body\": {\n \"version\": 1,\n \"type\": \"doc\",\n \"content\": [\n {\n \"type\": \"paragraph\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"Time Spent: \" + (timeSpent/60/60) + \"h\"\n }\n ]\n }\n ]\n },\n \"visibility\": {\n \"type\": \"role\",\n \"value\": \"Project Manager\"\n }\n}\nconsole.log();\nmsg.issueKey = issueKey;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1720,"y":2760,"wires":[["a3da851051164a6e"]]},{"id":"a3da851051164a6e","type":"http request","z":"fabeea6bbea43070","name":"","method":"POST","ret":"txt","paytoqs":"ignore","url":"https://y1digital.atlassian.net/rest/api/3/issue/{{issueKey}}/comment","tls":"","persist":false,"proxy":"","authType":"basic","senderr":false,"x":1870,"y":2760,"wires":[["8618f290272db363"]]},{"id":"28e4b1744bde2020","type":"inject","z":"fabeea6bbea43070","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"11000000","payloadType":"str","x":520,"y":360,"wires":[["a47a070790099e4a"]]},{"id":"a47a070790099e4a","type":"function","z":"fabeea6bbea43070","name":"Process Message Calculation","func":"var payload = msg.payload;\nvar processMessage = (payload.toString().startsWith('11') && payload.length === 8) ?? false;\nmsg.processMessage = processMessage;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":730,"y":360,"wires":[["f6268720a6d89571"]]},{"id":"f6268720a6d89571","type":"switch","z":"fabeea6bbea43070","name":"Process Message?","property":"processMessage","propertyType":"msg","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":970,"y":360,"wires":[["fd690c2ff0bb5c69"]]},{"id":"fd690c2ff0bb5c69","type":"debug","z":"fabeea6bbea43070","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1150,"y":360,"wires":[]},{"id":"ddf5934525261467","type":"inject","z":"720c666f865b3362","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":120,"y":2760,"wires":[["be354fd5e012f971"]]},{"id":"1b1c8910dcf7598c","type":"http request","z":"720c666f865b3362","name":"","method":"POST","ret":"txt","paytoqs":"ignore","url":"https://y1digital.atlassian.net/rest/api/3/search","tls":"","persist":false,"proxy":"","authType":"basic","senderr":false,"x":410,"y":2760,"wires":[["006a5ec6c34d08ea"]]},{"id":"be354fd5e012f971","type":"function","z":"720c666f865b3362","name":"","func":"msg.payload = {\n \"jql\": \"project = TEST AND issuetype = Offer AND status NOT IN ('Done')\",\n \"maxResults\": 99999,\n \"fieldsByKeys\": false,\n \"fields\": [\n \"subtasks\",\n \"issuelinks\"\n ],\n \"startAt\": 0\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":260,"y":2760,"wires":[["1b1c8910dcf7598c"]]},{"id":"6cd5bc92f56045e9","type":"debug","z":"720c666f865b3362","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1970,"y":3060,"wires":[]},{"id":"006a5ec6c34d08ea","type":"json","z":"720c666f865b3362","name":"","property":"payload","action":"","pretty":false,"x":550,"y":2760,"wires":[["6cd5bc92f56045e9","9908853c6858de87"]]},{"id":"5be3f555c08c62aa","type":"comment","z":"720c666f865b3362","name":"Get all billable offers","info":"","x":150,"y":2720,"wires":[]},{"id":"9908853c6858de87","type":"switch","z":"720c666f865b3362","name":"","property":"payload.issues","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":670,"y":2760,"wires":[["8bf94551e0c57e3f"]]},{"id":"8bf94551e0c57e3f","type":"function","z":"720c666f865b3362","name":"","func":"var issues = [];\nmsg.payload.issues.forEach(function(issue, i){\n issues.push(issue);\n});\nmsg.payload = issues;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":800,"y":2760,"wires":[["48dc5a8bd5f0153c"]]},{"id":"48dc5a8bd5f0153c","type":"split","z":"720c666f865b3362","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":930,"y":2760,"wires":[["fb262a081492cc26"]]},{"id":"fb262a081492cc26","type":"switch","z":"720c666f865b3362","name":"","property":"payload.fields.subtasks","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":1050,"y":2760,"wires":[["e4a462779b67f1a2"]]},{"id":"e4a462779b67f1a2","type":"function","z":"720c666f865b3362","name":"","func":"msg.payload = {\n \"jql\": \"project = TEST AND issuekey IN ('TEST-7', 'TEST-8', 'TEST-9')\",\n \"maxResults\": 99999,\n \"fieldsByKeys\": false,\n \"fields\": [\n \"worklog\",\n \"parent\"\n ],\n \"startAt\": 0\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1180,"y":2760,"wires":[["6bb2294b4aa08735"]]},{"id":"6bb2294b4aa08735","type":"http request","z":"720c666f865b3362","name":"","method":"POST","ret":"txt","paytoqs":"ignore","url":"https://y1digital.atlassian.net/rest/api/3/search","tls":"","persist":false,"proxy":"","authType":"basic","senderr":false,"x":1330,"y":2760,"wires":[["77320646942dd3f6"]]},{"id":"77320646942dd3f6","type":"json","z":"720c666f865b3362","name":"","property":"payload","action":"","pretty":false,"x":1470,"y":2760,"wires":[["6cd5bc92f56045e9","83dc554b0211d03b"]]},{"id":"aa58516be44b4e1f","type":"switch","z":"720c666f865b3362","name":"","property":"payload.issues","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":1590,"y":2760,"wires":[["83dc554b0211d03b"]]},{"id":"83dc554b0211d03b","type":"function","z":"720c666f865b3362","name":"","func":"var timeSpent = 0;\nvar issueKey = \"\";\n\nmsg.payload.issues.forEach(function(issue, i){\n if(issue.fields.hasOwnProperty('worklog') && issue.fields.worklog.total > 0){\n issue.fields.worklog.worklogs.forEach(function(worklog, n){\n timeSpent += worklog.timeSpentSeconds;\n });\n }\n issueKey = issue.fields.parent.key;\n});\n\nmsg.payload = {\n \"body\": {\n \"version\": 1,\n \"type\": \"doc\",\n \"content\": [\n {\n \"type\": \"paragraph\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"Time Spent: \" + (timeSpent/60/60) + \"h\"\n }\n ]\n }\n ]\n },\n \"visibility\": {\n \"type\": \"role\",\n \"value\": \"Project Manager\"\n }\n}\nconsole.log();\nmsg.issueKey = issueKey;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1720,"y":2760,"wires":[["1665f1ba228211fc"]]},{"id":"1665f1ba228211fc","type":"http request","z":"720c666f865b3362","name":"","method":"POST","ret":"txt","paytoqs":"ignore","url":"https://y1digital.atlassian.net/rest/api/3/issue/{{issueKey}}/comment","tls":"","persist":false,"proxy":"","authType":"basic","senderr":false,"x":1870,"y":2760,"wires":[["6cd5bc92f56045e9"]]},{"id":"e2af714068f8f0bd","type":"inject","z":"720c666f865b3362","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"11000000","payloadType":"str","x":520,"y":360,"wires":[["8ee35e4d90966133"]]},{"id":"8ee35e4d90966133","type":"function","z":"720c666f865b3362","name":"Process Message Calculation","func":"var payload = msg.payload;\nvar processMessage = (payload.toString().startsWith('Sein oder') && payload.length === 8) ?? false;\nmsg.processMessage = processMessage;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":730,"y":360,"wires":[["83be36dc1c117c36"]]},{"id":"83be36dc1c117c36","type":"switch","z":"720c666f865b3362","name":"Process Message?","property":"processMessage","propertyType":"msg","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":970,"y":360,"wires":[["d91ff19181e36fc7"]]},{"id":"d91ff19181e36fc7","type":"debug","z":"720c666f865b3362","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1150,"y":360,"wires":[]}]
Changed flow function since payload is nummeric.
Cheers