marc0l92 / obsidian-jira-issue

This plugin allows you to track the progress of Atlassian Jira issues from your Obsidian notes.
https://marc0l92.github.io/obsidian-jira-issue/
GNU Affero General Public License v3.0
220 stars 34 forks source link

[Bug] Issue status color is always "is-light" #99

Open ngraham20 opened 8 months ago

ngraham20 commented 8 months ago

Describe the bug A clear and concise description of what the bug is.

The Status section of both table and in-line issue renderings does not use any color other than "is-light".

To Reproduce Steps to reproduce the behavior:

  1. Install jira-issue
  2. Render an issue

Expected behavior A clear and concise description of what you expected to happen. Issue statuses should render with different colors using "is-info", "is-warning", "is-success", and "is-danger."

Screenshots If applicable, add screenshots to help explain your problem.

image

Plugin version and platform

ngraham20 commented 8 months ago

With only a surface level investigation, the issue.fields.status.statusCategory.colorName selector in renderingCommon.ts:109 does not appear to be set anywhere else in the project. It does appear that a function updateStatusColorCache is designed to do this, as a different field, response.statusCagetory.colorName is set here, however this function is not called anywhere in the project.

ngraham20 commented 8 months ago

It appears that my API response is yielding "default" as the colorName, so the rendering is not mapped to anything.

ngraham20 commented 8 months ago

I would suggest adding functionality to read in the statusCategory.name and parse it if colorName is not set, so that a default of a helpful color is used instead of a plain one.

HolgerVornholt commented 3 months ago

Hi, I am not sure if this is the same issue but my jira projects use custom german status like "Offen", "In Arbeit" and "Geschlossen". It would be great if I could define an Array of Status Texts that lead to the "is-success" colour.

I am trying to use the plugin to get an overview of dependencies and next steps. Without the green it will be hard to read: grafik

Thanks for the plugin!