Redmine 1.4 & Hide user show(show only for admin)

January 27, 2012 admin No comments

vi app/controllers/users_controller.rb

    @events_by_day = events.group_by(&:event_date)

    if !User.current.admin?
        render_404
        return
    end

 

rake tmp:cache:clear
rake tmp:sessions:clear
touch tmp/restart.txt

Categories: Redmine Tags:

Redmine 1.4 & Hide list of members(author, assignee) in reports (show only for admin)

January 26, 2012 admin No comments

vi app/views/reports/issue_report.html.erb

<%= render :partial => 'simple', :locals => { :data => @issues_by_priority, :field_name => "priority_id", :rows => @priorities } %>
<br />
<% if User.current.admin? %>
<h3><%=l(:field_assigned_to)%>&nbsp;&nbsp;<%= link_to image_tag('zoom_in.png'), :action => 'issue_report_details', :detail => 'assigned_to' %></h3>
<%= render :partial => 'simple', :locals => { :data => @issues_by_assigned_to, :field_name => "assigned_to_id", :rows => @assignees } %>
<h3><%=l(:field_author)%>&nbsp;&nbsp;<%= link_to image_tag('zoom_in.png'), :action => 'issue_report_details', :detail => 'author' %></h3>
<%= render :partial => 'simple', :locals => { :data => @issues_by_author, :field_name => "author_id", :rows => @authors } %>
<% end %>

 

vi app/controllers/reports_controller.rb

    when "assigned_to"
      if User.current.admin?
        @field = "assigned_to_id"
        @rows = (Setting.issue_group_assignment? ? @project.principals : @project.users).sort
        @data = Issue.by_assigned_to(@project)
        @report_title = l(:field_assigned_to)
      end
    when "author"
      if User.current.admin?
        @field = "author_id"
        @rows = @project.users.sort
        @data = Issue.by_author(@project)
        @report_title = l(:field_author)
      endif
...

 

vi app/models/query.rb

    users = principals.select {|p| p.is_a?(User)}

    if User.current.admin?
      assigned_to_values = []
      assigned_to_values << ["<< #{l(:label_me)} >>", "me"] if User.current.logged?
      assigned_to_values += (Setting.issue_group_assignment? ? principals : users).collect{|s| [s.name, s.id.to_s] }
      @available_filters["assigned_to_id"] = { :type => :list_optional, :o rder => 4, :values => assigned_to_values } unless assigned_to_values.empty?

      author_values = []
      author_values << ["<< #{l(:label_me)} >>", "me"] if User.current.logged?
      author_values += users.collect{|s| [s.name, s.id.to_s] }
      @available_filters["author_id"] = { :type => :list, :o rder => 5, :values => author_values } unless author_values.empty?

      group_values = Group.all.collect {|g| [g.name, g.id.to_s] }
      @available_filters["member_of_group"] = { :type => :list_optional, :o rder => 6, :values => group_values } unless group_values.empty?

      role_values = Role.givable.collect {|r| [r.name, r.id.to_s] }
      @available_filters["assigned_to_role"] = { :type => :list_optional, :o rder => 7, :values => role_values } unless role_values.empty?

      if User.current.logged?
        @available_filters["watcher_id"] = { :type => :list, :o rder => 15, :values => [["<< #{l(:label_me)} >>", "me"]] }
      end
    end
...

 

rake tmp:cache:clear
rake tmp:sessions:clear
touch tmp/restart.txt

Categories: Redmine Tags:

Redmine 1.4 & Fields permissions (Hide Assigned to & due date & estimated time) in issue

January 24, 2012 admin 2 comments
rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm
yum install --enablerepo=webtatic git-core

 

cd vendor/plugins/
git clone git://github.com/resilva/Redmine-Fields-permissions.git
cd ..
cd ..
rake db:migrate_plugins RAILS_ENV=production
rake tmp:cache:clear
rake tmp:sessions:clear
touch tmp/restart.txt

 

ActionView::TemplateError (uninitialized constant ActionView::Base::CompiledTemplates::TabularFormBuilder) on line #1 of vendor/plugins/Redmine-Fields-permissions/app/views/issues/_attributes.rhtml:

cd lib
wget http://svn.ohwr.org/ohr-support/trunk/lib/tabular_form_builder.rb
rake tmp:cache:clear
rake tmp:sessions:clear
touch tmp/restart.txt

 

Categories: Redmine Tags:

Redmine 1.4 & Hide list of members in project overview (show only for admin)

January 24, 2012 admin No comments

vi app/views/projects/_members_box.html.erb

<% if @users_by_role.any? %>

 
to

<% if User.current.admin? %>

 

rake tmp:cache:clear
rake tmp:sessions:clear
touch tmp/restart.txt

Categories: Redmine Tags:

Openfiler 2.99.2 & USB boot & Large Volumes & iSCSI & Samba

November 26, 2011 admin No comments

Dell PowerEdge 2900 III
RAID-Controller -- Dell Perc 6/i (3 HDD -- HUA723020ALA640 A7K3000 2 TB)
USB-Stick -- Corsair Voyager GT 8GB

Openfiler 2.99.1 & USB boot

Openfiler 2.99 is much easier to install on a USB stick than 2.3, because it loads USB drivers earlier in the boot process.

  • At the installer screen, type ‘linux text’.
  • Partition your drive as follows:
    • /boot, ext2, 100MB, primary
    • /, ext3, 4096MB , primary
    • /var/log, ext3, Fill to max, not primary

 

Patch the new install to 2.99.2

Login with SSH or the console and run

conary sync group-openfileresa-appliance
conary updateall --keep-required

 

Openfiler 2.99.2 & Creating a Physical Large Volume

  • Click on Volumes tab
  • Click on Block Devices to access the Physical Volume creation page

Volumes Volume Groups

  • Click on the disk you want to create the Volume on (Example: /dev/sdb)

Volumes Block Devices

  • Adjust the start and end cylinders to determine the size of physical volume and when satisfied press the ‘Create’ button

Volumes Block Devices Edit Partitions

But it only uses 95% of the free space.
Volumes Block Devices Edit Partitions

Login with SSH or the console and run

parted /dev/sdb
(parted) rm 1
(parted) mkpart primary ext3 0 -1
(parted) set 1 lvm on
parted /dev/sdb
GNU Parted 1.8.8
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: DELL PERC 6/i (scsi)
Disk /dev/sdb: 4000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
 1      17.4kB  3814GB  3814GB               primary  lvm

(parted) rm 1
(parted) mkpart primary ext3 0 -1
(parted) print
Model: DELL PERC 6/i (scsi)
Disk /dev/sdb: 4000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
 1      17.4kB  4000GB  4000GB               primary  msftres

(parted) set 1 lvm on
(parted) print
Model: DELL PERC 6/i (scsi)
Disk /dev/sdb: 4000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
 1      17.4kB  4000GB  4000GB               primary  lvm

(parted)

You should now be presented with 100% space
Volumes Block Devices Edit Partitions
 

Openfiler 2.99.2 & iSCSI & Samba

Create a New Volume Group

  • Click on Volumes tab
  • Click Volume Groups to create a volume group.
  • Name your volume group and add your partitions.
  • Click Add volume group

Volumes Volume Groups

You should now be presented with a new Volume Group that looks like this
Volumes Volume Groups

Add New Volume for iSCSI

  • Click on Volumes tab
  • Click Add Volume
  • Enter in a volume name: no spaces, no fancy characters
  • Enter in the amount of space in MB required
  • Select the type ‘block’
  • Click Create

Volumes Add Volume Mozilla

You should now be presented with a new Volume for iSCSI that looks like this:
Volumes Manage Volumes
 

Add New Volume for Samba
You will need to setup Volumes with either XFS or EXT3 filesystems (you cannot create shares from iSCSI volumes).

  • Click on Volumes tab
  • Click Add Volume
  • Enter in a volume name: no spaces, no fancy characters
  • Enter in the amount of space in MB required
  • Select the type ‘ext3′
  • Click Create

Volumes Add Volume

You should now be presented with a new Volume for Samba that looks like this
Volumes Manage Volumes

Enable the iSCSI and Samba Target Service

  • Click on Services -> CIFS server -> Enable
  • Click on Services -> CIFS server -> Start
  • Click on Services -> iSCSI target -> Enable
  • Click on Services -> iSCSI target -> Start

Services Section

Network Access Configuration

  • Click on System tab
  • Click Network Setup
  • In the Network Access Configuration section
    • Name: The name of the host or the network
    • Single machine example(Crossover Cable ESX Network)
      • Network/Host: 192.168.182.177
      • Netmask: 255.255.255.255
    • Network example
      • Network/Host: 192.168.181.0
      • Netmask: 255.255.255.0

System Network Setup

Add iSCSI Target

  • Click on Volumes tab
  • Click iSCSI Targets
  • In the Add new iSCSI Target section
    • Click Add

Map the LUN
You now need to map a LUN to your iSCSI target

  • Click on Volumes tab
  • Click iSCSI Targets
  • Select the Target Configuration tab
    • In the Select iSCSI Target section, select the iSCSI target that you want to work on from the drop-down and click Change
      • Select the LUN Mapping tab
        • Click Map

      Volumes iSCSI Targets

      Allow access to the iSCSI Target:
      Volumes iSCSI Targets

      Use LDAP

      • Click on Accounts / Authentication
      • Check Use LDAP
      • Check Use Local LDAP
      • Server: 127.0.0.1
      • Base DN: dc=openfiler,dc=nas
      • Root bind DN: cn=Manager,dc=openfiler,dc=nas
      • Root bind password: your_root_password

      Accounts Authentication

      Add Network Shares

      • Click on Shares
      • Click on the link for your volume and create a sub-folder.
      • Click on the link for your new sub-folder and Make Share
      • Scroll down to “Group Access Configuration”
        • Select a group to be your primary group.
        • Select permissions for the rest of your groups
      • Scroll down to “Host Access Configuration”
        • Select the MAXIMUM ALLOWABLE permissions for your networks

      Shares Section

      Shares Edit Share
      Shares Section

      Synchronise Time

      • Click on System tab
      • Click Clock Setup
      • Server: 1.pool.ntp.org
      • Click Setup synchronization

      System Clock Setup

      Links

      Using Openfiler and vSphere ESX / ESXi 4

Categories: Openfiler Tags:

How to install graphviz & Redmine 1.2 (CentOS 5.6)

November 2, 2011 admin No comments

Imtall graphviz

# wget -O /etc/yum.repos.d/graphviz-rhel.repo http://www.graphviz.org/graphviz-rhel.repo
# yum install graphviz.x86_64
# yum install graphviz-gd
# yum install graphviz-ruby

 

Imtall wiki_graphviz_plugin

/opt/redmine/vendor/plugins/wiki_graphviz_plugin/

# mkdir /opt/redmine/tmp/wiki_graphviz_plugin
# chown -R apache:apache /opt/redmine/tmp/
# cd /opt/redmine
# /etc/init.d/httpd restart

 

Categories: CentOS, Redmine Tags:

PHPUnit & Symfony functional test

April 11, 2011 admin No comments
not ok 4 - last request threw an uncaught exception RuntimeException: PHP sent a warning error at C:\jenkins\workspace\ris\db\mssql\os\win\src\apps\frontend\modules\img\actions\actions.class.php line 56 (Cannot modify header information - headers already sent by (output started at C:\Programme\PHP\PEAR\PHPUnit\Util\Printer.php:173))
#     Failed test (.\lib\vendor\symfony\lib\test\sfTestFunctionalBase.class.php at line 541)

If you do unit testing and encounter “headers already sent” errors in “Printer” on line 173, add “–stderr” to the command call. PHPUnit will then output everything to stderr and cease throwing ErrorExceptions.

Categories: Troubleshooting Tags:

Microsoft Dynamics NAV & SQL Server 2008 R2 Express

February 28, 2011 admin No comments
USE master
EXEC sp_addextendedpro[delme]c xp_ndo_enumusergroups, 'C:\Programme\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\Binn\xp_ndo.dll'
GO

GRANT EXECUTE
ON [xp_ndo_enumusergroups]
TO PUBLIC
GO
Categories: NAV Tags:

RIS & Redmine

January 25, 2011 admin No comments

Redmine configuration

Administration - Custom fields
Administration - Settings - Autentification
My account - API access key

RIS risRedminePlugin configuration

  1. Open the plugin configuration file: C:\htdocs\ris\plugins\risRedminePlugin\config\app.yml
  2. Make sure to change url and key to match your Redmine url and API access key.
    all:
      pagination:
        redmineprojects:              10
        redminetasks:                 10
      redmine:
        url:                          http://localhost:8000
        key:                          77b08c3b1c17ff101a25c3fc2113dc8c8fa5c28a
        custom_field_uuid_id:         1
        priority_id:                  4
        tracker_id:                   2
    
  3. Open the plugin configuration file: C:\htdocs\ris\config\ProjectConfiguration.class.php
  4. Add risRedminePlugin to the enablePlugins array in your project Configuration
    <?php
    
    //date_default_timezone_set('UTC');
    date_default_timezone_set('Europe/Berlin');
    
    require_once dirname(__FILE__).'/../lib/vendor/symfony/lib/autoload/sfCoreAutoload.class.php';
    sfCoreAutoload::register();
    
    class ProjectConfiguration extends sfProjectConfiguration
    {
    	public function setup()
    	{
    		$this->enablePlugins('sfPropel15Plugin', 'sfProtoculousPlugin', 'sfDateTime2Plugin', 'sfFormExtraPlugin', 'sfPropelUuidBehaviorPlugin', 'sfFormButtonsPlugin', 'sfAmfPlugin', 'risRedminePlugin', 'sfPhpExcelPlugin');
    		$this->setIncludePath();
    	}
    
    	public function setIncludePath()
    	{
    		sfToolkit::addIncludePath(dirname(__FILE__).'/../lib/vendor/PEAR/', 'front');
    	}
    }
    

Projekt in Redmine importieren(ohne Vorgänge)


Folgende Daten werden mittels REST-API von RIS zu Redmine automatisch übergeben:

  • Name
  • Beschreibung
  • Kennung – UUID des Projekts


Ticket in Redmine importieren / aktualisieren


Folgende Daten werden mittels REST-API von RIS zu Redmine automatisch übergeben:

  • Thema – Vorgangsname
  • Beschreibung
  • Status – konfigurierbar für alle importierten Tickets
  • Priorität – konfigurierbar für alle importierten Tickets
  • Zugewiesen am Vorgangs – Mitarbeiter, bei dem das Kontrollkästchen “Besitzer” angekreuzt ist, oder der erste zugewiesene Mitarbeiter
  • Beginn
  • Abgabedatum
  • Geschätzter Aufwand
  • Beobachter – Alle Vorgangs-Mitarbeiter
  • Benutzerdefinierte Felder “uuid” – UUID des Vorgangs

Zuordnung Mitarbeiter vom Rillsoft Ressourcenpool zu Redmine-Mitglied wird über E-Mail-Adresse gemacht

Übername von aufgewendeter Zeit aus Redmine

  1. Aufgewendete Zeit wird von allen untergeordneten Tickets gesammelt und an Vorgangs-Mitarbeiter übernommen.
  2. Aufgewendete Zeit von Redmine-Mitglied, der nicht dem Vorgangs-Mitarbeiter zugeordnet ist, wird nicht übernommen.
  3. Wenn Ticket auf 100% erledigt ist, werden wie tatsächlich erbrachter Aufwand so auch Anfang und Ende aus aufgewendeter Zeit übernommen und der Vorgang wird als abgeschlossen markiert.






Categories: Redmine, Rillsoft Tags:

How to install RIS & MS SQL Server(Win 7)

January 17, 2011 admin No comments

Create RIS database (MS SQL Server Express Edition 2005/2008)

  1. Press the Start menu button and launch Command Prompt
    SQLCMD -S (local)\SQLEXPRESS -E
    
  2. Execute the following commands to create a new database and user:
    -- Create database
    CREATE DATABASE ris
    GO
    
    -- Create login
    CREATE LOGIN ris WITH PASSWORD = 'myPassword', DEFAULT_DATABASE = ris, DEFAULT_LANGUAGE = english;
    GO
    
    -- Create user
    CREATE USER ris;
    USE ris;
    CREATE USER ris FOR LOGIN ris;
    GO
    
    -- Define role
    EXEC sys.sp_addrolemember @membername = 'ris', @rolename = 'db_owner'
    
  3. Execute the following command to exit SQL Server console:
    EXIT
    

 

Configure PHP for MS SQL

  1. Download and Install Microsoft® SQL Server® 2008 R2 Native Client sqlncli.msi
  2. Download Microsoft Drivers for PHP for SQL Server SQLSRV20.EXE
  3. Installed the SQLSRV20.EXE in C:\Program Files\PHP\ext
  4. Open the PHP configuration file: C:\Program Files\PHP\php.ini
  5. Insert the following configuration parameters:
    ...
    extension=php_sqlsrv_53_ts_vc6.dll
    extension=php_pdo_sqlsrv_53_ts_vc6.dll
    ...
    

 

RIS Database configuration for MS SQL

  1. Open the databases configuration file: C:\htdocs\ris\config\databases.yml
  2. Make sure to change host, dbname, username and password to match your account.
    dev:
      propel:
        param:
          classname:  DebugPDO
          debug:
            realmemoryusage: true
            details:
              time:       { enabled: true }
              slow:       { enabled: true, threshold: 0.1 }
              mem:        { enabled: true }
              mempeak:    { enabled: true }
              method:     { enabled: true }
              memdelta:   { enabled: true }
              querycount: { enabled: true }
    test:
      propel:
        param:
          classname:  DebugPDO
    all:
      propel:
        class:        sfPropelDatabase
        param:
          classname:  PropelPDO
          dsn:        sqlsrv:Server=localhost\SQLEXPRESS,1031;Database=ris
          username:   ris
          password:   myPassword
          encoding:   utf-8
          persistent: true
          pooling:    true
    
  3. Open the propel configuration file: C:\htdocs\ris\config\propel.ini
  4. Make sure to change host, dbname, user and password to match your account.
    propel.targetPackage       = lib.model
    propel.packageObjectModel  = true
    propel.project             = ris
    propel.database            = mssql
    propel.database.driver     = mssql
    propel.database.url        = sqlsrv:Server=localhost\SQLEXPRESS,1031;Database=ris
    propel.database.createUrl  = ${propel.database.url}
    propel.database.user       = ris
    propel.database.password   = myPassword
    propel.database.encoding   = utf-8
    ...
    
Categories: Rillsoft Tags: