Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How can I download a field value of an issue in a file in JIRA?

Alok Singh February 27, 2015

Screenshot from 2015-03-04 19:04:44.png

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

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.
February 27, 2015

Could you explain the requirement a bit more?  What do you mean by "download" - what's the format for example?  And why just one field?

Alok Singh February 27, 2015

I am trying to read a field value of any specific issue and copy that in a text file. I tried using CustomFieldManager class but could bot get the result.

Alok Singh February 27, 2015

*not

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.
February 27, 2015

Ok, so you are writing an addon to get plain text. Try issue.getCustomFieldValue(customField)

Alok Singh March 1, 2015

Thanks Nic

Alok Singh March 1, 2015

Hi Nick, I am trying to implement almost similar to export option on issue view page but for only specific fields(with and option to export in text file). I have already downloaded the jira source code .

Alok Singh March 3, 2015

Hi Nick, need your help here as I am unable to trigger an action when ever I click on the new web item I have created on the issue view page.

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.
March 3, 2015

That's a different question. Check the classes you've pointed the web-item action to in the xml.

Alok Singh March 4, 2015

@Nic Brough [Adaptavist] I have added the screenshot of what I am actually trying to do. Already added the web item. Now when a user clicks on the FeatureFile it should download a custom field value in a text file on user's desktop. Issue currentIssue = (Issue) jiraHelper.getContextParams().get("issue"); CustomFieldManager customFieldManager = ComponentAccessor.getCustomFieldManager(); CustomField customField = customFieldManager.getCustomFieldObject("10000"); Object goal = currentIssue.getCustomFieldValue(customField);

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.
March 7, 2015

Your code will need to construct some html that tells the browser this is a download of some text rather than a web page. Have a look at the links on the issue or issue navigator for "download to excel" or "save as word" - they do it.

TAGS
AUG Leaders

Atlassian Community Events