Skip to content

Commit 447db7d

Browse files
Merge pull request #77 from fivetran/bug/issue-enhanced-nulls
bug/issue-enhanced-nulls
2 parents 941e7ba + 1b48c0b commit 447db7d

File tree

8 files changed

+29
-19
lines changed

8 files changed

+29
-19
lines changed

.github/pull_request_template.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828

2929
**How did you test the PR changes?**
3030
<!--- Proof of testing is required in order for the PR to be approved. -->
31-
<!--- To check a box, remove the space and insert an x in the box (eg. [x] CircleCi). -->
31+
<!--- To check a box, remove the space and insert an x in the box (eg. [x] Buildkite). -->
3232
<!--- To select a checkbox you simply need to add an "x" with no spaces between the brackets (eg. [x] Yes). -->
33-
- [ ] CircleCi <!--- CircleCi testing is only applicable to Fivetran employees. -->
33+
- [ ] Buildkite <!--- Buildkite testing is only applicable to Fivetran employees. -->
3434
- [ ] Local (please provide additional testing details below)
3535

3636
**Select which warehouse(s) were used to test the PR**

CHANGELOG.md

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
1+
# dbt_jira v0.10.1
2+
## ❗Please Note❗
3+
- While this is a patch update, it may also require a full refresh. Please run `dbt run --full-refresh` after upgrading to ensure you have the latest incremental logic.
4+
## 🐞 Bug Fix
5+
- Updated logic for model `int_jira__issue_sprint` to further adjust how current sprint is determined. It now uses a combination of the newest `updated_at` date for the issue and the newest `started_at` date of the sprint. This is to account for times when jira updates two sprint records at the same time. ([#77](https://github.com/fivetran/dbt_jira/pull/77) and [#78](https://github.com/fivetran/dbt_jira/pull/78))
6+
## Contributors
7+
- [@jingyu-spenmo](https://github.com/jingyu-spenmo) ([#78](https://github.com/fivetran/dbt_jira/pull/78))
8+
9+
110
# dbt_jira v0.10.0
211

312
## 🚨 Breaking Changes
4-
For model `jira__issue_enhanced`, updated column names `sprint_id` and `sprint_name` to `current_sprint_id` and `current_sprint_name`, respectively, to confirm the record is for the current sprint. ([#76](https://github.com/fivetran/dbt_jira/pull/76))
13+
- For model `jira__issue_enhanced`, updated column names `sprint_id` and `sprint_name` to `current_sprint_id` and `current_sprint_name`, respectively, to confirm the record is for the current sprint. ([#76](https://github.com/fivetran/dbt_jira/pull/76))
514

615
## 🐞 Bug Fix
7-
Updated logic for model `int_jira__issue_sprint` to adjust how current sprint is determined. It now uses the newest `started_at` date of the sprint instead of the `updated_at` date. ([#76](https://github.com/fivetran/dbt_jira/pull/76))
16+
- Updated logic for model `int_jira__issue_sprint` to adjust how current sprint is determined. It now uses the newest `started_at` date of the sprint instead of the `updated_at` date. ([#76](https://github.com/fivetran/dbt_jira/pull/76))
817

918
# dbt_jira v0.9.0
1019
## 🚨 Breaking Changes 🚨

dbt_project.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: 'jira'
2-
version: '0.10.0'
2+
version: '0.10.1'
33
config-version: 2
44
require-dbt-version: [">=1.0.0", "<2.0.0"]
55

docs/catalog.json

+1-1
Large diffs are not rendered by default.

docs/manifest.json

+1-1
Large diffs are not rendered by default.

docs/run_results.json

+1-1
Large diffs are not rendered by default.

integration_tests/dbt_project.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
name: 'jira_integration_tests'
2-
version: '0.10.0'
2+
version: '0.10.1'
33
config-version: 2
44
profile: 'integration_tests'
55

66

77
vars:
8-
jira_schema: jira_integration_tests
98
jira_source:
9+
jira_schema: jira_integration_tests
1010
comment: "{{ ref('comment') }}"
1111
component: "{{ ref('component') }}"
1212
epic: "{{ ref('epic') }}"

models/intermediate/int_jira__issue_sprint.sql

+10-9
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,17 @@ sprint_field_history as (
1919

2020
select
2121
field_history.*,
22+
sprint.*,
2223
row_number() over (
2324
partition by field_history.issue_id
24-
order by sprint.started_at desc
25+
order by field_history.updated_at desc, sprint.started_at desc
2526
) as row_num
2627
from field_history
27-
left join sprint on field_history.field_value = cast(sprint.sprint_id as {{dbt_utils.type_string()}})
28+
join sprint on field_history.field_value = cast(sprint.sprint_id as {{dbt_utils.type_string()}})
2829
where lower(field_history.field_name) = 'sprint'
2930
),
3031

32+
3133
last_sprint as (
3234

3335
select *
@@ -53,18 +55,17 @@ issue_sprint as (
5355
select
5456
last_sprint.issue_id,
5557
last_sprint.field_value as current_sprint_id,
56-
sprint.sprint_name as current_sprint_name,
57-
sprint.board_id,
58-
sprint.started_at as sprint_started_at,
59-
sprint.ended_at as sprint_ended_at,
60-
sprint.completed_at as sprint_completed_at,
58+
last_sprint.sprint_name as current_sprint_name,
59+
last_sprint.board_id,
60+
last_sprint.started_at as sprint_started_at,
61+
last_sprint.ended_at as sprint_ended_at,
62+
last_sprint.completed_at as sprint_completed_at,
6163
coalesce(sprint_rollovers.count_sprint_changes, 0) as count_sprint_changes
6264

6365
from
6466
last_sprint
65-
join sprint on last_sprint.field_value = cast(sprint.sprint_id as {{dbt_utils.type_string()}})
6667
left join sprint_rollovers on sprint_rollovers.issue_id = last_sprint.issue_id
6768

6869
)
6970

70-
select * from issue_sprint
71+
select * from issue_sprint

0 commit comments

Comments
 (0)