Skip to content

Add the option to create/switch to TEMPLATE or REGULAR projects - #825

Open
manylon wants to merge 3 commits into
masterfrom
QF-8625-add-project-types
Open

Add the option to create/switch to TEMPLATE or REGULAR projects#825
manylon wants to merge 3 commits into
masterfrom
QF-8625-add-project-types

Conversation

@manylon

@manylon manylon commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

In the past we only had one type of projects in QFieldCloud - "REGULAR". With those projects we can do anything - sync from QField, QGIS, CLI etc.

However, opengisch/QFieldCloud#1735 introduced a new TEMPLATE project type.

This PR introduces the ability to create a new project and mark it as TEMPLATE, or change the type of existing project between TEMPLATE and REGULAR.

  • Add a ProjectType enum (regular/template/shared_datasets) and a CloudProject.project_type property, mirroring QFieldCloud's new project_type field
  • Let users pick Regular/Template when creating a new project
  • Let users switch between Regular/Template when editing an existing project
  • Show a disabled dropdown reading "Shared datasets", for projects whose type is shared_datasets
  • Fall back to "regular" when talking to older API servers that don't send the project_type field yet

- Add a `ProjectType` enum (`regular`/`template`/`shared_datasets`) and a `CloudProject.project_type` property, mirroring QFieldCloud's new `project_type` field
- Let users pick `Regular`/`Template` when creating a new project
- Let users switch between `Regular`/`Template` when editing an existing project
- Show a disabled dropdown reading "Shared datasets" instead, for projects whose type is `shared_datasets`
- Fall back to "regular" when talking to older API servers that don't send the `project_type` field yet
@duke-nyuki

Copy link
Copy Markdown
Collaborator

@suricactus suricactus left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice first contribution. A few small comments.

Comment thread qfieldsync/core/cloud_api.py Outdated
Comment thread qfieldsync/core/cloud_api.py Outdated
Comment thread qfieldsync/core/cloud_project.py Outdated
Comment thread qfieldsync/gui/cloud_projects_dialog.py Outdated
Comment thread qfieldsync/gui/cloud_projects_dialog.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants