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

I want to eliminate email attachments while when jira creates issue from it.

David Lemon April 28, 2013

hello,

i want to add a function which looks for the certain email attachment in the mail an eliminate it when the issue is been created.

eg:

attachment 1: atlassian_logo.jpeg

attachment 2: attachment_snap.jpeg

while we see that attachment 1 is not required And will fill up my database unnecessary.
while jira creates an issue it should remove the atlassian_logo.jpeg and only save attachment2 in to DB.

how will i acheave it?

4 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Answer accepted
Vidic Florjan
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.
April 28, 2013

You can also try use Script Runner plugin (free).

  1. Install Script Runnner plugin,
  2. prepare script (example how to delete attachments is on link https://answers.atlassian.com/questions/106733/deleting-all-attachments-through-groovy, use if ... else statement to filter attachments you want/don't want to delete) and
  3. add script to the Create Issue transition (select View postscript function, choose Add, select Script Post-Function, click Add and enter the Script file path).

1 vote
MJ
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 28, 2013

This is not possible within JIRA itself. Though a third party paid plugin, Enterpise Mail Handler might provide the functionality you are looking for. In particular, have a look at this.

Andy Brook [Plugin People]
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.
April 28, 2013

Yes, right on the money. JEMH can disable email attachments entirely, based on wildcard, or based on uniqiue MD5 fingerprint (this is what you want)

0 votes
David Lemon May 2, 2013

Thanks @Vidic the problem can be solved by the getAttachment class. we can find the file which should not be there and delete it using the delete function. can be done using the jira java plugins using listener. and also https://answers.atlassian.com/questions/106733/deleting-all-attachments-through-groovy groovy is the way.

0 votes
Timothy
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.
April 28, 2013

I don't know if such an email handler exist. You will need to check the marketplace. If not, you will have to create your own email handler.

Andy Brook [Plugin People]
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.
April 28, 2013

Hi Timothy, Im surprised you havent heard of JEMH, its the most comprehensive mail handler for JIRA and does almost everything thats needed, please take a look at the JRA list satisfied by JEMH - https://thepluginpeople.atlassian.net/wiki/display/JEMH/JRAs+implemented+by+JEMH

David Lemon May 2, 2013

hi Timothy, just creating email handeller doesnot provide you the option for removing the attachments or which to keep. you need a special tool for that.

whel JEMH is a fine tool to do many things for you email handelling. You name it and it does it. But just to do my kind of task paying so much is out of the question. so reffer to my answer for the correct way without spending a penny

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events