Skip to content

Release/2.10.0 #100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Mar 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [2.10.0] - 2025-03-20

### Changed

- Switched KMD Nova case api from 1.0 to 2.0.

### Fixed

- Fixed eflyt tab changing

## [2.9.0] - 2025-02-19

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

- Initial release

[Unreleased]: https://github.com/itk-dev-rpa/ITK-dev-shared-components/compare/2.9.0...HEAD
[Unreleased]: https://github.com/itk-dev-rpa/ITK-dev-shared-components/compare/2.10.0...HEAD
[2.10.0]: https://github.com/itk-dev-rpa/ITK-dev-shared-components/releases/tag/2.10.0
[2.9.0]: https://github.com/itk-dev-rpa/ITK-dev-shared-components/releases/tag/2.9.0
[2.8.1]: https://github.com/itk-dev-rpa/ITK-dev-shared-components/releases/tag/2.8.1
[2.8.0]: https://github.com/itk-dev-rpa/ITK-dev-shared-components/releases/tag/2.8.0
Expand Down
5 changes: 3 additions & 2 deletions itk_dev_shared_components/eflyt/eflyt_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,13 @@ def change_tab(browser: webdriver.Chrome, tab_index: int):
tab_index: The zero-based index of the tab to select.
"""
# Use the src of the tab image to determine if the tab needs to be changed
tab_image = browser.find_element(By.ID, "ctl00_ContentPlaceHolder2_ptFanePerson_ImgJournalMap")
tab_image = browser.find_element(By.CSS_SELECTOR, "[id^='ctl00_ContentPlaceHolder2_ptFanePerson_ImgJournalMap']")
image_src = tab_image.get_attribute("src")
current_index = int(image_src[-5]) - 1

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


def approve_case(browser: webdriver.Chrome):
Expand Down
4 changes: 2 additions & 2 deletions itk_dev_shared_components/kmd_nova/nova_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def _get_nova_cases(nova_access: NovaAccess, payload: dict) -> list[NovaCase]:
requests.exceptions.HTTPError: If the request failed.
"""
url = urllib.parse.urljoin(nova_access.domain, "api/Case/GetList")
params = {"api-version": "1.0-Case"}
params = {"api-version": "2.0-Case"}

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

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

payload = {
"common": {
Expand Down
8 changes: 4 additions & 4 deletions itk_dev_shared_components/kmd_nova/nova_documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def get_documents(case_uuid: str, nova_access: NovaAccess) -> list[Document]:
requests.exceptions.HTTPError: If the request failed.
"""
url = urllib.parse.urljoin(nova_access.domain, "api/Document/GetList")
params = {"api-version": "1.0-Case"}
params = {"api-version": "2.0-Case"}

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

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

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

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

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

payload = {
"common": {
Expand Down
4 changes: 2 additions & 2 deletions itk_dev_shared_components/kmd_nova/nova_notes.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def add_text_note(case_uuid: str, note_title: str, note_text: str, caseworker: C
note_uuid = str(uuid.uuid4())

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

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

payload = {
"common": {
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "itk_dev_shared_components"
version = "2.9.0"
version = "2.10.0"
authors = [
{ name="ITK Development", email="[email protected]" },
]
Expand Down