Project

General

Profile

need help creating tickets from remote servers

Added by daniel doe over 13 years ago

Hi there,

I am new to redmine and cant seem to find any material regarding ticket/issue creation using scripts from other servers.

We want to use redmine as a changelog server but also as a wiki server, dokcumentation etc.

When we make changes to our servers today we edit a changelog file (on the local server) and writes down the changes being made. If a problem do occur later my collegues are able to see the changes I made earlier. What I want is a way to create these tickets from all our server and pass them to our redmin server.

1: Is it only possible by using mail?
2: Does that requre a mailserver installed on the redmine server?
3: Does that require that the mail server (all our servers are using) knows the mailserver running on redmine?

Does that make any sense?

Regards,


Replies (10)

RE: need help creating tickets from remote servers - Added by Stefan H Singer over 13 years ago

1: No, I think you could use the REST API as well.
2: No.
3: No.

Regarding how to set redmine up to create issues via e-mail, look here:
http://www.redmine.org/wiki/redmine/RedmineReceivingEmails

RE: need help creating tickets from remote servers - Added by daniel doe over 13 years ago

Hi Stefan,

Thanks for the answer I already found that site you are refering to but i guess I dont quite understand it.

The only way to create tickets by email is to follow this guide?

NB (dont want to use our mail server or IMAP)

Reading emails from standard input¶

A rake task (redmine:email:receive) can be used to read a single raw email from the standard input.

But how? I mean how do I send the mail with the ticket creating to my redmine server. Do I use the IP to send it to the server or?

  1. No project specified. Emails MUST contain the 'Project' keyword:
    rake redmine:email:read RAILS_ENV="production" < raw_email
  1. Fixed project and default tracker specified, but emails can override
  2. both tracker and priority attributes:
    rake redmine:email:read RAILS_ENV="production" \\
    project=foo \\
    tracker=bug \\
    allow_override=tracker,priority < raw_email

Sorry but I really dont get it.

RE: need help creating tickets from remote servers - Added by Stefan H Singer over 13 years ago

You need to have a mail server SOMEWHERE. Otherwise it's not possible to send e-mails to the address you'll be using.

RE: need help creating tickets from remote servers - Added by daniel doe over 13 years ago

Hi Stefan,

Allright I have configured a IMAP service which works now (using the browser to access the mail) but I keep getting an error trying to fetch mails from redmine:

rake -f /www/redmine/vendor/rails/actionmailer/Rakefile redmine:email:receive_imap RAILS_ENV="production" host=mail.xxx.dk username=redmin password=xxxxxx

root@pvunixadm:/www/redmine/vendor/rails/actionmailer# rake -f /www/redmine/vendor/rails/actionmailer/Rakefile redmine:email:receive_imap ssl=SSL RAILS_ENV="production" host=mail.xxx.dk username=redmin password=xxx --trace
(in /www/redmine/vendor/rails/actionmailer)
rake aborted!
Don't know how to build task 'redmine:email:receive_imap'
/usr/lib/ruby/1.8/rake.rb:1728:in `[]'
/usr/lib/ruby/1.8/rake.rb:2050:in `invoke_task'
/usr/lib/ruby/1.8/rake.rb:2029:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2029:in `each'
/usr/lib/ruby/1.8/rake.rb:2029:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:2023:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2001:in `run'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1998:in `run'
/usr/bin/rake:28

root@adm:/www/redmine/app# RAILS_ENV="production" rake T redmine
(in /www/redmine/app)
rake aborted!
no such file to load -
/www/redmine/app/lib/action_mailer/version
/www/redmine/app/Rakefile:7
(See full trace by running task with --trace)

What I dont understand is what should be in the Rakefile?
Im running version 1.0.3 (2010-10-31)

RE: need help creating tickets from remote servers - Added by Stefan H Singer over 13 years ago

Have you installed the action_mailer_optional_tls plugin and included that in your environment config?

RE: need help creating tickets from remote servers - Added by daniel doe over 13 years ago

No I have not. Is that necessary when using IMAP?

root@pvunixadm:/www/redmine/app# rake -f /www/redmine/app/Rakefile redmine:email:receive_imap RAILS_ENV="production" host=mail.xxx.dk username=redmin password=xxx --trace
(in /www/redmine/app)
rake aborted!
/www/redmine/app/Rakefile:1: syntax error, unexpected ':', expecting $end
redmine:email:receive_imap
^
/usr/lib/ruby/1.8/rake.rb:2383:in `load'
/usr/lib/ruby/1.8/rake.rb:2383:in `raw_load_rakefile'
/usr/lib/ruby/1.8/rake.rb:2017:in `load_rakefile'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:2016:in `load_rakefile'
/usr/lib/ruby/1.8/rake.rb:2000:in `run'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1998:in `run'
/usr/bin/rake:28
root@pvunixadm:/www/redmine/app# cat Rakefile
redmine:email:receive_imap

root@pvunixadm:/www/redmine/app# RAILS_ENV="production" rake -T redmine
(in /www/redmine/app)
rake aborted!
/www/redmine/app/Rakefile:1: syntax error, unexpected ':', expecting $end
redmine:email:receive_imap
^

(See full trace by running task with --trace)

Well im kinda lost :-)

RE: need help creating tickets from remote servers - Added by Stefan H Singer over 13 years ago

Actually I'm not certain about that :)

Here's what my rake command looks like:
rake -f /usr/share/redmine/Rakefile redmine:email:receive_imap RAILS_ENV="production" host=imap.gmail.com port=993 ssl=SSL username= password=thepassword allow_override=tracker,priority

are you sure about your username? "redmin" ? is more common afaik.

RE: need help creating tickets from remote servers - Added by daniel doe over 13 years ago

Yes the username is fine :-)

Would you please cat your Rakefile?

I really would like to see whats inside.

RE: need help creating tickets from remote servers - Added by Stefan H Singer over 13 years ago

I haven't touched the rakefile, it's the one you get with redmine.

have you tried running in development instead of production and looking at the logs?

RE: need help creating tickets from remote servers - Added by daniel doe over 13 years ago

Im afraid that a collegue of mine has changed the file - So I want to see whats inside it :-)

I have quite a few Rakefiles

root@pvunixadm:/www/redmine# find . -name Rakefile
./vendor/rails/actionmailer/Rakefile
./vendor/rails/activeresource/Rakefile
./vendor/rails/activemodel/Rakefile
./vendor/rails/actionpack/Rakefile
./vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/Rakefile
./vendor/rails/railties/Rakefile
./vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/Rakefile
./vendor/rails/activesupport/Rakefile
./vendor/rails/activerecord/Rakefile
./vendor/plugins/open_id_authentication/Rakefile
./vendor/plugins/awesome_nested_set/Rakefile
./vendor/plugins/acts_as_versioned/Rakefile
./vendor/plugins/gravatar/Rakefile
./vendor/plugins/classic_pagination/Rakefile
./vendor/plugins/acts_as_tree/Rakefile
./vendor/plugins/engines/Rakefile
./vendor/gems/rubytree-0.5.2/Rakefile
./app/lib/action_mailer/Rakefile
./app/Rakefile
./Rakefile

    (1-10/10)