Skip to content

Commit 6c2f73a

Browse files
authored
Merge pull request #100 from itk-dev-rpa/release/2.10.0
Release/2.10.0
2 parents 5cec7f5 + 56b5365 commit 6c2f73a

File tree

6 files changed

+24
-12
lines changed

6 files changed

+24
-12
lines changed

changelog.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [2.10.0] - 2025-03-20
11+
12+
### Changed
13+
14+
- Switched KMD Nova case api from 1.0 to 2.0.
15+
16+
### Fixed
17+
18+
- Fixed eflyt tab changing
19+
1020
## [2.9.0] - 2025-02-19
1121

1222
### Added
@@ -198,7 +208,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
198208

199209
- Initial release
200210

201-
[Unreleased]: https://github.com/itk-dev-rpa/ITK-dev-shared-components/compare/2.9.0...HEAD
211+
[Unreleased]: https://github.com/itk-dev-rpa/ITK-dev-shared-components/compare/2.10.0...HEAD
212+
[2.10.0]: https://github.com/itk-dev-rpa/ITK-dev-shared-components/releases/tag/2.10.0
202213
[2.9.0]: https://github.com/itk-dev-rpa/ITK-dev-shared-components/releases/tag/2.9.0
203214
[2.8.1]: https://github.com/itk-dev-rpa/ITK-dev-shared-components/releases/tag/2.8.1
204215
[2.8.0]: https://github.com/itk-dev-rpa/ITK-dev-shared-components/releases/tag/2.8.0

itk_dev_shared_components/eflyt/eflyt_case.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,13 @@ def change_tab(browser: webdriver.Chrome, tab_index: int):
121121
tab_index: The zero-based index of the tab to select.
122122
"""
123123
# Use the src of the tab image to determine if the tab needs to be changed
124-
tab_image = browser.find_element(By.ID, "ctl00_ContentPlaceHolder2_ptFanePerson_ImgJournalMap")
124+
tab_image = browser.find_element(By.CSS_SELECTOR, "[id^='ctl00_ContentPlaceHolder2_ptFanePerson_ImgJournalMap']")
125125
image_src = tab_image.get_attribute("src")
126126
current_index = int(image_src[-5]) - 1
127127

128128
if current_index != tab_index:
129-
browser.execute_script(f"__doPostBack('ctl00$ContentPlaceHolder2$ptFanePerson$ImgJournalMap','{tab_index}')")
129+
element_id = tab_image.get_attribute("id").replace("_", "$")
130+
browser.execute_script(f"__doPostBack('{element_id}','{tab_index}')")
130131

131132

132133
def approve_case(browser: webdriver.Chrome):

itk_dev_shared_components/kmd_nova/nova_cases.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def _get_nova_cases(nova_access: NovaAccess, payload: dict) -> list[NovaCase]:
9797
requests.exceptions.HTTPError: If the request failed.
9898
"""
9999
url = urllib.parse.urljoin(nova_access.domain, "api/Case/GetList")
100-
params = {"api-version": "1.0-Case"}
100+
params = {"api-version": "2.0-Case"}
101101

102102
headers = {'Content-Type': 'application/json', 'Authorization': f"Bearer {nova_access.get_bearer_token()}"}
103103

@@ -275,7 +275,7 @@ def add_case(case: NovaCase, nova_access: NovaAccess):
275275
requests.exceptions.HTTPError: If the request failed.
276276
"""
277277
url = urllib.parse.urljoin(nova_access.domain, "api/Case/Import")
278-
params = {"api-version": "1.0-Case"}
278+
params = {"api-version": "2.0-Case"}
279279

280280
payload = {
281281
"common": {

itk_dev_shared_components/kmd_nova/nova_documents.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def get_documents(case_uuid: str, nova_access: NovaAccess) -> list[Document]:
2929
requests.exceptions.HTTPError: If the request failed.
3030
"""
3131
url = urllib.parse.urljoin(nova_access.domain, "api/Document/GetList")
32-
params = {"api-version": "1.0-Case"}
32+
params = {"api-version": "2.0-Case"}
3333

3434
payload = {
3535
"common": {
@@ -91,7 +91,7 @@ def download_document_file(document_uuid: str, nova_access: NovaAccess, checkout
9191
requests.exceptions.HTTPError: If the request failed.
9292
"""
9393
url = urllib.parse.urljoin(nova_access.domain, "api/Document/GetFile")
94-
params = {"api-version": "1.0-Case"}
94+
params = {"api-version": "2.0-Case"}
9595

9696
payload = {
9797
"common": {
@@ -129,7 +129,7 @@ def upload_document(file: BinaryIO, file_name: str, nova_access: NovaAccess) ->
129129
document_id = urllib.parse.quote(str(uuid.uuid4()))
130130

131131
url = urllib.parse.urljoin(nova_access.domain, f"api/Document/UploadFile/{transaction_id}/{document_id}")
132-
params = {"api-version": "1.0-Case"}
132+
params = {"api-version": "2.0-Case"}
133133

134134
headers = {'Authorization': f"Bearer {nova_access.get_bearer_token()}", 'accept': '*/*'}
135135

@@ -162,7 +162,7 @@ def attach_document_to_case(case_uuid: str, document: Document, nova_access: Nov
162162
requests.exceptions.HTTPError: If the request failed.
163163
"""
164164
url = urllib.parse.urljoin(nova_access.domain, "api/Document/Import")
165-
params = {"api-version": "1.0-Case"}
165+
params = {"api-version": "2.0-Case"}
166166

167167
payload = {
168168
"common": {

itk_dev_shared_components/kmd_nova/nova_notes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def add_text_note(case_uuid: str, note_title: str, note_text: str, caseworker: C
2828
note_uuid = str(uuid.uuid4())
2929

3030
url = urllib.parse.urljoin(nova_access.domain, "api/Case/Update")
31-
params = {"api-version": "1.0-Case"}
31+
params = {"api-version": "2.0-Case"}
3232

3333
payload = {
3434
"common": {
@@ -103,7 +103,7 @@ def get_notes(case_uuid: str, nova_access: NovaAccess, offset: int = 0, limit: i
103103
A tuple of JournalNote objects.
104104
"""
105105
url = urllib.parse.urljoin(nova_access.domain, "api/Case/GetList")
106-
params = {"api-version": "1.0-Case"}
106+
params = {"api-version": "2.0-Case"}
107107

108108
payload = {
109109
"common": {

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "itk_dev_shared_components"
7-
version = "2.9.0"
7+
version = "2.10.0"
88
authors = [
99
{ name="ITK Development", email="[email protected]" },
1010
]

0 commit comments

Comments
 (0)