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 creators even when dublin core behaviors are not enabled. #186

Merged
merged 1 commit into from Nov 8, 2019

Conversation

@jone
Copy link
Member

jone commented Nov 6, 2019

The Dexterity base class has support for creators (it implements listCreators() and other methods. The dublin core behavior makes it possible to edit the creators.

The migration did work when the dublin core behavior was enabled. But when it was not enabled, the creators was overwritten by the user executing the migration. This change updates the creators.

@jone jone requested a review from 4teamwork/plone Nov 6, 2019
Copy link

busykoala left a comment

Looks good to me. I added one question I'm not quite sure about. Thanks for the improvement.

ftw/upgrade/tests/test_migration.py Show resolved Hide resolved
ftw/upgrade/tests/test_migration.py Outdated Show resolved Hide resolved
ftw/upgrade/tests/base.py Outdated Show resolved Hide resolved
@djowett-ftw

This comment has been minimized.

Copy link
Contributor

djowett-ftw commented Nov 8, 2019

One more qu: Why def login(...) here rather than in (say) ftw.testing?

@jone

This comment has been minimized.

Copy link
Member Author

jone commented Nov 8, 2019

One more qu: Why def login(...) here rather than in (say) ftw.testing?

I have actually copied it from ftw.testing. I need to improve that at some point: in ftw.testing the login() implementation is in an integration test case base class, but we are using functional testing here. I think we should have a functional test case base class at some point too, but for now it's easier to just put it here, I think 🤔

@djowett-ftw

This comment has been minimized.

Copy link
Contributor

djowett-ftw commented Nov 8, 2019

Ok, understood - maybe strip out most of the docstring to avoid it looking too "supported"?

@jone jone force-pushed the jone-update-creators branch 2 times, most recently from e004bd5 to b309ead Nov 8, 2019
@jone

This comment has been minimized.

Copy link
Member Author

jone commented Nov 8, 2019

Ok, understood - maybe strip out most of the docstring to avoid it looking too "supported"?

👍 good idea, I've removed the docstring.
I've also added some transaction.commit statements because that's needed in functional testing (my test just does not use a browser in practice, that's why it does not break something)

The Dexterity base class has support for creators (it implements
listCreators() and other methods.
The dublin core behavior makes it possible to edit the creators.

The migration did work when the dublin core behavior was enabled.
But when it was not enabled, the creators was overwritten by the
user executing the migration. This change updates the creators.
@jone jone force-pushed the jone-update-creators branch from b309ead to d942294 Nov 8, 2019
@jone

This comment has been minimized.

Copy link
Member Author

jone commented Nov 8, 2019

👍 updated

@jone jone requested a review from djowett-ftw Nov 8, 2019
@djowett-ftw

This comment has been minimized.

Copy link
Contributor

djowett-ftw commented on d942294 Nov 8, 2019

👍

@jone jone merged commit 58f97cb into master Nov 8, 2019
5 checks passed
5 checks passed
CI Governor: test-plone-4.3.7.cfg Task #465543 succeeded
Details
CI Governor: test-plone-4.3.x-with-blessed.cfg Task #465544 succeeded
Details
CI Governor: test-plone-4.3.x-with-collective.indexing.cfg Task #465545 succeeded
Details
CI Governor: test-plone-4.3.x.cfg Task #465546 succeeded
Details
CI Governor: test-plone-5.1.x.cfg Task #465547 succeeded
Details
@jone jone deleted the jone-update-creators branch Nov 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.