Skip to content

Commit

Permalink
Commentary
Browse files Browse the repository at this point in the history
  • Loading branch information
luisa-beerboom committed Jul 10, 2024
1 parent f6f8a86 commit 9fb1c81
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 3 deletions.
15 changes: 14 additions & 1 deletion docs/actions/motion.create_forwarded.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ The original motion must be updated as well (this is done by the automatic relat

The optional flags `use_original_submitter` and `use_original_number` will cause the original submitters and original numbers to be used in the new motion respectively. In case of the submitters, the action will generate the full name of the submitters and write the entire list of them and the value of the origin motions `additional_submitter` comma separated into the new motions `additional_submitter` field. If `use_original_submitter` is false the name of the origin motions committee will be written into the `additional_submitter` field instead

If `with_amendments` is set to True, all amendments of the motion, that have a state that can forward, will also be forwarded to the target meeting and connected to the newly forwarded lead motion
If `with_amendments` is set to True, all amendments of the motion, that have a state that can forward, will also be forwarded to the target meeting and connected to the newly forwarded lead motion.
The three boolean flags for extra rules will be applied to the amendments as well.

If the forwarded amendments have amendments themselves, those will also be treated the same way

Expand All @@ -43,6 +44,18 @@ If the forwarded amendments have amendments themselves, those will also be treat

* The origin state must allow forwarding (`allow_motion_forwarding` must be set to True).

## Result

The result object for each instance has the format
```
{
id: Id,
sequential_number: int,
non_forwarded_amendment_amount: int, // Number of amendments that couldn't be returned because of forwarding being not allowed in the state
amendment_result_data: [...], // List of result data objects in the same format, for all newly created amendments for the newly created motion
}
```

## Permissions
The request user needs `motion.can_forward` in the source meeting. `motion.can_manage` is not explicitly needed for the request user, because it is included. There are no rights needed in the receiving meeting.

Expand Down
22 changes: 22 additions & 0 deletions docs/actions/motion.create_forwarded_amendment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## Payload
```
{
// Required
meeting_id: Id;
title: string;
lead_motion_id: Id;
origin_id: Id;
// Optional
text: HTML;
reason: HTML;
amendment_paragraphs: JSON
use_original_submitter: boolean;
use_original_number: boolean;
}
```

## Internal action
Forwards an amendment in a manner that is to what is done with normal motions in [motion.create_forwarded](motion.create_forwarded.md)

The only change is that the `with_amendments` flag is not in the payload, because it is assumed to be true.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
)
class MotionCreateForwardedAmendment(BaseMotionCreateForwarded):
"""
Create action for forwarded motions.
Internal create action for forwarded motion amendments.
Should only be called by motion.create_forwarded
"""

schema = DefaultSchema(Motion()).get_create_schema(
Expand All @@ -24,7 +25,6 @@ class MotionCreateForwardedAmendment(BaseMotionCreateForwarded):
additional_optional_fields={
"use_original_submitter": {"type": "boolean"},
"use_original_number": {"type": "boolean"},
"with_amendments": {"type": "boolean"},
},
)

Expand Down

0 comments on commit 9fb1c81

Please sign in to comment.