How to create a custom field to upload files?

Dubois May 17, 2017

Dear All

How can I create a custom field to upload a file in Jira?

The idea is to transfer a file from Jira to an external webservice.

Thanks.

3 answers

1 vote
Guillaume _Apwide_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
May 10, 2019

Hi,

I think that this is exactly what you need: https://marketplace.atlassian.com/apps/1217971/file-field-document-field-for-jira

You install it without any setup and you can upload documents and files using a Jira customfield.

Rafal Kaminski August 7, 2019

We have Data Center version and unfortunately doesn't work that plugin :(

Guillaume _Apwide_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
August 7, 2019

Apwide File field plugin works perfectly well with Data Center version. As long as the data center approved version of an add-on is not available, Atlassian will let you use it in your Jira data center instances. 

Guillaume _Apwide_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
August 29, 2020

Hi all,

Great news: the data center version of Apwide File Field has been now officially tested and approved by Atlassian!

You can download it here: https://marketplace.atlassian.com/apps/1217971/file-field-attachment-document-field?hosting=datacenter&tab=overview

Enjoy your day, keep care,

Guillaume

1 vote
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 18, 2017

A new field add-on is the right approach, but it's not going to be a trivial "simple custom field"

You will need to put a field on screen for capturing the incoming file somehow, which should be straightforward, as you'll just need to capture what the user says and call for their upload.

You probably want to have a second field to store your "reference id" (reusing the first capture field is not going to be easy, as you'll see the "view" code for it is called in places you don't expect, and edits would be a pain)

You're going to have to build an upload system to catch the incoming file and send it over to the other service.

You could simplify this a bit and drop the idea of using a field for the input - do it as an action instead, so a user can click something and get a box to ask questions, poke the file over and capture any reference given back which can then be added to a read-only custom field.I'm not aware of anything that already does anything like this with source code you could "borrow", all I can really do is point you to https://developer.atlassian.com/jiradev and say "look for p2 plugin development"

Dubois May 18, 2017

Thanks Nic. I will use your input and revert backwith more precise questions if necessary.

 

1 vote
Renjith Pillai
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.
May 17, 2017

Do you really need a custom field? Can't the existing attachments feature be used for this? 

Dubois May 18, 2017

Hello,

Thanks for your answer. No it does not fit our needs: we want to attach files using the attachments feature PLUS having a specific upload feature for some type of files. 

We want to have a special file to be transfered to external service. And make sure to differenciate this file as it is "special" for us. Not all files can be sent to the service.

The idea would be to have an <input type=file > field and intercept the stream to forward to our service, as well as saving a reference ID.

I'm new to Jira dev, but some boiler plates or guidelines would help a lot.

Like Luis Carbonell likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events