Skip to content

Commit 7883fbc

Browse files
authored
Merge pull request #2 from jb-delafosse/chore/make-project-configurable
chore(config): make projects configurable
2 parents a263fa4 + 228246e commit 7883fbc

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Built with the [Meltano Tap SDK](https://sdk.meltano.com) for Singer Taps.
3030
| stream_map_config | False | None | User-defined config values to be used within map expressions. |
3131
| flattening_enabled | False | None | 'True' to enable schema flattening and automatically expand nested properties. |
3232
| flattening_max_depth| False | None | The max depth to flatten schemas. |
33-
33+
| projects | False | None | The jira projects to sync issues from. If None, select all projects |
3434
The auth setting works either with access token or username/password, set by the following configs:
3535

3636
Auth with access token:

meltano.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ plugins:
2424
- name: auth.username
2525
- name: auth.password
2626
kind: password
27+
- name: projects
2728
environments:
2829
- name: dev
2930
- name: staging

tap_jira/streams.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2306,7 +2306,10 @@ def get_url_params(
23062306

23072307
if "end_date" in self.config:
23082308
end_date = self.config["end_date"]
2309-
params["jql"].append(f"(created<{end_date} or updated<{start_date})")
2309+
params["jql"].append(f"(created<{end_date} or updated<{end_date})")
2310+
2311+
if "projects" in self.config:
2312+
params["jql"].append(f'project IN({", ".join(self.config["projects"])})')
23102313

23112314
if params["jql"]:
23122315
jql = " and ".join(params["jql"])

0 commit comments

Comments
 (0)