Skip to content

Commit 09af08a

Browse files
authored
Merge branch 'atlassian-api:master' into master
2 parents 5b10a17 + b9f28a7 commit 09af08a

3 files changed

Lines changed: 19 additions & 2 deletions

File tree

docs/jira.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,18 @@ Get issues from jql search result with all related fields
1010
issues = jira.jql(jql_request)
1111
print(issues)
1212
13+
# Or if dealing with pagination
14+
issues = []
15+
isLast = False
16+
nextPageToken = None
17+
18+
while not isLast:
19+
response = jira.enhanced_jql(jql_request, fields="id,summary" nextPageToken=nextPageToken, expand='names')
20+
issues.extend(response.get('issues'))
21+
isLast = response.get('isLast')
22+
if not isLast:
23+
nextPageToken = response.get('nextPageToken')
24+
1325
# Check issues against JQL
1426
# Checks whether one or more issues would be returned by one or more JQL queries.
1527
jira.match_jql(issue_ids, jqls)

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
install_requires=["deprecated", "requests", "oauthlib", "requests_oauthlib", "jmespath", "beautifulsoup4", "typing-extensions"],
3030
extras_require={"kerberos": ["requests-kerberos"]},
3131
platforms="Platform Independent",
32+
python_requires='>=3.9',
3233
classifiers=[
3334
"Development Status :: 4 - Beta",
3435
"Environment :: Web Environment",

tests/test_confluence_attach.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ def test_confluence_attach_file_1(self):
4242
space = "SAN"
4343
title = "atlassian-python-rest-api-wrapper"
4444

45-
# TODO: check if page are exists
45+
# check if page exists, create if not
46+
if not confluence.page_exists(space, title):
47+
confluence.create_page(space, title, "Initial content for testing")
4648

4749
fd, filename = tempfile.mkstemp("w")
4850
os.write(fd, b"Hello World - Version 1")
@@ -87,7 +89,9 @@ def test_confluence_attach_file_2(self):
8789
space = "SAN"
8890
title = "atlassian-python-rest-api-wrapper"
8991

90-
# TODO: check if page are exists
92+
# check if page exists, create if not
93+
if not confluence.page_exists(space, title):
94+
confluence.create_page(space, title, "Initial content for testing")
9195

9296
fd, filename = tempfile.mkstemp("w")
9397
os.write(fd, b"Hello World - Version 1")

0 commit comments

Comments
 (0)