Skip to content

Commit 57a17ef

Browse files
update_model_and_add_changelog_entry
1 parent e9decd0 commit 57a17ef

4 files changed

Lines changed: 13 additions & 17 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
- Added team-related test data to `issue.csv`, `issue_field_history.csv`, and `field.csv` seed files.
2525
- Created `get_team_columns` macro for consistent team column definitions.
2626
- Updated package variables to include team source reference and team identifier configuration.
27-
- Created consistency tests for new end models.
27+
- Created consistency tests for new end models.
28+
- Created new analysis folder with `jira__issue_cumulative_flow_analysis` model. See analysis [README.md](https://github.com/fivetran/dbt_jira/blob/main/analysis/README.md) for more details on how to use this model for your Jira reporting.
2829

2930
# dbt_jira v1.0.0
3031

analysis/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Jira Analysis
2-
> Note: The compiled sql within the analysis folder references the final model [jira__issue_status_transitions](https://github.com/fivetran/dbt_jira/blob/master/models/jira__issue_status_transitions.sql). As such, prior to
2+
> Note: The compiled sql within the analysis folder references the final models [jira__issue_status_transitions](https://github.com/fivetran/dbt_jira/blob/master/models/jira__issue_status_transitions.sql) and [jira__timestamp_issue_field_history](https://github.com/fivetran/dbt_jira/blob/master/models/jira__timestamp_issue_field_history). As such, prior to
33
compiling the provided sql to analyze issue status category metrics, you must first execute `dbt run`.
44

55

66
## Analysis SQL
77
| **sql** | **description** |
88
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------- |
9-
| [jira__daily_issue_status_category_analysis](https://github.com/fivetran/dbt_jira/blob/master/analysis/jira__daily_issue_status_category_analysis.sql) | The output of the compiled sql will generate daily metrics for issue status categories by joining status transitions with field history data. The analysis aggregates data by date, project, team, and status category to provide: count of distinct issues in each status category, average days spent in status category, and counts of issues that started work, completed work, or reopened work. The SQL references the `jira__issue_status_transitions` and `jira__timestamp_issue_field_history` models. Aggregation granularity can be adjusted by adding/removing field names in the `issue_field_history_columns` var in your dbt project.yml. `status` can be used in place of `status_category` if desired by modifying the model accordingly. |
9+
| [jira__issue_cumulative_flow_analysis](https://github.com/fivetran/dbt_jira/blob/master/analysis/jira__issue_cumulative_flow_analysis.sql) | The output of the compiled sql will generate daily metrics for issue status categories by joining status transitions with field history data. The analysis aggregates data by date, project, team, and status category to provide: count of distinct issues transitioning into a new status category, average days spent in status category, and counts of issues that started work, completed work, or reopened work. The SQL references the `jira__issue_status_transitions` and `jira__timestamp_issue_field_history` models. Aggregation granularity can be adjusted by adding/removing field names in the `issue_field_history_columns` var in your dbt project.yml. `status` can be used in place of `status_category` if desired by modifying the model accordingly. |
1010

1111

1212

@@ -17,7 +17,7 @@ compile the sql, you will perform the following steps:
1717
- Execute `dbt run` to create the package models.
1818
- Execute `dbt compile` to generate the target specific sql.
1919
- Navigate to your project's `/target/compiled/jira/analysis` directory.
20-
- Copy the `jira__daily_issue_status_category_analysis` code and run in your data warehouse.
20+
- Copy the `jira__issue_cumulative_flow_analysis` code and run in your data warehouse.
2121
- Confirm the issue status category metrics match your expected workflow patterns.
2222
- Analyze the daily counts, cumulative flow, and completion metrics to identify trends and bottlenecks in your development process.
2323

@@ -29,7 +29,7 @@ Please create issues or open PRs against `master`. Check out [this post](https:/
2929

3030

3131
## Database Support
32-
This package has been tested on BigQuery, Snowflake and Redshift.
32+
This package has been tested on BigQuery, Snowflake, Redshift, Postgres, and Databricks.
3333

3434

3535
## Are there any resources available?

analysis/jira__daily_issue_status_category_analysis.sql renamed to analysis/jira__issue_cumulative_flow_analysis.sql

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
-- grab non hard-coded issue_field_history columns
2-
{% set issue_field_history_columns = var('issue_field_history_columns', []) %}
3-
4-
51
with field_history as (
62
select *
73
from {{ ref('jira__timestamp_issue_field_history') }}
@@ -12,7 +8,7 @@ status_transitions as (
128
from {{ ref('jira__issue_status_transitions') }}
139
),
1410

15-
---if you prefer to keep anayltics at the status level,substitute 'status' for 'status_category' throughout this model
11+
---if you prefer to keep analytics at the status level, substitute 'status' for 'status_category' throughout this model
1612
joined as (
1713
select
1814
transitions.transition_at,
@@ -32,28 +28,28 @@ joined as (
3228
and transitions.transition_at = field_history.valid_from
3329
),
3430

35-
---roll up to daily for reporing
31+
---roll up to daily for reporting
3632
daily_rollup as (
3733
select
3834
cast(transition_at as date) as status_category_date,
3935
project,
4036
team,
4137
status_category_name as status_category,
42-
count(distinct issue_id) as issues_in_status_category,
38+
count(distinct issue_id) as issues_in_new_status_category,
4339
round(avg(days_in_status),2) as avg_days_in_status_category,
4440
sum(started_work) as issues_started_work,
4541
sum(completed_work) as issues_completed_work,
4642
sum(reopened_work) as issues_reopened_work
4743
from joined
48-
group by 1,2,3,4
44+
group by 1,2,3,4
4945
)
50-
--add cumuliative flow calculation
46+
--add cumulative flow calculation
5147
select
5248
status_category_date,
5349
project,
5450
team,
5551
status_category,
56-
issues_in_status_category,
52+
issues_in_new_status_category,
5753
sum(issues_in_status_category) over (
5854
partition by project, team, status_category
5955
order by status_category_date

integration_tests/dbt_project.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@ profile: 'integration_tests'
55

66

77
vars:
8-
jira_using_components: false
98

109
# Comment out the below when generating docs
11-
issue_field_history_columns: ['summary', 'components','team' ,'project'] # @docs-ignore
10+
issue_field_history_columns: ['summary', 'components', 'team' ,'project'] # @docs-ignore
1211

1312
jira:
1413
jira_schema: jira_integrations_tests_42

0 commit comments

Comments
 (0)