Help get this topic noticed by sharing it on Twitter, Facebook, or email.

Jira link

Hi.
I setuped Defect Tracker /type Jira/ and it connects to Jira.
But when I click 'Add defect to bug tracker' I'm getting error on Jira: You have not selected a valid project to create an issue in.

How can I choose in which project Tarantula will create a new task?
1 person has
this problem
+1
Reply
  • Ari Hakala (Prove Expertise Oy) April 03, 2012 07:30
    Hi,

    Did you select "test product" (=Jira Project) from Tarantula's "Add Defect" dialog.

    If product list is empty, you need to map Jira projects to Tarantula project. Please see:

    https://getsatisfaction.com/prove/top...
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned

  • Hi.
    When I'm selecting Jira bugtracker to be used as project's bugtracker I'm getting error in log as below:

    ==> bug_trackers.log t select anything /list is empty/ in Product name.

    Maybe I configured wrong Defect Tracker?
    1. In URL I have link to my Jira
    2. Mysql configuration
    a) Type: Jira
    b) DB Host: localhost /as DB for Tarantula is on localhost/
    c) DB name: testia /this is db for tarantula/
    d) username and passwd are written correctly
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned

  • Ari Hakala (Prove Expertise Oy) April 10, 2012 06:12
    Hi,

    For DB Host and DB Name you need to define Jira database password and name.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited sad, anxious, confused, frustrated

  • Then we have a problem.
    I have Jira on Postgresql and Tarantula wants MySQL
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited sad, anxious, confused, frustrated

  • Ari Hakala (Prove Expertise Oy) April 12, 2012 05:31
    :(

    It might still be possible to try to use Jira with Postgresql, if Tarantula (ruby-on-rails) end is configured to use postgresql connector. I will explore this option.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned

  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited sad, anxious, confused, frustrated

  • hi,

    Could you please check option to use oracle as well.
    I tried to do this my self, but I'm not familiar with ruby.
    I was not able to add oracle_enhanced library to a location where tarantula can find it.

    Kari
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned

  • Ari Hakala (Prove Expertise Oy) April 12, 2012 09:37
    I think that connection could be forced to postgres with following commands:

    # mysql -u root
    mysql> use testia;
    mysql> update import_sources set adapter = "postgresql" where true;
    mysql> exit


    This should force database connection to use postgresql. Please note that these changes are probably overwritten, if you edit defect tracker connection from user interface later.

    You will also propably need to install postgresql gem for ruby. Open gem specification file with text editor. E.g.

    # sudo su
    # nano /opt/tarantula/rails/Gemfile


    Add somewhere (e.g. after "gem mysql") following line:

    gem 'postgresql'


    After saving and exiting, update gems:

    # bundle install


    Disclaimer: I don't know if this really works, Jira/postgressql interface has never been tested.

    Please let me know, if this works for you.
    • Updates to Tarantula Jira/Postgresql integration:

      Install postgresql-devel package:

      $ yum install postgresql-devel

      Instead of (outdated) 'postgresql' gem, add following to your Gemfile:

      gem 'pg'
      gem 'i18n', '0.6.0'

      Run:
      $ bundle install --path vendor
      $ bundle package

      Edit all files under /opt/tarantula/rails/app/models/bug_tracking/jira_integration/:
      jira.rb
      jira_priority.rb
      jira_requirement.rb
      jira_user_profile.rb
      jira_issue.rb
      jira_project.rb
      jira_status.rb

      and change all uppercase table fields to lower case (as below with jira/oracle).

      Make sure your adapter for the bug tracker in Tarantula is 'postgresql' (can be given via UI in Admin > Defect Trackers.

      Restart:
      $ /etc/init.d/httpd restart
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited sad, anxious, confused, frustrated indifferent, undecided, unconcerned kidding, amused, unsure, silly

  • Ari Hakala (Prove Expertise Oy) April 12, 2012 09:48
    For Oracle following might work:

    mysql -u root
    mysql> use testia;
    mysql> update import_sources set adapter = "oracle_enhanced" where true;
    mysql> exit


    You will also propably need to install oracle gem for ruby. Open gem specification file with text editor. E.g.

    # sudo su
    # nano /opt/tarantula/rails/Gemfile


    Add somewhere (e.g. after "gem mysql") following line:

    gem 'activerecord-oracle_enhanced-adapter'


    After saving and exiting, update gems:

    # bundle install
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned

  • I get error:
    "Please install the oracle_enhanced adapter: `gem install activerecord-oracle_enhanced-adapter` (no such file to load -- active_record/connection_adapters/oracle_enhanced_adapter)"

    When trying to assign bug tracker in project.

    I have installed the oracle adapter:
    "gem install activerecord-oracle_enhanced-adapter
    Successfully installed activerecord-oracle_enhanced-adapter-1.4.1
    1 gem installed
    Installing ri documentation for activerecord-oracle_enhanced-adapter-1.4.1...
    Installing RDoc documentation for activerecord-oracle_enhanced-adapter-1.4.1..."

    Kari
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned

  • Here is how I got the oracle work from ruby:
    install oracle instant client
    install oracle devel
    set LD_LIBRARY_PATH

    *install ruby-oci8 driver
    gem install ruby-oci8

    *install oracle enhanced_adapter
    gem install activerecord-oracle_enhanced-adapter

    try oracle installation:
    ruby -rubygems -e "require 'oci8'; OCI8.new('username','password','database').exec('select * from dual') do |r| puts r.join(','); end"

    You should get
    X
    as response.

    backup Gemfile

    *edit /opt/tarantula/rails/Gemfile
    *add lines after "gem 'rack', '1.0.1'" :
    gem 'activerecord-oracle_enhanced-adapter', '~> 1.4.0'
    gem 'ruby-oci8', ">= 2.0.4"

    backup Gemfile.lock

    run

    bundle install --no-deployment

    *restart apache

    /etc/init.d/httpd restart

    Now the oracle is workin inside ruby and apache. Now I need to get the connection parameters working.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned

  • I got the apache to connect to oracle and fetch some data:
    SELECT * FROM "PROJECT"
    SELECT * FROM "PRIORITY"
    but I get following errors:
    Thu Apr 12 19:09:33 +0300 2012 [INFO] Refreshing Bug products for tracker 'Jira' (id 2)..
    Thu Apr 12 19:09:33 +0300 2012 [INFO] Creating BugProduct ''..
    Thu Apr 12 19:09:33 +0300 2012 [FATAL] Validation failed: External can't be blank

    and
    Thu Apr 12 19:09:33 +0300 2012 [INFO] Refreshing Bug severities for tracker 'Jira' (id 2)..
    Thu Apr 12 19:09:34 +0300 2012 [INFO] Creating BugSeverity 'Blocker'..
    Thu Apr 12 19:09:34 +0300 2012 [FATAL] Validation failed: External can't be blank
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited sad, anxious, confused, frustrated indifferent, undecided, unconcerned kidding, amused, unsure, silly

  • Use testia installation script (install.sh)

    install oracle instant client

    yum install oracle-instantclient11.2-basic-11.2.0.3.0-1.i386.rpm
    yum install oracle-instantclient11.2-devel-11.2.0.3.0-1.i386.rpm
    yum install oracle-instantclient11.2-sqlplus-11.2.0.3.0-1.i386.rpm
    set up environment variables:

    create /etc/profile.d/oracle.sh (this is for testing purposes)

    edit /etc/sysconfig/httpd and add following lines to the end of the file

    NLS_LANG=AMERICAN_AMERICA.UTF8
    export NLS_LANG
    export TNS_ADMIN=/etc/oracle/
    export SQLPATH=/usr/lib/oracle/11.2/client/bin
    export LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client/lib:$LD_LIBRARY_PATH
    export PATH=$PATH:$SQLPATH
    export ORACLE_HOME=/usr/lib/oracle/11.2/client
    create dir /etc/oracle

    mkdir /etc/oracle
    create /etc/oracle/tnsnames.ora file:

    SID =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = db)(PORT = 1521))
    )
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = SID)
    )
    )

    install ruby-oci8 and oracle_adapter driver

    gem install ruby-oci8
    gem install activerecord-oracle_enhanced-adapter

    try oracle installation

    ruby -rubygems -e "require 'oci8';
    OCI8.new('jira','password','SID').exec('select * from dual') do
    |r| puts r.join(','); end"
    you should get 'X' as result

    *edit /opt/tarantula/rails/Gemfile
    *add lines after "gem 'rack', '1.0.1'" :

    gem 'activerecord-oracle_enhanced-adapter', '~> 1.4.0'
    gem 'ruby-oci8', '>= 2.0.4'

    cd /opt/tarantula/rails
    RAILS_ENV=production bundle exec rake tarantula:install
    bundle install --no-deployment

    edit jira_integration-folder rb.files:

    jira_issue.rb
    jira_priority.rb
    jira_project.rb
    jira_requirement.rb
    jira_status.rb

    Basically all uppercase table fields to lower case:

    example: jira_issue.rb
    set_primary_key 'ID' -> set_primary_key 'id'
    def to_data
    {
    :lastdiffed => self['UPDATED'],
    :external_id => self['ID'],
    :name => self['SUMMARY'],
    :status => self.status.value,
    :desc => self['DESCRIPTION']
    }
    end

    ->
    def to_data
    {
    :lastdiffed => self['updated'],
    :external_id => self['id'],
    :name => self['summary'],
    :status => self.status.value,
    :desc => self['description']
    }
    end

    change JIra adapter

    mysql -u root
    use testia;
    update import_sources set adapter = "oracle_enhanced", port="1521";

    reboot

    Ari is there a way I could send you the modified files?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited sad, anxious, confused, frustrated indifferent, undecided, unconcerned kidding, amused, unsure, silly