Allow extracting labels in GLQL
What does this MR do and why?
Allow extracting labels in GLQL
Use a separate label parser function to extract one or more labels in a GLQL rendered table or list. Also add support for field aliases: #480712 (closed)
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
How to set up and validate locally
- Go to Manage > Labels in your project's sidebar and add some workflow labels similar to how they are set up in the GitLab project.
- Assign yourself some issues in the project and also randomly set some labels, including workflow labels on those issues.
- Use the below GLQL query in a new wiki page:
```glql
---
display: table
fields: title, assignees, labels("workflow"), labels, health
---
assignee = currentUser()
```
- The above query should extract all workflow labels in the
Label: Workflow
column, and they should not show up theLabels
column anymore.
In addition to the labels
function, this MR also introduces some field aliases to solve #480712 (closed). See file app/assets/javascripts/glql/core/transformer/field_aliases.js
for a list of aliases.
Related to #480696 (closed)
Edited by Himanshu Kapoor