Changes for page AWMKanbanMacro
Last modified by XWiki Demo Admin on 2026/06/09 11:38
From version 1.1
edited by XWiki Demo Admin
on 2026/05/28 16:13
on 2026/05/28 16:13
Change comment:
Install extension [org.xwiki.contrib:macro-kanban/1.2.3]
To version 2.1
edited by XWiki Demo Admin
on 2026/06/09 11:38
on 2026/06/09 11:38
Change comment:
Install extension [org.xwiki.contrib:macro-kanban/1.4.3]
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (3 modified, 3 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -3,21 +3,28 @@ 3 3 Example: 4 4 5 5 ##{{{ 6 -{{awmkanban app="Help.Applications.Movies" category="databaseList1" columns="staticList1,boolean1" xwql="obj.boolean1=0" /}} 6 +{{awmkanban app="Help.Applications.Movies" category="databaseList1" displayedCategoryColumns="Help.Applications.Contributors.Charlie Chaplin" columns="staticList1,boolean1" xwql="obj.boolean1=0" /}} 7 7 }}}## 8 8 9 -* ##app or className## application or className for which to build the kanban board 10 -* ##category## field to use to break down the kanban board 11 -* ##xwql## additional xwql to restrict the query 12 -* ##title## field to display the title 13 -* ##columns## additional columns to display 9 +* ##app or className## - application or className for which to build the kanban board 10 +* ##category## - class field used to group the kanban board into columns 11 +* ##displayedCategoryColumns## - only display these values of the `category` field as columns 12 +* ##xwql## - additional xwql to restrict the query 13 +* ##title## - field to display the title 14 +* ##columns## - the class fields to display as a description in each card 15 +* ##order## - order to sort the data by. Example: 'doc.name desc', 'doc.date desc', 'customClassField1 asc, customClassField2 desc, doc.name desc' or 'customClassField1 asc' if the className object contains such custom fields 16 +* ##limit## - the maximum amount of items to show. If the ##displayedCategoryColumns## parameter is set, the limit is applied for each column. 14 14 15 15 Examples: 16 16 17 -== Kanban o fMoviesby genre showingthe directorfield ==20 +== Kanban board for each director, showing genre and seen fields as description for each card == 18 18 19 19 {{awmkanban app="Help.Applications.Movies" category="databaseList1" columns="staticList1,boolean1"/}} 20 20 21 -== Kanban o fMoviesbygenreshowingthedirectorfield only comedy movies ==24 +== Kanban board for a subset of directors == 22 22 26 +{{awmkanban app="Help.Applications.Movies" category="databaseList1" displayedCategoryColumns="Help.Applications.Contributors.Charlie Chaplin" columns="staticList1,boolean1"/}} 27 + 28 +== Kanban board for each director, showing only unseen movies == 29 + 23 23 {{awmkanban app="Help.Applications.Movies" category="databaseList1" columns="staticList1,boolean1" xwql="obj.boolean1=0"/}}
- XWiki.WikiMacroClass[1]
-
- Macro code
-
... ... @@ -27,9 +27,19 @@ 27 27 ## We don't override the xwql variable in case it was defined externally by another macro calling this one (e.g. TaskManager.KanbanBoardMacro). 28 28 #set($xwql = "") 29 29 #end 30 +#if ($xcontext.macro.params.colors) 31 + #set($colors = $xcontext.macro.params.colors) 32 +#else 33 + ## We set as default the original colors: green,blue,orange,yellow,red 34 + #set($colors = "#8C4,#0AC,#F91,#FC3,#E43") 35 +#end 36 +#set ($displayedCategoryColumns = "$!xcontext.macro.params.displayedCategoryColumns") 37 +#set ($order = "$!xcontext.macro.params.order") 38 +#set ($limit = "$!xcontext.macro.params.limit") 39 + 30 30 #set($width = "$xcontext.macro.params.width") 31 -#set($source = $xwiki.getDocument("Macros.KanbanAWMSource").getURL("get", "xpage=plain&outputSyntax=plain&className=${escapetool.url($className)}&category=${escapetool.url($category)}&title=${escapetool.url($title)}&columns=${escapetool.url($columns)}&xwql=${escapetool.url($xwql)}")) 32 -#set($awmupdatepath = "/objects/${className}/0/properties/${category}/") 33 -{{kanban source="${source}" updateService="" addBoardButton="false" addItemButton="false" removeBoardButton="false" removeItemButton="false" awmupdatepath="${awmupdatepath}" width="${width}" /}}41 +#set($source = $xwiki.getDocument("Macros.KanbanAWMSource").getURL("get", "xpage=plain&outputSyntax=plain&className=${escapetool.url($className)}&category=${escapetool.url($category)}&displayedCategoryColumns=${escapetool.url($displayedCategoryColumns)}&title=${escapetool.url($title)}&columns=${escapetool.url($columns)}&xwql=${escapetool.url($xwql)}&colors=${escapetool.url($colors)}&order=${escapetool.url($order)}&limit=${escapetool.url($limit)}")) 42 +#set($awmupdatepath = "/objects/${className}/0/properties/${category}/") 43 +{{kanban source="${source}" updateService="" addBoardButton="false" addItemButton="false" removeBoardButton="false" addRemoveButton="false" awmupdatepath="${awmupdatepath}" width="${width}" /}} 34 34 {{/velocity}} 35 35
- XWiki.WikiMacroParameterClass[6]
-
- Parameter description
-
... ... @@ -1,1 +1,1 @@ 1 -Order to sort the data by 1 +Order to sort the data by. Example: 'doc.name desc', 'doc.date desc', or 'customClassField1 asc' if the className object contains such a field. Sort by multiple fields: 'customClassField1 asc, customClassField2 desc, doc.name desc'
- XWiki.WikiMacroParameterClass[9]
-
- Parameter description
-
... ... @@ -1,1 +1,1 @@ 1 - Columnstouse to display additional data1 +The class properties to display in each card description as additional data (comma separated values)
- XWiki.WikiMacroParameterClass[11]
-
- Parameter description
-
... ... @@ -1,0 +1,1 @@ 1 +List of colors separated by commas, each color corresponds to a column. - Parameter name
-
... ... @@ -1,0 +1,1 @@ 1 +colors
- XWiki.WikiMacroParameterClass[12]
-
- Parameter description
-
... ... @@ -1,0 +1,1 @@ 1 +Have only these category values as board columns, i.e. for 'ToDo,InProgress' (comma separated values) you will only have 2 kanban columns. Note that these should be values accepted by the specified category property. - Parameter mandatory
-
... ... @@ -1,0 +1,1 @@ 1 +No - Parameter name
-
... ... @@ -1,0 +1,1 @@ 1 +displayedCategoryColumns
- XWiki.WikiMacroParameterClass[13]
-
- Parameter default value
-
... ... @@ -1,0 +1,1 @@ 1 +50 - Parameter description
-
... ... @@ -1,0 +1,1 @@ 1 +Set the maximum amount of items to show. If the displayedCategoryColumns parameter is set, the limit is applied for each column. - Parameter mandatory
-
... ... @@ -1,0 +1,1 @@ 1 +No - Parameter name
-
... ... @@ -1,0 +1,1 @@ 1 +limit