copy the name of attachments in a custom field

Leena Pratheepan September 10, 2024

Hello Atlassian Community,

I would like to display the names of the attached files in a custom field. I tried it with Jira Automation, but it doesn't work.

When: Field value changed : Attachments

If: Issuetype = Task

Edit Fields: Documents:

{{issue.attachments}}

Error message: Unknown fields set during editing. These may not be available for the project/type. Check your configuration for custom fields. Fields ignored -

 

Do you have an alternative solution for this?

Does anyone have experience with Listener from Scriptrunner?

 

Best Regards, Leena

3 answers

1 accepted

1 vote
Answer accepted
Cristian0791
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 10, 2024

Hi Leena,

It looks like you're trying to dynamically update a custom field with the names of attached files using Jira Automation, but Jira’s native automation doesn’t allow direct updates to custom fields with attachment data.

Leena Pratheepan September 24, 2024

Yes, you`re right.

I use Element Connect. It works.

I create an element connect textfield with database SQL and made an automation rule for population.

Thank you all for your comments

0 votes
Nikola Perisic
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 10, 2024

Hello @Leena Pratheepan 

You just need to make adjustments, for example:Screenshot 2024-09-10 at 12.26.32.png

Each time you add an attachment, it will separate it by comma (their names).

Leena Pratheepan September 10, 2024

Thank you for your answer, But it does not work,

Error message:
Unknown fields specified during editing. These may not be available for the project/type. Check your configuration for custom fields. Fields ignored -
Documents to be submitted incl. chapter (customfield_20806)
No fields or field values to edit tasks (possibly due to field values that do not exist in a specific project)

This error message is not possible because it is present in the field configuration of the schemas and has no configuration in custom field.

Nikola Perisic
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 10, 2024

Have you double checked everything related to the custom field?

Leena Pratheepan September 10, 2024

Yes

Nikola Perisic
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 10, 2024

Please send screenshots where you have included your custom field Documents. Blur all of the confidential data.

0 votes
Tomasz Kowalczyk
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 10, 2024

Hi @Leena Pratheepan

I'm wondering why do you need a list of attachments in the field. smart value {{issue.attachments}} will try to throw attachments to mentioned field. If its even possible maybe try something like this {{issue.attachments.filename}} but i'm not sure if this gonna work. If you have scriptrunner you can try add a script field which will loop throw all attachments and dynamically show all of its filenames in the field.

 

Leena Pratheepan September 10, 2024

Thank you for your reply.

We need all the names of the attached documents for export purposes.We have Scriptrunner. I have not yet worked with Script Field. I'll have to look again

Suggest an answer

Log in or Sign up to answer