Closed gabrielsoltz closed 2 years ago
Thanks for the PR @gabrielsoltz 👍 . Definitely worth adding the status_category
column which provides users with the ability to easily query tickets based on pre-defined statuses.
Could you also add an example query in the docs/tables/jira_issue.md
file that the users could easily refer to?
For instance:
List Issues are in progress
select
id,
key,
summary,
status,
assignee_display_name
from
jira_issue
where
status_category = 'In Progress';
Thank you, @misraved. I updated the documentation. Let me know if this makes sense.
Thanks a lot @gabrielsoltz for making the changes and apologies for going back and forth on the table docs 👍 .
I will be releasing the change shortly 😃
Status Category in Jira is fixed: In Progress, To Do or Done. On the other hand, status is custom based on the workflow.
So if you need to list all Open tickets, you will need to know those custom statuses for your project, which is not always possible, and statuses can change from one project to another. That's why we can use status_category, which is always fixed for any project and workflow.
Example query results
Results
``` select status, status_category from local_jira.jira_issue +-------------------------+-----------------+ | status | status_category | +-------------------------+-----------------+ | Fixed | Done | | Open | To Do | | Fixed | Done | | Fixed | Done | | Open | To Do | | Sec Review | In Progress | | Fixed | Done | | Risk Accepted | Done | | In Progress | In Progress | | Fixed | Done | | In Progress | In Progress | | False Positive Accepted | Done | | Fixed | Done | | Fixed | Done | | Open | To Do | ```Status and Status Category
You can use the field
status
orstatus_category
to list issues in a particular workflow status.The difference is that
status
is the custom name you define for astatus_category
in each Jira workflow that is fixed:To do
,In Progress
, andDone
. Everystatus
belongs to one of thosestatus_category
.For example, for
status_category
=Done
, maybe in your workflow you defined possible statusesDone
andWont Do
, both areDone
status category that you can filter using thatstatus_category
.status_category
is also useful when filtering across more than 1 project, as every project could be using their own workflow with differentstatus
names.