Skip to content
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

Migrate AnalysisCategories to DX #2567

Merged
merged 18 commits into from
Jun 13, 2024

Conversation

Bugerman58
Copy link
Contributor

Description of the issue/feature this PR addresses

This PR migrates the AT AnalysisCategory and AnalysisCategories to Dexterity types for Python 3 compatibility.

Current behavior before PR

AnalysisCategory and AnalysisCategories are content types based on the Archetypes framework

Desired behavior after PR is merged

AnalysisCategory and AnalysisCategories are content types based on the Dexterity framework

--
I confirm I have tested this PR thoroughly and coded it according to PEP8
and Plone's Python styleguide standards.

@Bugerman58 Bugerman58 marked this pull request as ready for review June 3, 2024 11:06
@Bugerman58
Copy link
Contributor Author

@xispa Hi, this PR ready for review. pls, check it

@xispa xispa added Python 3 Python 3 compatibility Content Migration ♻️ Migrate contents to Dexterity labels Jun 5, 2024
@xispa xispa self-requested a review June 11, 2024 07:49
Copy link
Member

@xispa xispa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Bugerman58 !

There is a subscriber that reindexes all sample analyses when the title of the category changes. This subscriber won't be called because the event is only triggered for AT content types. I do know that the dance is weird, takes ages to complete and is something we need to fix. But keep it for now, please. I will open a PR after yours to remove the getCategoryTitle metadata and fix that thing. Meanwhile, please create a new subscriber specific for analysiscategory at senaite.core.subscribers.

src/bika/lims/workflow/analysiscategory/guards.py Outdated Show resolved Hide resolved
src/senaite/core/content/analysiscategory.py Outdated Show resolved Hide resolved
src/senaite/core/content/analysiscategory.py Outdated Show resolved Hide resolved
Copy link
Member

@xispa xispa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent, thanks!

@xispa xispa merged commit a9bca7b into senaite:2.x Jun 13, 2024
1 check passed
@Bugerman58 Bugerman58 deleted the migrate-analysiscategory-to-dx branch June 14, 2024 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content Migration ♻️ Migrate contents to Dexterity Python 3 Python 3 compatibility
Development

Successfully merging this pull request may close these issues.

2 participants