Découvrez les nouveautés de cette version : Fonctionnalités, améliorations et évolutions vous attendent ! 👉 Cliquez ici pour en savoir plus

Modifications pour le document KanbanBoardMacro

Modifié par Admin le 21/07/2025 - 09:07

Depuis la version 4.1
modifié par Admin
sur 12/08/2024 - 08:28
Commentaire de modification : Install extension [com.xwiki.task:application-task-ui/3.5.1]
À la version 8.1
modifié par Admin
sur 21/07/2025 - 09:07
Commentaire de modification : Install extension [com.xwiki.task:application-task-ui/3.9.0]

Résumé

Détails

Propriétés de la Page
Contenu
... ... @@ -5,6 +5,9 @@
5 5  * ##user## [optional, default=$xcontext.userReference] define the user for who tasks are assigned
6 6  * ##space## [optional, default=TaskManager] define the space to look for tasks
7 7  * ##project## [optional, default=] define the project to look for tasks
8 +* ##colors## [optional, default=green,blue,orange] define the colors of the Kanban columns
9 +* ##columns## [optional, default=ToDo,InProgress,Done] define the statuses to display as Kanban columns
10 +* ##columnWidth## [optional, default=32%] define the width of all Kanban column
8 8  
9 9  Example:
10 10  
XWiki.WikiMacroClass[1]
Code de la macro
... ... @@ -3,9 +3,17 @@
3 3  ## The xwql variable is used by the awmkanban macro called from this one.
4 4  #set ($xwql = '')
5 5  #set($user = "$!{xcontext.macro.params.user}")
6 +#set ($columnWidth = "$!{xcontext.macro.params.columnWidth}")
6 6  #set ($colors = "$!{xcontext.macro.params.colors}")
7 7  #if($user != '')
8 - #set($xwql = "obj.assignee = '$escapetool.sql($user)'")
9 + #set ($users = $user.split(','))
10 + #foreach ($user in $users)
11 + #if ($xwql.length() > 0)
12 + #set ($xwql = "$xwql OR")
13 + #end
14 + #set ($xwql = "$xwql obj.assignee = '$escapetool.sql($user)'")
15 + #end
16 + #set ($xwql = "($xwql)")
9 9  #end
10 10  #set($space = "$!{xcontext.macro.params.space}")
11 11  #if($space != '')
... ... @@ -16,11 +16,28 @@
16 16  #end
17 17  #set($project = "$!{xcontext.macro.params.project}")
18 18  #if($project != '')
27 + #set ($xwqlProjects = '')
28 + #set ($projects = $project.split(','))
29 + #foreach ($project in $projects)
30 + #if ($xwqlProjects.length() > 0)
31 + #set ($xwqlProjects = "$xwqlProjects OR")
32 + #end
33 + #set ($xwqlProjects = "$xwqlProjects obj.project = '$escapetool.sql($project)'")
34 + #end
19 19   #if ($xwql.length() > 0)
20 20   #set ($xwql = "$xwql and")
21 21   #end
22 - #set($xwql = "$xwql obj.project = '$escapetool.sql($project)'")
38 + #set ($xwql = "$xwql ($xwqlProjects)")
23 23  #end
24 -{{awmkanban className="TaskManager.TaskManagerClass" category="status" title="name" columns="assignee,progress,duedate" width="32%" colors=$escapetool.xml($colors)/}}
40 +#set ($columns = "$!{xcontext.macro.params.columns}")
41 +{{awmkanban
42 + className="TaskManager.TaskManagerClass"
43 + category="status"
44 + displayedCategoryColumns="$!escapetool.xml($columns)"
45 + title="name"
46 + columns="assignee,progress,duedate"
47 + width="$!escapetool.xml($columnWidth)"
48 + colors=$escapetool.xml($colors)
49 +/}}
25 25  {{/velocity}}
26 26  
Default categories
... ... @@ -1,0 +1,1 @@
1 +Content
XWiki.WikiMacroParameterClass[2]
Type du paramètre
... ... @@ -1,1 +1,1 @@
1 -org.xwiki.user.UserReference
1 +com.xwiki.task.UserReferenceList
XWiki.WikiMacroParameterClass[4]
Type du paramètre
... ... @@ -1,1 +1,1 @@
1 -com.xwiki.task.ProjectReference
1 +java.util.List<com.xwiki.task.ProjectReference>
XWiki.WikiMacroParameterClass[5]
Type du paramètre
... ... @@ -1,0 +1,1 @@
1 +java.util.List<com.xwiki.task.TaskStatus>
XWiki.WikiMacroParameterClass[7]
Valeur par défaut du paramètre
... ... @@ -1,0 +1,1 @@
1 +32%
Nom du paramètre
... ... @@ -1,0 +1,1 @@
1 +columnWidth
Description du paramètre
... ... @@ -1,0 +1,1 @@
1 +The width of each Kanban column, specified in any css units (example: 32%, 500px, 30em, etc..).
Paramètre obligatoire
... ... @@ -1,0 +1,1 @@
1 +Non