Commit 2e34e5f1 authored by Robert Speicher's avatar Robert Speicher

Merge branch 'issue-boards-label-text-color' into 'master'

Added text color to issues labels in issue board lists

## What does this MR do?

Adds the text color for labels in the response. The frontend was
already setup to handle this, just needed the data from the backend.

See merge request !5898
parents daa0cc1c 32ca5a88
...@@ -3,6 +3,7 @@ class ListLabel { ...@@ -3,6 +3,7 @@ class ListLabel {
this.id = obj.id; this.id = obj.id;
this.title = obj.title; this.title = obj.title;
this.color = obj.color; this.color = obj.color;
this.textColor = obj.text_color;
this.description = obj.description; this.description = obj.description;
this.priority = (obj.priority !== null) ? obj.priority : Infinity; this.priority = (obj.priority !== null) ? obj.priority : Infinity;
} }
......
...@@ -12,7 +12,7 @@ module Projects ...@@ -12,7 +12,7 @@ module Projects
only: [:iid, :title, :confidential], only: [:iid, :title, :confidential],
include: { include: {
assignee: { only: [:id, :name, :username], methods: [:avatar_url] }, assignee: { only: [:id, :name, :username], methods: [:avatar_url] },
labels: { only: [:id, :title, :description, :color, :priority] } labels: { only: [:id, :title, :description, :color, :priority], methods: [:text_color] }
}) })
end end
......
...@@ -10,23 +10,31 @@ ...@@ -10,23 +10,31 @@
"title": { "type": "string" }, "title": { "type": "string" },
"confidential": { "type": "boolean" }, "confidential": { "type": "boolean" },
"labels": { "labels": {
"type": ["array"], "type": "array",
"required": [ "items": {
"id", "type": "object",
"color", "required": [
"description", "id",
"title", "color",
"priority" "description",
], "title",
"properties": { "priority"
"id": { "type": "integer" }, ],
"color": { "properties": {
"type": "string", "id": { "type": "integer" },
"pattern": "^#[0-9A-Fa-f]{3}{1,2}+$" "color": {
"type": "string",
"pattern": "^#[0-9A-Fa-f]{3}{1,2}+$"
},
"description": { "type": ["string", "null"] },
"text_color": {
"type": "string",
"pattern": "^#[0-9A-Fa-f]{3}{1,2}+$"
},
"title": { "type": "string" },
"priority": { "type": ["integer", "null"] }
}, },
"description": { "type": ["string", "null"] }, "additionalProperties": false
"title": { "type": "string" },
"priority": { "type": ["integer", "null"] }
} }
}, },
"assignee": { "assignee": {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment