No edit summary Tag: 2017 source edit |
No edit summary |
||
| Line 33: | Line 33: | ||
|- | |- | ||
| style="width:120px;" |<code>sequence</code> | | style="width:120px;" |<code>sequence</code> | ||
|optional -<br /> if you want to be able to auto-convert certain sequences in VisualEditor to tracker links, specify mask here. For example, if the mask is defined as <code>GH{id}</code>, then any <code>GH123</code> sequence will be converted to a link to the tracker with <code>id=123</code>, or <code>GH:{repo},{id}</code> for <code>GH:example-repo,123</code>, where <code>repo=example-repo</code> and <code>id=123</code>. <br /> | |optional -<br /> if you want to be able to auto-convert certain sequences in VisualEditor to tracker links, specify mask here. For example, if the mask is defined as <code>GH{id}</code>, then any <code>GH123</code> sequence will be converted to a link to the tracker with <code>id=123</code>, or <code>GH:{repo},{id}</code> for <code>GH:example-repo,123</code>, where <code>repo=example-repo</code> and <code>id=123</code>. <br />If the URL mask contains more variables than are present in sequence, itwill lead to broken links. Recommended is to use sequences only for URLs with one variable, such as issue IDs.{{Textbox|boxtype=important|header=Important!|text=Sequence mask cannot contain commas to separate the variables.|icon=yes}} | ||
| | |||
| | |||
| | |||
|} | |} | ||
=== Example JSON config === | === Example JSON config === | ||
| Line 68: | Line 65: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
[[File:IssueTrackerLinks examples.png|alt=Issue Tracker link output as defined in the json-Page|center|thumb|400x400px|Example links]] | |||
Revision as of 12:12, 20 October 2025
| Overview | |||
|---|---|---|---|
| Description: | Allows special formatting of links to issue tracker applications | ||
| State: | stable | Dependency: | MediaWiki |
| Developer: | Hallo Welt! | License: | GPL v2+ |
| Type: | MediaWiki | Category: | Rich Articles |
| Edition: | BlueSpice free, BlueSpice pro, BlueSpice farm, BlueSpice cloud | ||
| Version: | 5.2 | ||
Configuration
A wiki administrator needs to define which issue links are tracked in the wiki. This is done on page MediaWiki:IssueTrackerLinksConfig.json. This page is pre-created and filled with common issue trackers.
The Configuration is a JSON object, where key is a unique ID for the tracker and value is an object with the following properties:
| Property | Description |
|---|---|
url
|
mandatory - URL pattern for the tracker links. Any variable parts can be replaced with a variable (e.g. {repo}, {id},... ) "https://github.com/{owner}/{repo}/issues/{id}"
|
label
|
optional - message key or string message to be used as a label for this tracker type |
display-mask
|
optional - how this tracker link should be represented in page. For example:
|
sequence
|
optional - if you want to be able to auto-convert certain sequences in VisualEditor to tracker links, specify mask here. For example, if the mask is defined as GH{id}, then any GH123 sequence will be converted to a link to the tracker with id=123, or GH:{repo},{id} for GH:example-repo,123, where repo=example-repo and id=123. If the URL mask contains more variables than are present in sequence, itwill lead to broken links. Recommended is to use sequences only for URLs with one variable, such as issue IDs. Important!
Sequence mask cannot contain commas to separate the variables. |
Example JSON config
By default, GitHub, GitLab and Jira issues are preconfigured and can be adjusted as needed. Other Ticket systems can be added. For example links to EasyRedmine (ERM). Please note that the label parameter for the preconfigured ticket systems are defined as system messages for user language support. System messages are only needed in multi-language wiki instances:
{
"github": {
"url": "https://github.com/{owner}/{repo}/issues/{id}",
"label": "issuetrackerlinks-type-label-github",
"icon": "github",
"display-mask": "{owner}/{repo}#{id}"
},
"gitlab": {
"url": "https://gitlab.com/{owner}/{repo}/-/issues/{id}",
"label": "issuetrackerlinks-type-label-gitlab",
"icon": "gitlab",
"display-mask": "{owner}-{repo}:{id}"
},
"jira": {
"url": "https://{jira-domain}/browse/{id}",
"label": "issuetrackerlinks-type-label-jira",
"icon": "jira",
"display-mask": "{id}"
},
"ERM": {
"url": "https://support.mydomain.com/issues/{id}",
"label": "ERM",
"display-mask": "ERM{id}",
"sequence": "ERM{id}"
}
}
