enterprisemediawiki / SemanticActions

An action tracking system for a Semantic MediaWiki
MIT License
3 stars 2 forks source link

Related articles as column choices #4

Open darenwelsh opened 5 years ago

darenwelsh commented 5 years ago

Currently, the action board is limited in defining columns by labels. It would be nice to also be able to list Related article.

darenwelsh commented 2 years ago

Template:Actionable board currently assumes field 3 is only for labels and so it prepends "Label:" in each call to Template:Actionable board column.

If the user is allowed to generate columns by both labels and related articles, there needs to be a way to differentiate between the two. One sensible way to do this would be to change the user input to the Template:Actionable board input for field 3 to be like "Label:In review, Pump module" where in both cases, for both labels and related articles, you just use the full pagename. This way, subsequent logic could detect each item by the presence of "Label:" as the first 6 characters.

Then in Template:Actionable board column the query would be something like

{{#arraymap:{{{3}}}|,|VAR|

{{#ask: {{#var:commonQueryPart}} {{#if: {{#pos:VAR|Label:|0}}| [[Label::VAR]] | [[Related article::VAR]] }}

| }}

Note that #38 further complicates this since we would have to accommodate multiple iterations of both labels and related articles and yet to be defined AND/OR statements.