Commit 41a19f01 authored by Robert Speicher's avatar Robert Speicher Committed by Ruben Davila

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
parent 95cf5a09
......@@ -3,6 +3,7 @@ class ListLabel {
this.id = obj.id;
this.title = obj.title;
this.color = obj.color;
this.textColor = obj.text_color;
this.description = obj.description;
this.priority = (obj.priority !== null) ? obj.priority : Infinity;
}
......
......@@ -12,7 +12,7 @@ module Projects
only: [:iid, :title, :confidential],
include: {
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
......
......@@ -10,7 +10,9 @@
"title": { "type": "string" },
"confidential": { "type": "boolean" },
"labels": {
"type": ["array"],
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"color",
......@@ -25,8 +27,14 @@
"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"] }
},
"additionalProperties": false
}
},
"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