內容簡介
這個 WordPress 外掛可以讓使用 WordPress 網誌系統,同時也使用 Mantis Bug Tracker 的專案,把 Mantis Bug Tracker 中的訊息,例如 bug 列表、changelogs 和 roadmaps,輸出至網誌頁面或文章中。安裝外掛後,需依照以下步驟進行操作:
1. 在 Mantis 中建立一個代表您的網誌的使用者帳號,可將其命名為「wordpress」。由於 Mantis 有限制,因此此使用者需至少具有 Reporter 權限。然而,您可以在頁面底部找到更改權限的方法。
2. 配置此外掛。
3. 在所需顯示 Mantis 訊息的文章或頁面中加入 [Mantis]。下面的說明提供更詳細的操作方法。
使用 Shortcode 進行輸出時,需指定選項:
1. 若要包含 bug 列表,請使用 [Mantis bugs proj_id=x],其中 x 為您想要顯示的專案的 ID。專案的 ID 可在 Mantis 管理頁面的 URL 中找到。
2. 若要包含 roadmap,請使用 [Mantis roadmap ver_id=x],其中 x 為您想要顯示路線圖的版本的 ID。在檢視單一 Roadmap 時,可以在 URL 中找到此 ID。
3. 若要包含 changelog,請使用 [Mantis changelog ver_id=x]。上述說明中有關此命令的 ID 查找方法。
在包含 roadmap 或 changelog 時,可以指定專案和版本名稱,而非 ID,例如 [Mantis roadmap proj_name=my_project ver_name=1.2.3] 或 [Mantis roadmap proj_id=x ver_name=y]。如果缺少 ver_name 參數,則會顯示完整的 changelog/roadmap。
如果使用了 bugs 選項,您可以加入 exclude_stat 或 include_stat 參數,並以逗號分隔需要排除或包含的狀態 ID。如果您不想包含已關閉和已修正的 bug,您可以使用 [Mantis bugs proj_id=1 exclude_stat=90,80]。可用的狀態 ID 如下:
1. 10:新增
2. 20:回應
3. 30:已確認
4. 40:已確認
5. 50:負責人已指派
6. 80:已解決
7. 90:已結案
使用 limit 參數可以限制顯示的 bug 數量。例如,如果要顯示最新的 5 個已修正 bug,您可以使用 [Mantis bugs proj_id=1 include_stat=80 limit=5]。
您可以為每個狀態更改表格背景顏色,並在 mantis 安裝中使用本地化的狀態名稱。
為存取 Mantis SOAP API,此外掛需要 Reporter 權限。如需更改權限,您可以在 /api/soap 目錄中建立 mc_config_inc.php 檔案,並將以下內容複製到該檔案:
現在,Viewer 權限已足夠使用。
未來規劃:
1. 只在使用 [M Shortcode 時包含 CSS/JavaScript。
2. 優化閱讀性、易用性。
外掛標籤
開發者團隊
原文外掛簡介
Eine Deutsche Version kann hier gefunden werden
Original Work by Robert Torres. His Version was not working, since he had a typo in a variable. I fixed this error and
extendet this Plugin with some new Features like Changelogs, Roadmaps etc.
This plugin for WordPress 2.8 and above allows you to insert information from a Mantis Bug Tracker
into a wordpress page or post. The plugin is perfect for projects which use WordPress for blogging,
but also utilize Mantis for their bug tracking/issue tracking. You can include bug lists,
changelogs and roadmaps.
After you installed the Plugin you have to do the following steps:
Create a user in Mantis wich represents your blog. You could name him ‘wordpress’. This user needs at least Reporter
Rights due a limitation in Mantis, but you can see the botton of the page to find out, how to change this.
Configure the Plugin.
Add [Mantis] to the post or page where you want to appear the infomation from Mantis. See below for further instructions.
About the Shortcode
You must provide options in the Shortcode:
To include a bug list use [Mantis bugs proj_id=x]. Replace x with the ID of the project wich you want to display.
You can find the ID in the URL of the Mantis Management Page for this project.
To include a roadmap use [Mantis roadmap ver_id=x]. Replace x with the ID of the Version for that you want to display
the roadmap. You can find this ID in the URL, when you view a single Roadmap in Mantis.
To include a changelog use [Mantis changelog ver_id=x]. See the instruction above this to find the ID.
When including a roadmap or a changelog you can speficify a project and version name instead of the ID:
[Mantis roadmap proj_name=my_project ver_name=1.2.3] or you can use a project ID and a version name: [Mantis roadmap proj_id=x ver_name=y]
The ver_name Paramter is optional, if missing the full changelog/roadmap for the project will be displayed
If you use the ‘bugs’ option, you can add the ‘exclude_stat’ or ‘include_stat’ parameter. After the eqal sign you can add (comma seperated)
the IDs of the statuses to exclude or include. (You can not use include and exclude at the same time, of course!)
So if you dont want to include closed and fixed bugs you would write [Mantis bugs proj_id=1 exclude_stat=90,80]
Here is a list of the IDs:
10 New
20 Feedback
30 Acknowledged
40 Confirmed
50 Assigned
80 Resolved
90 Closed
With the limit paramter you can limit the displayed bugs. To display the latest 5 fixed bugs you would write
[Mantis bugs proj_id=1 include_stat=80 limit=5]
You can change the table background color for each status and use the localized status names from your mantis installation.
Why the Mantis User needs Reporter rights
This plugin uses the Mantis SOAP API to get the bug information. And to access this API the user needs at least Reporter
right. To change this you can create a ‘mc_config_inc.php’ file in your ‘/api/soap’ directory with the following
content:
Now Viewer rights are suffiant for the user.
Further plans: (eventually)
Only include the CSS/JavaScript if the [Mantis] shortcode is in the content
Translations
The original plugin is in english, but you can translate in your langguage, since the pot file is included. If I should include
your translation, email me: info at niklas-rother dot de. So far the following translations are included:
German/Deutsch
Frensch/Francais
Know Bugs
The changelog and roadmap is in the default language, not in the language of the user. At this point I dont see a change to fix this.
