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

Topic json upload rework #1914

Merged
merged 29 commits into from
Sep 29, 2023
Merged

Conversation

reiterl
Copy link
Member

@reiterl reiterl commented Sep 21, 2023

Rebased on #1912.
Needs datastore with action_worker route also for collection import_preview now on datastore PR259 Open action_worker route for import_preview

@reiterl reiterl added the enhancement General enhancement which is neither bug nor feature label Sep 21, 2023
@reiterl reiterl added this to the 4.1 milestone Sep 21, 2023
@reiterl reiterl self-assigned this Sep 21, 2023
@reiterl reiterl linked an issue Sep 21, 2023 that may be closed by this pull request
@reiterl reiterl assigned r-peschke and unassigned reiterl Sep 22, 2023
@r-peschke r-peschke requested review from jsangmeister and removed request for r-peschke September 25, 2023 17:08
@r-peschke r-peschke assigned jsangmeister and unassigned r-peschke Sep 25, 2023
Comment on lines 61 to 69
agenda_item = {
field[7:]: value
for field in self.agenda_item_fields
if (value := entry.pop(field, None)) is not None
}
if agenda_item:
agenda_item["id"] = self.topic_lookup.get_field_by_name(
entry["title"], "agenda_item_id"
)
update_agenda_item_payload.append(agenda_item)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge this with the code here:


Also, magic numbers (like the 7 here) are almost never a good idea

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -195,3 +158,77 @@ def test_json_uplad_permission(self) -> None:
{"data": [{"title": "test"}], "meeting_id": 1},
Permissions.AgendaItem.CAN_MANAGE,
)


class TopicJsonUploadForUseInImport(BaseActionTestCase):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment here as in the account import: Move these to a separate file

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comment in account import

@r-peschke
Copy link
Member

After discussion today it was decided to merge the PR like it is
@rrenkert @luisa-beerboom @m-schieder @jsangmeister (absent) @r-peschke

@r-peschke r-peschke assigned r-peschke and unassigned jsangmeister Sep 29, 2023
@r-peschke r-peschke merged commit 732341a into OpenSlides:main Sep 29, 2023
4 checks passed
@r-peschke r-peschke deleted the topic-json-upload-rework branch September 29, 2023 11:37
peb-adr added a commit that referenced this pull request Oct 18, 2023
* commit '2d8d4a4f081c7d11401b7dd3f79363fb8bad2cd7':
  Make `THREAD_WATCH_TIMEOUT` configurable via env var (#1903)
  Topic json upload rework (#1914)
  Make user.forget_password two-email test safer (#1918)
  I1896 account.import (#1912)
  Make meeting_user actions backend internal (#1895)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement General enhancement which is neither bug nor feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rework of the topic.json_upload action
3 participants