DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:redissue

Redissue Plugin

Compatible with DokuWiki

  • 2017-02-19 "Frusterick Manners" yes
  • 2016-06-26 "Elenor Of Tsort" yes
  • 2015-08-10 "Detritus" yes
  • 2014-09-29 "Hrun" yes

plugin Create link to issue of your redmine's server and display the issue's status, subject and name of it automatically.

Last updated on
2017-04-24
Provides
Syntax, Action
Repository
Source

Tagged with bootstrap, issue, redmine

Redissue is a plugin for Dokuwiki who make a link beetween Dokuwiki and Redmine issues. He can get data from your redmine server and display name, status and subject of issues.

You can also display many issues of a specific project and / or a specific tracker.

He can manage access rights (see below) if you have API key of a Redmine's Admin account.

Installation

Download this plugins into your ${dokuwiki_root}/lib/plugins folder and restart dokuwiki.

Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.

Requirements

Redissue needs a php API to work. You have to download PHP-Redmine-API inside the ROOT of redissue's install or inside /usr/share/php. If you use redproject too, the second option is better, as you have just to download Php-redmine-API one time.

Also PHP-Redmine-API requires PHP curl extension, not required by dokuwiki itself.

mkdir vendor
cd vendor
git clone https://github.com/kbsali/php-redmine-api.git
cd php-redmine-api
# Go to last version. Use "git describe --abbrev=0" to see last tag.
git checkout v1.5.x

Syntax

Single Issue Syntax

<redissue id='#number_issue' text="text if no Rights or API" />

Note : The text parameter only appears if the user has no rights to see the issue, if issue does not exist or if no API key is recorded.

Multiple Issues Syntax

If you want to get all issues of a specific project and/or a specific tracker, it's also possible. You've 2 other options:

  • project: the right identifier of the project (Available in the settings of redmine project): project=“myproject”
  • tracker: the identifier number of your tracker. (You can found this number if you look at the number in the link of a tracker): tracker=“3”

In this case, the two parameters must be set, but one can be empty. E.g: if you want to have all issues of a project for all trackers, you can leave tracker empty.

  • limit: set the number of issues displayed. if not set, default is 25.

Examples:

// Display the first 25 issues with tracker 1 for project "myproject"
<redissue project="myproject" tracker="1" />
// Display the first 25 issues for project "myproject"
<redissue project="myproject" tracker="" />
// Display the first 50 issues with tracker 4 for all projects (if you have rights)
<redissue project="" tracker="4" limit="50" />

Manage Multiple servers

  • server: server option override the server url and the API key defined in settings. You must define these in server.json file (located at the root of the plugin redissue). You can set as many servers as you want :-P

Example of server.json file:

{
    "first": {
        "url": "http://myfirst.redmine.com",
        "api_token": "abcdefghijklmnopqrstuvwxyz0123456789"
    },
    "second": {
        "url": "http://mysecond.redmine.com",
        "api_token": "zyxwvutsrqponmlkjihgfedcba9876543210"
    }
}

Then simply add the name of server you want to reach:

<redissue server="first" id='#number_issue' text="the link's text" />

Note: If server key is wrong (e.g: call flirt instead of first), redissue will take the one who is set in dokuwiki settings. If all urls or API tokens are wrong, an error message will be displayed instead of redissue.

Override title

If you wish to override title, simply add title:

<redissue id='#number_issue' text="the link's text" title="short_title" />

Note: If you use “title” in Multiple Issues syntax, this will replace the titles of all issues !

Hide / Show additional information

For Dokuwiki theme only !! (Bootstrap theme has already collapse function)

You can hide additionnal information by setting “short” at 1 or display more with 0. This override the choice made in settings :

<redissue id='#number_issue' text="the link's text" short="1" />

Preview

Dokuwiki style :

Bootstrap style :

Configuration and Settings

You can configure the plugin in the Config Manager of DokuWiki :

  • redissue.url : Put your redmine's url server, without a slash ending. Example :
    http://myredmine.com

    This setting can be override by server option.

  • redissue.img : Maybe you have a custom icon for your Redmine installation. You can put image'url here. Example :
    http://www.example.com/image.png
  • redissue.theme :Let you choose the theme you want to display. Dokuwiki (for base theme) or Bootstrap (if you have a bootstrap theme)
  • redissue.API : Set your Redmine API's key, preference Administrator key. This setting can be override by server option.
  • redissue.view : Choose the view you want to display. This will depend on the wiki user's access rights in Redmine.
    • Impersonate : select this if your wiki's users have the same UID as Redmine's users. e.g. : LDAP authentication. Redissue then will manage rights based on private or public projects.
    • Userview : doesn't manage access rights and display issue even if it's in private project.
  • redissue.short : Check this box if you want display redissue in short mode(for Dokuwiki theme only).

Change Log

Known Bugs and Issues

Please report your issue or your idea at Redissue.

plugin/redissue.txt · Last modified: 2017-04-25 11:02 by Algorythm