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

Feature/motion forward #2814

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
e16f70d
Bump dependency-injector from 4.42.0 to 4.43.0 in /requirements/parti…
dependabot[bot] Nov 11, 2024
936a4cc
Bump types-beautifulsoup4 in /requirements/partial (#2693)
dependabot[bot] Nov 11, 2024
b1fe083
Bump opentelemetry dependencies update datastore and auth hashes (#2726)
luisa-beerboom Nov 11, 2024
45bdd24
Bump pypdf[crypto] from 5.0.1 to 5.1.0 in /requirements/partial (#2705)
dependabot[bot] Nov 12, 2024
cb07383
Bump bleach[css] from 6.1.0 to 6.2.0 in /requirements/partial (#2709)
dependabot[bot] Nov 12, 2024
b5921c5
Check for poll permission correctly (#2622)
luisa-beerboom Nov 13, 2024
cf020c4
Agenda item permission checks for motion.create (#2728)
luisa-beerboom Nov 20, 2024
dec9a05
beautify presenter docs (#2732)
hjanott Nov 25, 2024
1bdd315
remove participant presence status when removed from meeting (#2730)
hjanott Nov 25, 2024
deac9e1
new saml meeting mapping (#2722)
hjanott Nov 25, 2024
c13b26f
Allow meeting admin user to update a non admin user that shares all h…
hjanott Nov 25, 2024
d077332
Bump werkzeug from 3.0.4 to 3.1.3 in /requirements/partial (#2721)
dependabot[bot] Nov 25, 2024
5e8f153
Remove motion import (#2736)
luisa-beerboom Nov 25, 2024
3ef9052
Update debugpy and datastore commit hash (#2738)
luisa-beerboom Nov 26, 2024
a2d779e
make database check work again (#2747)
hjanott Nov 29, 2024
eb967ae
Translate public group name (#2748)
luisa-beerboom Dec 3, 2024
c6b2499
Specify motion.create functionality concerning additional_submitter …
luisa-beerboom Dec 3, 2024
0abf8c3
saml-meeting-mapping: allow boolean attributes and vote weight as str…
hjanott Dec 3, 2024
f282173
Put all candidates on the LOS when setting phase to voting dependant …
luisa-beerboom Dec 5, 2024
a352769
Update meta repository (#2758)
openslides-automation[bot] Dec 5, 2024
117b317
Kill all sessions of user set to inactive (#2752)
hjanott Dec 6, 2024
2fae794
Update issue templates for bugs (#2762)
rrenkert Dec 9, 2024
7101083
Allow submitter ids and additional submitter on motion create (#2766)
hjanott Dec 17, 2024
7bf782c
Forbid unreasonable vote amounts in poll (#2772)
hjanott Dec 18, 2024
d578f5b
Ignore assignment candidates already on list of speakers on phase to …
hjanott Dec 18, 2024
d139abd
Bump pytest from 8.3.3 to 8.3.4 in /requirements/partial (#2757)
dependabot[bot] Jan 7, 2025
22dda28
Upgrade mypy dependency (#2786)
luisa-beerboom Jan 7, 2025
dc0c0f4
Update meta repository (#2784)
openslides-automation[bot] Jan 7, 2025
1a98951
Upgrade opentelemetry debugpy fastjsonschema and hashes (#2787)
luisa-beerboom Jan 7, 2025
06e9934
Bump pyupgrade from 3.19.0 to 3.19.1 in /requirements/partial (#2771)
dependabot[bot] Jan 7, 2025
428998d
Bump types-pyyaml in /requirements/partial (#2777)
dependabot[bot] Jan 7, 2025
b5cbfe5
Bump types-simplejson in /requirements/partial (#2774)
dependabot[bot] Jan 7, 2025
a361bb2
Bump pygments from 2.18.0 to 2.19.1 in /requirements/partial (#2785)
dependabot[bot] Jan 7, 2025
e986c71
Bump dependency-injector from 4.43.0 to 4.45.0 in /requirements/parti…
dependabot[bot] Jan 7, 2025
9c9e46e
Bump pytest-profiling from 1.7.0 to 1.8.1 in /requirements/partial (#…
dependabot[bot] Jan 7, 2025
f88bd61
Bump types-bleach in /requirements/partial (#2739)
dependabot[bot] Jan 7, 2025
b402b0b
Add foreign delegation removal from user.update_self (#2779)
luisa-beerboom Jan 8, 2025
03b1b73
Update meta repository (#2795)
openslides-automation[bot] Jan 9, 2025
a7ef893
Build in poll.can_see_progress permission (#2797)
luisa-beerboom Jan 10, 2025
f14e1bb
Update meta repository (#2798)
openslides-automation[bot] Jan 10, 2025
b61f24e
Bump types-pygments in /requirements/partial (#2790)
dependabot[bot] Jan 13, 2025
083a835
Update it.po from community member PR https://github.com/OpenSlides/O…
Elblinator Jan 14, 2025
bc6e7e9
Remove global folder and move folder contents up (#2769)
hjanott Jan 14, 2025
f9b7df3
Fix merge for users without meetings (#2792)
luisa-beerboom Jan 15, 2025
be22107
Edit merge settings of example-data states (#2794)
luisa-beerboom Jan 15, 2025
ccd79d5
Fix merge for saml users in case of password changing rights (#2793)
luisa-beerboom Jan 15, 2025
faaad6f
accurize decimal description in documentation (#2800)
hjanott Jan 15, 2025
b2ef9a9
Fix meeting.clone list election behaviour (#2791)
luisa-beerboom Jan 15, 2025
cca5aea
Bump roman from 4.2 to 5.0 in /requirements/partial (#2803)
dependabot[bot] Jan 16, 2025
402180b
Bump debugpy from 1.8.11 to 1.8.12 in /requirements/partial (#2804)
dependabot[bot] Jan 21, 2025
d304a70
Update datastore hash (#2805)
luisa-beerboom Jan 21, 2025
4c2f684
Merge remote-tracking branch 'upstream/main' into feature/motion-forward
hjanott Jan 29, 2025
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
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**

**How To Reproduce**

**Payload from client (handle_request)**

**Response from backend**

**Expected behavior**

**Additional context**
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "openslides-meta"]
path = global/meta
path = meta
url = https://github.com/OpenSlides/openslides-meta.git
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ ENV PYTHONPATH /app
COPY --chown=appuser:appuser scripts scripts
COPY --chown=appuser:appuser entrypoint.sh ./
COPY --chown=appuser:appuser openslides_backend openslides_backend
COPY --chown=appuser:appuser global global
COPY --chown=appuser:appuser meta meta
COPY --chown=appuser:appuser data data

ARG VERSION=dev
RUN echo "$VERSION" > openslides_backend/version.txt
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Development and testing inside docker container or without docker (only unit and integration tests)

paths = openslides_backend/ tests/ cli/ global/meta/dev/src/
paths = openslides_backend/ tests/ cli/ meta/dev/src/

all: pyupgrade black autoflake isort flake8 mypy

Expand Down Expand Up @@ -40,7 +40,7 @@ test-unit-integration:
check-all: validate-models-yml check-models check-initial-data-json check-example-data-json check-permissions

validate-models-yml:
make -C global/meta/dev validate-models
make -C meta/dev validate-models

generate-models:
python cli/generate_models.py $(MODELS_PATH)
Expand All @@ -57,10 +57,10 @@ check-permissions:
python cli/generate_permissions.py --check

check-initial-data-json:
python cli/check_json.py global/data/initial-data.json
python cli/check_json.py data/initial-data.json

check-example-data-json:
python cli/check_json.py global/data/example-data.json
python cli/check_json.py data/example-data.json

run-debug:
OPENSLIDES_DEVELOPMENT=1 python -m openslides_backend
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ To generate a new models.py file run (inside the docker container)

$ make generate-models

The original models.yml is now included in this repository at global/meta/. If you do not want to generate from the current backend, you can provide either a local path or an URL via the variable `MODELS_PATH`. This way, you can generate only partial changes if multiple changes to the models file were merged into the main:
The original models.yml is now included in this repository at meta/. If you do not want to generate from the current backend, you can provide either a local path or a URL via the variable `MODELS_PATH`. This way, you can generate only partial changes if multiple changes to the models file were merged into the main:

$ MODEL_PATH="local path or GitHub link" make generate-models

Expand Down
2 changes: 1 addition & 1 deletion cli/generate_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
)
from openslides_backend.shared.patterns import KEYSEPARATOR, Collection

SOURCE = "./global/meta/models.yml"
SOURCE = "./meta/models.yml"

DESTINATION = os.path.abspath(
os.path.join(
Expand Down
2 changes: 1 addition & 1 deletion cli/generate_permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from cli.util.util import assert_equal, open_output, open_yml_file, parse_arguments
from openslides_backend.permissions.get_permission_parts import get_permission_parts

SOURCE = "./global/meta/permission.yml"
SOURCE = "./meta/permission.yml"

DESTINATION = os.path.abspath(
os.path.join(
Expand Down
9 changes: 5 additions & 4 deletions global/data/example-data.json → data/example-data.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"_migration_index": 63,
"_migration_index": 64,
"gender":{
"1":{
"id": 1,
Expand Down Expand Up @@ -72,7 +72,8 @@
"gender": "gender",
"pronoun": "pronoun",
"is_active": "is_active",
"is_physical_person": "is_person"
"is_physical_person": "is_person",
"member_number": "member_number"
}
}
},
Expand Down Expand Up @@ -1556,7 +1557,7 @@
"recommendation_label": "Acceptance",
"css_class": "green",
"set_number": true,
"merge_amendment_into_final": "undefined",
"merge_amendment_into_final": "do_merge",
"previous_state_ids": [
1
],
Expand All @@ -1578,7 +1579,7 @@
"recommendation_label": "Rejection",
"css_class": "red",
"set_number": true,
"merge_amendment_into_final": "undefined",
"merge_amendment_into_final": "do_not_merge",
"previous_state_ids": [
1
],
Expand Down
5 changes: 3 additions & 2 deletions global/data/initial-data.json → data/initial-data.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"_migration_index": 63,
"_migration_index": 64,
"gender":{
"1":{
"id": 1,
Expand Down Expand Up @@ -58,7 +58,8 @@
"gender": "gender",
"pronoun": "pronoun",
"is_active": "is_active",
"is_physical_person": "is_person"
"is_physical_person": "is_person",
"member_number": "member_number"
}
}
},
Expand Down
3 changes: 2 additions & 1 deletion dev/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ COPY dev/cleanup.sh .

# Copy files which are mounted to make the full stack work
COPY scripts scripts
COPY global global
COPY cli cli
COPY data data
COPY meta meta

COPY Makefile .
COPY setup.cfg .
Expand Down
4 changes: 3 additions & 1 deletion dev/docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ services:
- ../openslides_backend:/app/openslides_backend
- ../tests:/app/tests
- ../cli:/app/cli
- ../global:/app/global
- ../data:/app/data
- ../meta:/app/meta
- ../requirements:/app/requirements
- ../scripts:/app/scripts
environment:
- DATASTORE_READER_HOST=datastore-reader
Expand Down
1 change: 1 addition & 0 deletions docs/Presenters-Overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Available presenters:
- [get_forwarding_meetings](presenters/get_forwarding_meetings.md)
- [get_meetings](presenters/get_meetings.md)
- [get_users](presenters/get_users.md)
- [get_user_editable](presenters/get_user_editable.md)
- [get_user_related_models](presenters/get_user_related_models.md)
- [get_user_scope](presenters/get_user_scope.md)
- [search_deleted_models](presenters/search_deleted_models.md)
Expand Down
2 changes: 2 additions & 0 deletions docs/actions/assignment.update.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,7 @@
## Action
Updates an assignment.

If phase is newly set to `voting`, the candidates of the assignment are put in the assignments `list_of_speakers` if they are not already.

## Permissions
The user needs `assignment.can_manage`.
3 changes: 2 additions & 1 deletion docs/actions/group.update.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
```

## Action
Updates the group. Permissions are restricted to the following enum: https://github.com/OpenSlides/openslides-backend/blob/fae36a0b055bbaa463da4768343080c285fe8178/global/meta/models.yml#L1621-L1656
Updates the group. Permissions are restricted to the group.permissions enum inside https://github.com/OpenSlides/openslides-meta/blob/main/models.yml.

If the group is the meetings anonymous group, the name may not be changed and the permissions have to be in the following whitelist:
- agenda_item.can_see,
Expand All @@ -27,6 +27,7 @@ If the group is the meetings anonymous group, the name may not be changed and th
- meeting.can_see_livestream,
- motion.can_see,
- motion.can_see_internal,
- poll.can_see_progress,
- projector.can_see,
- user.can_see,
- user.can_see_sensitive_data
Expand Down
4 changes: 2 additions & 2 deletions docs/actions/meeting.create.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
It has to be checked whether the `organization.limit_of_meetings` is unlimited (=0) or lower than the amount of active meetings in `organization.active_meeting_ids`.

When creating a meeting the following objects have to be created, too:
- Groups: `Default`, `Admin`, `Delegates`, `Staff`, `Committees`. The first one is set as `meeting/default_group_id`, the second one as `meeting/admin_group_id`. The permissions can be found in the [initial-data.json](https://github.com/OpenSlides/openslides-backend/tree/main/global/data/initial-data.json)).
- Groups: `Default`, `Admin`, `Delegates`, `Staff`, `Committees`. The first one is set as `meeting/default_group_id`, the second one as `meeting/admin_group_id`. The permissions can be found in the [initial-data.json](https://github.com/OpenSlides/openslides-backend/tree/main/data/initial-data.json)).
- Projector: One projector named `"Default projector"` must be created and set as `meeting/reference_projector_id`.
- All default projectors (`meeting/default_projector_*_ids`, see `models.yml`) must be set to the one projector
- Motion workflow and states: Create one workflow `"simple workflow"` which is set as `meeting/motions_default_workflow_id` and `meeting/motions_default_amendment_workflow_id`. Create four states (analog as in the [initial-data.json](https://github.com/OpenSlides/openslides-backend/tree/main/global/data/initial-data.json)).
- Motion workflow and states: Create one workflow `"simple workflow"` which is set as `meeting/motions_default_workflow_id` and `meeting/motions_default_amendment_workflow_id`. Create four states (analog as in the [initial-data.json](https://github.com/OpenSlides/openslides-backend/tree/main/data/initial-data.json)).
- Two countdowns are created and set as `meeting/list_of_speakers_countdown` (name: "List of speakers countdown") and `meeting/voting_countdown` (name: "Voting countdown").

If `user_ids` are given, it must be checked that it is a subset of `committee/user_ids`. Each user is added to the meeting by being added to the default group.
Expand Down
1 change: 1 addition & 0 deletions docs/actions/meeting.update.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
motions_enable_reason_on_projector: boolean;
motions_enable_sidebox_on_projector: boolean;
motions_enable_recommendation_on_projector: boolean;
motions_create_enable_additional_submitter_text:boolean;
motions_show_referring_motions: boolean;
motions_show_sequential_number: boolean;
motions_recommendations_by: string;
Expand Down
3 changes: 2 additions & 1 deletion docs/actions/motion.create.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ This is the logic for other fields depending on the motion type:

There are some fields that need special attention:
- `workflow_id`: If it is given, the motion's state is set to the workflow's first state. The workflow must be from the same meeting. If the field is not given, one of the three default (`meeting/motions_default_workflow_id` or `meeting/motions_default_amendment_workflow_id`) workflows is used depending on the type of the motion to create.
- `submitter_ids`: These are **user ids** and not ids of the `submitter` model. If nothing is given (`[]`), the request user's id is used. For each id in the list a `motion_submitter` model is created. The weight must be set to the order of the given list.
- `additional_submitter` a text field where text-based submitter information may be entered. Cannot be set unless `meeting/motions_create_enable_additional_submitter_text` is `true`. Requires permissions `Motion.CAN_CREATE` and `Motion.CAN_MANAGE_METADATA`.
- `submitter_ids`: These are **user ids** and not ids of the `motion_submitter` model. If nothing is given (`[]`) and the field `additional_submitter` isn't filled, the request user's id is used. For each id in the list a `motion_submitter` model is created. The weight must be set to the order of the given list. Requires permissions `Motion.CAN_CREATE`, `Motion.CAN_MANAGE_METADATA` and `User.CAN_SEE`.
- `agenda_*`: See [Agenda](https://github.com/OpenSlides/OpenSlides/wiki/Agenda#additional-fields-during-creation-of-agenda-content-objects).

Other things to do when creating motions:
Expand Down
21 changes: 0 additions & 21 deletions docs/actions/motion.import.md

This file was deleted.

54 changes: 0 additions & 54 deletions docs/actions/motion.json_upload.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/actions/option.update.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ If the poll's state is *created* and at least one vote value is given (`Y`, `N`
The request user needs:
- `motion.can_manage_polls` if the poll's content object is a motion
- `assignment.can_manage` if the poll's content object is an assignment
- `poll.can_manage` else
- `poll.can_manage` if the poll's content object is a topic
Loading