Add all Variables from the Gitlab Issue API Response
Please add all available variables from the Gitlab Issue API to use in a custom template.
I see some potential to combine this plugin with the projects plugin, so you could show your issues in a kanban board or calendar. For better filtering, all available variables should be present.
You can already use whatever filter parameters you like when defining your query.
yes, that's possible, but I can't use all values as handlebars, like 'labels' for example:
---
id: {{id}}
title: {{title}}
dueDate: {{due_date}}
webUrl: {{web_url}}
project: {{references.full}}
labels: {{#each labels}}#{{this}} {{/each}}
---
any thoughts on that?
yes, that's possible, but I can't use all values as handlebars, like 'labels' for example:
--- id: {{id}} title: {{title}} dueDate: {{due_date}} webUrl: {{web_url}} project: {{references.full}} labels: {{#each labels}}#{{this}} {{/each}} ---
This should be resolved by #25 which has been included in the latest release I have just published.
@JonnyDeates, thx for the commit, works perfectly!
Hey @strxngewxrld ! I'm trying to set up a custom template to mimic what you have above, now that all the attributes can be pulled in. Things like Assignee, last updated, and labels definitely are high on my list, as well as maybe finding a way to insert the webUrl as a formatted link so I can have a shorter "link" on a table and go straight out to my GitLab instance.
However, Obsidian is giving me an error trying to use your code above. It says that having #each is invalid with a message "your frontmatter is invalid." Any advice? I literally copied your example and removed the code block ticks around it as my first attempt at the template.
Wait, I think I got it thanks to some help from a developer and his AI assistant. Looks like I needed to use quotes around the line in order to tell Obsidian how to interpret the # symbol.
Edit: Yep. I used the following to add as many properties as I felt was appropriate into the template, following the example in the code:
---
id: {{id}}
title: {{{title}}}
state: {{state}}
dueDate: {{due_date}}
webUrl: {{web_url}}
project: {{references.full}}
assignees: "{{#each assignees}}#{{name}} {{/each}}"
type: {{issue_type}}
task-status: {{task_status}}
create-date: {{created_at}}
update-date: {{updated_at}}
labels: "{{#each labels}}#{{this}} {{/each}}"
weight: {{weight}}
---
### {{{title}}}
##### Due on {{due_date}}
{{{description}}}
[View On Gitlab]({{web_url}})
I then pumped that into Dataview modifying the example query on the Readme - though this is still a work in progress:
TABLE WITHOUT ID file.link AS "GitLab Assigned Tasks", dueDate AS "Due Date", state AS "State", update-date AS "Date Updated", regexreplace(labels, ":", "/") AS "Labels", elink(webUrl, string(id)) AS "Issue ID" from "Data/Gitlab Issues"
SORT dueDate