-
Notifications
You must be signed in to change notification settings - Fork 21
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
added multiselect and add items to collection in admin #273
added multiselect and add items to collection in admin #273
Conversation
@fsbraun Please check and review |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #273 +/- ##
==========================================
- Coverage 84.19% 79.05% -5.15%
==========================================
Files 23 40 +17
Lines 1740 1862 +122
Branches 282 260 -22
==========================================
+ Hits 1465 1472 +7
- Misses 245 359 +114
- Partials 30 31 +1 ☔ View full report in Codecov by Sentry. |
Looks good. Can you add some tests? What happens if there are published, unpublished or archived objects selected when the action is run? |
Actually, this is a nice example of the power of |
@fsbraun Tests are already there: https://github.com/django-cms/djangocms-moderation/blob/master/tests/test_forms.py#L146 |
Test adding a mixture of objects with different version states. I would expect a user message that some items could not be added to the collection since they are not drafts, or are locked. Also, the test should not use the form directly, but |
Hi @fsbraun , I was trying adding test cases accordingly but after writing initial test cases and debugging, found that add_items_to_collection only checks if version_ids are available it will return a redirect url to moderation screen. |
Hi @fsbraun can you also check my comment above? |
@vipulnarang95 Yes, it seems
|
@fsbraun Agreed but this redirects to the moderation view by just checking the versions and there is no logic in the code to check if the versions are draft/published. |
I'm not sure if I understand. Are you saying that you can add published versions to a moderation request? Does that make sense? I'd expect to get an error message if I tried to do this. I now looked at the code and see that the |
|
Also @fsbraun can you also give me the access to release these addons? |
Description
Feature added:
Add items to collection action added for all moderated models in cms_config
Related resources
Checklist