Kanban macro sample snippet issue

Hi! I discovered this excellent macro following the forum and found several related topics. Kanban macro issue was solved, but I’m now getting an error when using the Kanban from JSON example snippet. It works if I remove source="". The following code works:

{{kanban width=“30%” updateservice=“” addBoardButton=“true” addItemButton=“true” removeBoardButton=“true” removeBoardItem=“true”}}
[
{“id”:“todo”,“title”:“To Do”,“color”:“red”,“item”:[{“title”:“Item 2”},{“title”:“Item 1”}]},
{“id”:“working”,“title”:“Working”,“color”:“blue”,“item”:[{“title”:“Hello”},{“title”:“Item 4”},{“title”:“Item 6”}]},
{“id”:“done”,“title”:“Done”,“color”:“green”,“item”:[{“title”:“Item 5b”},{“title”:“Item 5”}]}
]
{{/kanban}}

Would it be advisable to edit the snippet on the documentation page? Do you know why source="" doesn’t work? Could it be incompatible with the JSON inline data?

Not only source="" is causing troubles. If you don’t remove updateService="", the Kanban content won’t get updated if you edit, add or move items. I know that removing items is an unsolved issue.

Provided the logged user has editing rights on the Kanban page and a user with script rights saved it, the working snippet code here (XWiki 16.0.0) is:

{{kanban width=“30%” addBoardButton=“true” addItemButton=“true” removeBoardButton=“true” removeBoardItem=“true”}}
[
{“id”:“todo”,“title”:“To Do”,“color”:“red”,“item”:[{“title”:“Item 2”},{“title”:“Item 1”}]},
{“id”:“working”,“title”:“Working”,“color”:“blue”,“item”:[{“title”:“Hello”},{“title”:“Item 4”},{“title”:“Item 6”}]},
{“id”:“done”,“title”:“Done”,“color”:“green”,“item”:[{“title”:“Item 5b”},{“title”:“Item 5”}]}
]
{{/kanban}}

Thanks!

source caused troubles because I didn’t know how to use it. It is working now. A well formatted JSON file stored it as a text file attached to a XWiki page in the same instance to avoid CORS errors did the trick.

This very simple JSON file, also attached (1005 Bytes), feeds correctly the page. Every time we reload, the contents of the Kanban reflects the contents of the file. And every time we reload, the contents of the XWiki page are substituted with the content of the file. I can expect that behaviour as the page as no idea how to update the Kanban data stored in the file. Somehow, updateService should take care of that, but I have no idea currently about how to get it working!

@tmortagne, @lucaa, @ludovic, all, could you provide an example of an updateService?

I guess the code of the macro contains the answer to this and other issues, but it will take me time to understand it. Any help will be very welcome! Thanks!