diff --git a/CHANGELOG b/CHANGELOG index e958831f1..ed628eb99 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -40,6 +40,7 @@ Motions: - Added inline Editing for motion reason [#3361]. - Added multiselect filter for motion comments [#3372]. - Added support for pinning personal notes to the window [#3360]. +- Clear identifier on state reset [#3356]. Elections: - Added pagination for list view [#3393]. diff --git a/openslides/motions/models.py b/openslides/motions/models.py index cddd9ca79..118a6ba67 100644 --- a/openslides/motions/models.py +++ b/openslides/motions/models.py @@ -581,13 +581,20 @@ class Motion(RESTModelMixin, models.Model): def reset_state(self, workflow=None): """ - Set the state to the default state. + Set the state to the default state. If an identifier was set + automatically, reset the identifier and identifier_number. 'workflow' can be a workflow, an id of a workflow or None. If the motion is new and workflow is None, it chooses the default workflow from config. """ + + # The identifier is set automatically. + if config['motions_identifier'] is not 'manually': + self.identifier = '' + self.identifier_number = None + if type(workflow) is int: workflow = Workflow.objects.get(pk=workflow)