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

Creating and commenting on jira using folders on the mailbox

ashen shanaka December 12, 2012

Hi

My company wants to connect our official gmail account to jira. and configure both to create and comment issues, projects..

which means

when i get a mail, and when i put it in a specific mail folder in my mailbox, the jira should create a new issue.frankly saying that folder is a project and mails go in that folder are issues.

can i do that? if so how? please reply as i have to deiver the solution by next wednesday..thanks..

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
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.
December 12, 2012

Not without some work on the mail server or client side. Jira can create and comment on issues, but it has to assume that ALL incoming mail is for it. It needs it's own mailbox. Depending on the mail server you are using, you might be able to rig it up so your folder looks like a separate mailbox (I don't lnow mail servers well enough to tell), but I suspect the best answer will for you to get a separate dedicated mailbox and then forward the mails to that.

You might also be able to set up Jira to read the mail as files in a directory. If your mailserver or client can be configured so that the mails get converted to files on a directory Jira can see, that might work.

ashen shanaka December 13, 2012

Hi Nic

as i mentioned we are using gmail.i have made a email client using imap protocol to sync gmail to a web page.in my client i can move mails within folders inside the mailbox. i think i can get it to send a mail to jira whenever a new mail is moved to a specific mailbox. will that work?

if so can you tell me how to configure jira to recieve that mail and make a appropriate issue on a certain project.

if you can point me to a step by step procedure i will be really greateful.

but this is only what i think. if theres another way to do my task without sending a mail, that would be invaluable.thanks for taking time to answer.

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.
December 13, 2012

Creating issues from a mailbox needs an inbound mail handler:

- https://confluence.atlassian.com/display/JIRA/Creating+Issues+and+Comments+from+Email

When setting this up you can nominate a source, which could be POP/IMAP or a folder. I think that the mechanics of a shared network drive would be specific to your network environment, your server and client OS's. The trick with the folder route is that you will need to provide vendor neutral text format, so if you happen be using a proprietary email client such as Outlook, dropping a .msg file is not going to accomplish anything, it would need to look something like:

From: user@place.com
To: inbox@jira.myco.net
Subject: Example mail

Content here.

This is very important when HTML mail is concerned.

ashen shanaka December 13, 2012

im new to jira.so please treat me as a newbie.

i knw that i have to configure a mail service first.so i used this documentation and did it.

https://confluence.atlassian.com/display/JIRA/Using+Gmail+as+a+JIRA+Mail+Server#UsingGmailasaJIRAMailServer-certificate

and after that by using this documentation

https://confluence.atlassian.com/display/JIRA/Configuring+JIRA%27s+SMTP+Mail+Server+to+Send+Notifications

when i entered the jndi location specified in the first doc to the second doc...i got an error saying

NameNotFoundException: Name [mail/GmailSmtpServer] is not bound in this Context. Unable to find [mail].

please help me..thanks

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.
December 13, 2012

whats your JIRA running in, Tomcat as part of the standard stand-alone download?

From the Configuring JNDI section, your JNDI would be:

java:comp/env/mail/JiraMailServer

And your config would be:

<Context path="" docBase="${catalina.home}/atlassian-jira" reloadable="false">
 ...
   <Resource name="mail/JiraMailServer"
     auth="Container"
     type="javax.mail.Session"
     mail.smtp.host="mail.yourcompany.com"
     mail.smtp.port="25"
     mail.transport.protocol="smtp"
     mail.smtp.auth="true"
     mail.smtp.user="jirauser"
     password="mypassword"
   />
 ...
</Context>

ashen shanaka December 13, 2012

hi Andy

i was mistaken all along. i need to integrate jira so that it will monitor my inbox and create issues as per mails it recieves.for that i need to cretae a imap pop3 mail server.not an smtp one.i know that now.sorry for the irrelevant question i asked.im really sorry.

but i still have a question about that.please answer if you can.

for now i have created a mail handler so that it will create issues accordingly as mails recieves. is there a way to stop it from deleting the mails ones its processed? and delete the issue if i deleted the mail from my inbox? please answer..thanks

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.
December 13, 2012

Happens, np.

<plug>When the default handlers dont do what you want with incoming email handling, have a look at JEMH</plug>

Re: second thing, JIRA will send a 'delete' to the mailserver if it is processed, the mailserver is in charge of what it does next. Gmail, from experience doesnt delete them, just marks them as read.

ashen shanaka December 13, 2012

But mines delete them..i dont know why..

but the odd thing is when i check my deleted items its not there as well.maybe your right.i'll check if they are in another folder.

i dont think my boss wants me to buy something to do this. i have seen that plug in. its not what iam expecting i suppose. does this means i have to create my own plug in? can you guide me if thats the case?

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.
December 13, 2012

There are default (free) Atlassian mail handlers, see the link above, eg CreateOrComment, that will get you running, perhaps you'll not need anything further, perhaps not?!

ashen shanaka December 13, 2012

yes andy.

i have tried the free mail handlers.but its not what i want.

heres why i want this task to be done

my company wants the applications coming for job opennings to be stored in a mailbox(a folder) in the careers@companyname.com and jira to monitor that folder and issue tasks accordingly.so basically for example..

when i send a mail to careers@something.com...a task should be created in jira according to the mailbox the reciever puts my mail in.if its in the web developemnet folder the task is created under web developement project in jira. and if the reciever(my boss) thinks this person is good for PHP.he can move the mail from PHP folder to the web folder.so the appropriate task should be deleted from jira's web project and should create a new task Under PHP project...

i hope you got what i need..

so any comments on how to do 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.
December 13, 2012

Well, you can use the default mail handlers and route them to a project, perhaps even a component. have the component with the assignee of your boss. Done. Whether you use IMAP or POP, the mechanism is pretty similar.

What you describe is a partially automated process (email coming in, getting routed into a project), manual review by your boss, followed by him executing an Edit/Move of the issue. In the move scenario, JIRA will take care of the creation of new / removal of old.

Im not sure I see how can this be automated further for your scenario?

ashen shanaka December 13, 2012

what about the mails been deleted from the folder?

im stuck in that atm. checked my folders but its completely gone.i cannot seems to find a way to modify the source code of the plugin aswell.let aside that i cannot find the source code even.lol..

if i can get to do that.then this conversation is over..:)

and i thankyou alot for answering because i really dont know anything about jira and i learned all this today..thanks again.

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.
December 13, 2012

http://support.google.com/mail/bin/answer.py?hl=en&answer=78755

I think you'll find your messages get their folder 'labels' removed. The messages haven't been deleted but they are no longer labelled therefore appear gone...

ashen shanaka December 13, 2012

yes

but searching again for a single email within all mails is not a good solution. if i can only get the source code of the plug in, then i can use it to remove the deleting option and modify it for my needs. is it possible? or do i have to make a new plugin?

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.
December 13, 2012

It wont help. If you dont mark the messages as read, JIRA will re-read them, forever. To do this you would have to reimplement the entire mail retrieval stack, remembering the last 'timestamp' that was read.

ashen shanaka December 13, 2012

yes i know.i just have to figure out how to tell jira to remember the time stamp and get newer mails after that day.but then i will have to figure out a way to make jira remember time stamps to every project. dont know if thats possible.but for now its my only option.im all ears if you think there is a more suitable option..

thanks again for taking time to answer.really appreciate it.

EDIT:- when i told my boss about what i did .the first thing he asked was how to move mails if later found out the applicant is good for some other field like PHP or .NET..:(

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.
December 15, 2012

IMO this approach is just wrong, get the content into JIRA, label it, deal with it in JIRA. Trying to synchronize external IMAP folder movements into JIRA issue movement is just redudant work, use JIRA, the tools are there already?

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.
December 16, 2012

I have to agree with Andy here - whilst it's very useful to be able to create and update issues via incoming emails, you're now trying to duplicate the work, on systems that simply aren't built for it. I'd forget this approach and handle it all in Jira (Whilst still allowing people to create/comment via emails)

ashen shanaka December 16, 2012

if i can only tell that to my boss..sigh..but nevertheless thanks all for your help..im accepting andys answer.. thankyou all..

TAGS
AUG Leaders

Atlassian Community Events