Issue and IssueComment attachments field is always an empty Set when accessed in a workflow?
What gives?
How am I supposed to include links to attachments when sending issue activity notifications to an external service?
Please sign in to leave a comment.
Hi Hjvt,
If the issue/issue comment contains attachments, the
attachments
property shouldn't return an empty set. Can you please share the full workflow code you use to query the attachments? It'll help us investigate the issue further.Also, can you please share which YouTrack version you use?
We are on
Build 2025.1.69895
And this seems to be the minimum reproducer:
JSON.stringify converts
Set
objects to{}
, so the result is expected. You mentioned sending links to attachments to the external service, so it makes sense to iterate through thecomment.attachments
set and build a special JavaScript object consisting offileUrl
properties (and possibly other necessary data). Alternatively, you can try converting a set into an array.