Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1c376aaf0a |
@@ -273,7 +273,7 @@ jobs:
|
||||
run: |
|
||||
cp ./deploy/selfhost/install.sh deploy/selfhost/setup.sh
|
||||
sed -i 's/${APP_RELEASE:-stable}/${APP_RELEASE:-'${REL_VERSION}'}/g' deploy/selfhost/docker-compose.yml
|
||||
# sed -i 's/APP_RELEASE=stable/APP_RELEASE='${REL_VERSION}'/g' deploy/selfhost/variables.env
|
||||
sed -i 's/APP_RELEASE=stable/APP_RELEASE='${REL_VERSION}'/g' deploy/selfhost/variables.env
|
||||
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
node_modules
|
||||
.next
|
||||
.yarn
|
||||
|
||||
### NextJS ###
|
||||
# Dependencies
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
nodeLinker: node-modules
|
||||
+10
-40
@@ -15,33 +15,14 @@ Without said minimal reproduction, we won't be able to investigate all [issues](
|
||||
|
||||
You can open a new issue with this [issue form](https://github.com/makeplane/plane/issues/new).
|
||||
|
||||
### Naming conventions for issues
|
||||
|
||||
When opening a new issue, please use a clear and concise title that follows this format:
|
||||
|
||||
- For bugs: `🐛 Bug: [short description]`
|
||||
- For features: `🚀 Feature: [short description]`
|
||||
- For improvements: `🛠️ Improvement: [short description]`
|
||||
- For documentation: `📘 Docs: [short description]`
|
||||
|
||||
**Examples:**
|
||||
- `🐛 Bug: API token expiry time not saving correctly`
|
||||
- `📘 Docs: Clarify RAM requirement for local setup`
|
||||
- `🚀 Feature: Allow custom time selection for token expiration`
|
||||
|
||||
This helps us triage and manage issues more efficiently.
|
||||
|
||||
## Projects setup and Architecture
|
||||
|
||||
### Requirements
|
||||
|
||||
- Docker Engine installed and running
|
||||
- Node.js version 20+ [LTS version](https://nodejs.org/en/about/previous-releases)
|
||||
- Node.js version v16.18.0
|
||||
- Python version 3.8+
|
||||
- Postgres version v14
|
||||
- Redis version v6.2.7
|
||||
- **Memory**: Minimum **12 GB RAM** recommended
|
||||
> ⚠️ Running the project on a system with only 8 GB RAM may lead to setup failures or memory crashes (especially during Docker container build/start or dependency install). Use cloud environments like GitHub Codespaces or upgrade local RAM if possible.
|
||||
|
||||
### Setup the project
|
||||
|
||||
@@ -69,17 +50,6 @@ chmod +x setup.sh
|
||||
docker compose -f docker-compose-local.yml up
|
||||
```
|
||||
|
||||
5. Start web apps:
|
||||
|
||||
```bash
|
||||
yarn dev
|
||||
```
|
||||
|
||||
6. Open your browser to http://localhost:3001/god-mode/ and register yourself as instance admin
|
||||
7. Open up your browser to http://localhost:3000 then log in using the same credentials from the previous step
|
||||
|
||||
That’s it! You’re all set to begin coding. Remember to refresh your browser if changes don’t auto-reload. Happy contributing! 🎉
|
||||
|
||||
## Missing a Feature?
|
||||
|
||||
If a feature is missing, you can directly _request_ a new one [here](https://github.com/makeplane/plane/issues/new?assignees=&labels=feature&template=feature_request.yml&title=%F0%9F%9A%80+Feature%3A+). You also can do the same by choosing "🚀 Feature" when raising a [New Issue](https://github.com/makeplane/plane/issues/new/choose) on our GitHub Repository.
|
||||
@@ -105,7 +75,7 @@ To ensure consistency throughout the source code, please keep these rules in min
|
||||
- **Improve documentation** - fix incomplete or missing [docs](https://docs.plane.so/), bad wording, examples or explanations.
|
||||
|
||||
## Contributing to language support
|
||||
This guide is designed to help contributors understand how to add or update translations in the application.
|
||||
This guide is designed to help contributors understand how to add or update translations in the application.
|
||||
|
||||
### Understanding translation structure
|
||||
|
||||
@@ -120,7 +90,7 @@ packages/i18n/src/locales/
|
||||
├── fr/
|
||||
│ └── translations.json
|
||||
└── [language]/
|
||||
└── translations.json
|
||||
└── translations.json
|
||||
```
|
||||
#### Nested structure
|
||||
To keep translations organized, we use a nested structure for keys. This makes it easier to manage and locate specific translations. For example:
|
||||
@@ -140,14 +110,14 @@ To keep translations organized, we use a nested structure for keys. This makes i
|
||||
We use [IntlMessageFormat](https://formatjs.github.io/docs/intl-messageformat/) to handle dynamic content, such as variables and pluralization. Here's how to format your translations:
|
||||
|
||||
#### Examples
|
||||
- **Simple variables**
|
||||
- **Simple variables**
|
||||
```json
|
||||
{
|
||||
"greeting": "Hello, {name}!"
|
||||
}
|
||||
```
|
||||
|
||||
- **Pluralization**
|
||||
- **Pluralization**
|
||||
```json
|
||||
{
|
||||
"items": "{count, plural, one {Work item} other {Work items}}"
|
||||
@@ -172,15 +142,15 @@ We use [IntlMessageFormat](https://formatjs.github.io/docs/intl-messageformat/)
|
||||
### Adding new languages
|
||||
Adding a new language involves several steps to ensure it integrates seamlessly with the project. Follow these instructions carefully:
|
||||
|
||||
1. **Update type definitions**
|
||||
1. **Update type definitions**
|
||||
Add the new language to the TLanguage type in the language definitions file:
|
||||
|
||||
```typescript
|
||||
// types/language.ts
|
||||
export type TLanguage = "en" | "fr" | "your-lang";
|
||||
```
|
||||
```
|
||||
|
||||
2. **Add language configuration**
|
||||
2. **Add language configuration**
|
||||
Include the new language in the list of supported languages:
|
||||
|
||||
```typescript
|
||||
@@ -191,14 +161,14 @@ Include the new language in the list of supported languages:
|
||||
];
|
||||
```
|
||||
|
||||
3. **Create translation files**
|
||||
3. **Create translation files**
|
||||
1. Create a new folder for your language under locales (e.g., `locales/your-lang/`).
|
||||
|
||||
2. Add a `translations.json` file inside the folder.
|
||||
|
||||
3. Copy the structure from an existing translation file and translate all keys.
|
||||
|
||||
4. **Update import logic**
|
||||
4. **Update import logic**
|
||||
Modify the language import logic to include your new language:
|
||||
|
||||
```typescript
|
||||
|
||||
@@ -47,10 +47,10 @@ Meet [Plane](https://plane.so/), an open-source project management tool to track
|
||||
|
||||
Getting started with Plane is simple. Choose the setup that works best for you:
|
||||
|
||||
- **Plane Cloud**
|
||||
- **Plane Cloud**
|
||||
Sign up for a free account on [Plane Cloud](https://app.plane.so)—it's the fastest way to get up and running without worrying about infrastructure.
|
||||
|
||||
- **Self-host Plane**
|
||||
- **Self-host Plane**
|
||||
Prefer full control over your data and infrastructure? Install and run Plane on your own servers. Follow our detailed [deployment guides](https://developers.plane.so/self-hosting/overview) to get started.
|
||||
|
||||
| Installation methods | Docs link |
|
||||
@@ -62,22 +62,22 @@ Prefer full control over your data and infrastructure? Install and run Plane on
|
||||
|
||||
## 🌟 Features
|
||||
|
||||
- **Issues**
|
||||
- **Issues**
|
||||
Efficiently create and manage tasks with a robust rich text editor that supports file uploads. Enhance organization and tracking by adding sub-properties and referencing related issues.
|
||||
|
||||
- **Cycles**
|
||||
- **Cycles**
|
||||
Maintain your team’s momentum with Cycles. Track progress effortlessly using burn-down charts and other insightful tools.
|
||||
|
||||
- **Modules**
|
||||
Simplify complex projects by dividing them into smaller, manageable modules.
|
||||
- **Modules**
|
||||
Simplify complex projects by dividing them into smaller, manageable modules.
|
||||
|
||||
- **Views**
|
||||
- **Views**
|
||||
Customize your workflow by creating filters to display only the most relevant issues. Save and share these views with ease.
|
||||
|
||||
- **Pages**
|
||||
- **Pages**
|
||||
Capture and organize ideas using Plane Pages, complete with AI capabilities and a rich text editor. Format text, insert images, add hyperlinks, or convert your notes into actionable items.
|
||||
|
||||
- **Analytics**
|
||||
- **Analytics**
|
||||
Access real-time insights across all your Plane data. Visualize trends, remove blockers, and keep your projects moving forward.
|
||||
|
||||
- **Drive** (_coming soon_): The drive helps you share documents, images, videos, or any other files that make sense to you or your team and align on the problem/solution.
|
||||
@@ -85,7 +85,38 @@ Access real-time insights across all your Plane data. Visualize trends, remove b
|
||||
|
||||
## 🛠️ Local development
|
||||
|
||||
See [CONTRIBUTING](./CONTRIBUTING.md)
|
||||
### Pre-requisites
|
||||
- Ensure Docker Engine is installed and running.
|
||||
|
||||
### Development setup
|
||||
Setting up your local environment is simple and straightforward. Follow these steps to get started:
|
||||
|
||||
1. Clone the repository:
|
||||
```
|
||||
git clone https://github.com/makeplane/plane.git
|
||||
```
|
||||
2. Navigate to the project folder:
|
||||
```
|
||||
cd plane
|
||||
```
|
||||
3. Create a new branch for your feature or fix:
|
||||
```
|
||||
git checkout -b <feature-branch-name>
|
||||
```
|
||||
4. Run the setup script in the terminal:
|
||||
```
|
||||
./setup.sh
|
||||
```
|
||||
5. Open the project in an IDE such as VS Code.
|
||||
|
||||
6. Review the `.env` files in the relevant folders. Refer to [Environment Setup](./ENV_SETUP.md) for details on the environment variables used.
|
||||
|
||||
7. Start the services using Docker:
|
||||
```
|
||||
docker compose -f docker-compose-local.yml up -d
|
||||
```
|
||||
|
||||
That’s it! You’re all set to begin coding. Remember to refresh your browser if changes don’t auto-reload. Happy contributing! 🎉
|
||||
|
||||
## ⚙️ Built with
|
||||
[](https://nextjs.org/)
|
||||
@@ -163,7 +194,7 @@ Feel free to ask questions, report bugs, participate in discussions, share ideas
|
||||
|
||||
If you discover a security vulnerability in Plane, please report it responsibly instead of opening a public issue. We take all legitimate reports seriously and will investigate them promptly. See [Security policy](https://github.com/makeplane/plane/blob/master/SECURITY.md) for more info.
|
||||
|
||||
To disclose any security issues, please email us at security@plane.so.
|
||||
To disclose any security issues, please email us at security@plane.so.
|
||||
|
||||
## 🤝 Contributing
|
||||
|
||||
@@ -188,4 +219,4 @@ Please read [CONTRIBUTING.md](https://github.com/makeplane/plane/blob/master/CON
|
||||
|
||||
|
||||
## License
|
||||
This project is licensed under the [GNU Affero General Public License v3.0](https://github.com/makeplane/plane/blob/master/LICENSE.txt).
|
||||
This project is licensed under the [GNU Affero General Public License v3.0](https://github.com/makeplane/plane/blob/master/LICENSE.txt).
|
||||
+2
-11
@@ -1,12 +1,3 @@
|
||||
NEXT_PUBLIC_API_BASE_URL="http://localhost:8000"
|
||||
|
||||
NEXT_PUBLIC_WEB_BASE_URL="http://localhost:3000"
|
||||
|
||||
NEXT_PUBLIC_ADMIN_BASE_URL="http://localhost:3001"
|
||||
NEXT_PUBLIC_API_BASE_URL=""
|
||||
NEXT_PUBLIC_ADMIN_BASE_PATH="/god-mode"
|
||||
|
||||
NEXT_PUBLIC_SPACE_BASE_URL="http://localhost:3002"
|
||||
NEXT_PUBLIC_SPACE_BASE_PATH="/spaces"
|
||||
|
||||
NEXT_PUBLIC_LIVE_BASE_URL="http://localhost:3100"
|
||||
NEXT_PUBLIC_LIVE_BASE_PATH="/live"
|
||||
NEXT_PUBLIC_WEB_BASE_URL=""
|
||||
@@ -1,4 +1,5 @@
|
||||
@import "@plane/propel/styles/fonts";
|
||||
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;500;600;700;800&display=swap");
|
||||
@import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@48,400,0,0&display=swap");
|
||||
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@@ -59,31 +60,23 @@
|
||||
--color-border-300: 212, 212, 212; /* strong border- 1 */
|
||||
--color-border-400: 185, 185, 185; /* strong border- 2 */
|
||||
|
||||
--color-shadow-2xs:
|
||||
0px 0px 1px 0px rgba(23, 23, 23, 0.06), 0px 1px 2px 0px rgba(23, 23, 23, 0.06),
|
||||
--color-shadow-2xs: 0px 0px 1px 0px rgba(23, 23, 23, 0.06), 0px 1px 2px 0px rgba(23, 23, 23, 0.06),
|
||||
0px 1px 2px 0px rgba(23, 23, 23, 0.14);
|
||||
--color-shadow-xs:
|
||||
0px 1px 2px 0px rgba(0, 0, 0, 0.16), 0px 2px 4px 0px rgba(16, 24, 40, 0.12),
|
||||
--color-shadow-xs: 0px 1px 2px 0px rgba(0, 0, 0, 0.16), 0px 2px 4px 0px rgba(16, 24, 40, 0.12),
|
||||
0px 1px 8px -1px rgba(16, 24, 40, 0.1);
|
||||
--color-shadow-sm:
|
||||
0px 1px 4px 0px rgba(0, 0, 0, 0.01), 0px 4px 8px 0px rgba(0, 0, 0, 0.02), 0px 1px 12px 0px rgba(0, 0, 0, 0.12);
|
||||
--color-shadow-rg:
|
||||
0px 3px 6px 0px rgba(0, 0, 0, 0.1), 0px 4px 4px 0px rgba(16, 24, 40, 0.08),
|
||||
--color-shadow-sm: 0px 1px 4px 0px rgba(0, 0, 0, 0.01), 0px 4px 8px 0px rgba(0, 0, 0, 0.02),
|
||||
0px 1px 12px 0px rgba(0, 0, 0, 0.12);
|
||||
--color-shadow-rg: 0px 3px 6px 0px rgba(0, 0, 0, 0.1), 0px 4px 4px 0px rgba(16, 24, 40, 0.08),
|
||||
0px 1px 12px 0px rgba(16, 24, 40, 0.04);
|
||||
--color-shadow-md:
|
||||
0px 4px 8px 0px rgba(0, 0, 0, 0.12), 0px 6px 12px 0px rgba(16, 24, 40, 0.12),
|
||||
--color-shadow-md: 0px 4px 8px 0px rgba(0, 0, 0, 0.12), 0px 6px 12px 0px rgba(16, 24, 40, 0.12),
|
||||
0px 1px 16px 0px rgba(16, 24, 40, 0.12);
|
||||
--color-shadow-lg:
|
||||
0px 6px 12px 0px rgba(0, 0, 0, 0.12), 0px 8px 16px 0px rgba(0, 0, 0, 0.12),
|
||||
--color-shadow-lg: 0px 6px 12px 0px rgba(0, 0, 0, 0.12), 0px 8px 16px 0px rgba(0, 0, 0, 0.12),
|
||||
0px 1px 24px 0px rgba(16, 24, 40, 0.12);
|
||||
--color-shadow-xl:
|
||||
0px 0px 18px 0px rgba(0, 0, 0, 0.16), 0px 0px 24px 0px rgba(16, 24, 40, 0.16),
|
||||
--color-shadow-xl: 0px 0px 18px 0px rgba(0, 0, 0, 0.16), 0px 0px 24px 0px rgba(16, 24, 40, 0.16),
|
||||
0px 0px 52px 0px rgba(16, 24, 40, 0.16);
|
||||
--color-shadow-2xl:
|
||||
0px 8px 16px 0px rgba(0, 0, 0, 0.12), 0px 12px 24px 0px rgba(16, 24, 40, 0.12),
|
||||
--color-shadow-2xl: 0px 8px 16px 0px rgba(0, 0, 0, 0.12), 0px 12px 24px 0px rgba(16, 24, 40, 0.12),
|
||||
0px 1px 32px 0px rgba(16, 24, 40, 0.12);
|
||||
--color-shadow-3xl:
|
||||
0px 12px 24px 0px rgba(0, 0, 0, 0.12), 0px 16px 32px 0px rgba(0, 0, 0, 0.12),
|
||||
--color-shadow-3xl: 0px 12px 24px 0px rgba(0, 0, 0, 0.12), 0px 16px 32px 0px rgba(0, 0, 0, 0.12),
|
||||
0px 1px 48px 0px rgba(16, 24, 40, 0.12);
|
||||
--color-shadow-4xl: 0px 8px 40px 0px rgba(0, 0, 61, 0.05), 0px 12px 32px -16px rgba(0, 0, 0, 0.05);
|
||||
|
||||
@@ -3,16 +3,18 @@
|
||||
import { ReactNode } from "react";
|
||||
import { ThemeProvider, useTheme } from "next-themes";
|
||||
import { SWRConfig } from "swr";
|
||||
// plane imports
|
||||
// ui
|
||||
import { ADMIN_BASE_PATH, DEFAULT_SWR_CONFIG } from "@plane/constants";
|
||||
import { Toast } from "@plane/ui";
|
||||
import { resolveGeneralTheme } from "@plane/utils";
|
||||
// constants
|
||||
// helpers
|
||||
// lib
|
||||
import { InstanceProvider } from "@/lib/instance-provider";
|
||||
import { StoreProvider } from "@/lib/store-provider";
|
||||
import { UserProvider } from "@/lib/user-provider";
|
||||
// styles
|
||||
import "@/styles/globals.css";
|
||||
import "./globals.css";
|
||||
|
||||
const ToastWithTheme = () => {
|
||||
const { resolvedTheme } = useTheme();
|
||||
|
||||
+3
-4
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "admin",
|
||||
"description": "Admin UI for Plane",
|
||||
"version": "0.26.0",
|
||||
"version": "0.25.3",
|
||||
"license": "AGPL-3.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
@@ -17,11 +17,10 @@
|
||||
"@headlessui/react": "^1.7.19",
|
||||
"@plane/constants": "*",
|
||||
"@plane/hooks": "*",
|
||||
"@plane/propel": "*",
|
||||
"@plane/services": "*",
|
||||
"@plane/types": "*",
|
||||
"@plane/ui": "*",
|
||||
"@plane/utils": "*",
|
||||
"@plane/services": "*",
|
||||
"@tailwindcss/typography": "^0.5.9",
|
||||
"@types/lodash": "^4.17.0",
|
||||
"autoprefixer": "10.4.14",
|
||||
@@ -30,7 +29,7 @@
|
||||
"lucide-react": "^0.469.0",
|
||||
"mobx": "^6.12.0",
|
||||
"mobx-react": "^9.1.1",
|
||||
"next": "^14.2.28",
|
||||
"next": "^14.2.26",
|
||||
"next-themes": "^0.2.1",
|
||||
"postcss": "^8.4.38",
|
||||
"react": "^18.3.1",
|
||||
|
||||
@@ -1,2 +1,8 @@
|
||||
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||
module.exports = require("@plane/tailwind-config/postcss.config.js");
|
||||
module.exports = {
|
||||
plugins: {
|
||||
"postcss-import": {},
|
||||
"tailwindcss/nesting": {},
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
},
|
||||
};
|
||||
|
||||
+1
-2
@@ -6,8 +6,7 @@
|
||||
"paths": {
|
||||
"@/*": ["core/*"],
|
||||
"@/public/*": ["public/*"],
|
||||
"@/plane-admin/*": ["ce/*"],
|
||||
"@/styles/*": ["styles/*"]
|
||||
"@/plane-admin/*": ["ce/*"]
|
||||
}
|
||||
},
|
||||
"include": ["next-env.d.ts", "next.config.js", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
||||
|
||||
+7
-16
@@ -1,7 +1,7 @@
|
||||
# Backend
|
||||
# Debug value for api server use it as 0 for production use
|
||||
DEBUG=0
|
||||
CORS_ALLOWED_ORIGINS="http://localhost:3000,http://localhost:3001,http://localhost:3002,http://localhost:3100"
|
||||
CORS_ALLOWED_ORIGINS="http://localhost"
|
||||
|
||||
# Database Settings
|
||||
POSTGRES_USER="plane"
|
||||
@@ -27,7 +27,7 @@ RABBITMQ_VHOST="plane"
|
||||
AWS_REGION=""
|
||||
AWS_ACCESS_KEY_ID="access-key"
|
||||
AWS_SECRET_ACCESS_KEY="secret-key"
|
||||
AWS_S3_ENDPOINT_URL="http://localhost:9000"
|
||||
AWS_S3_ENDPOINT_URL="http://plane-minio:9000"
|
||||
# Changing this requires change in the nginx.conf for uploads if using minio setup
|
||||
AWS_S3_BUCKET_NAME="uploads"
|
||||
# Maximum file upload limit
|
||||
@@ -37,31 +37,22 @@ FILE_SIZE_LIMIT=5242880
|
||||
DOCKERIZED=1 # deprecated
|
||||
|
||||
# set to 1 If using the pre-configured minio setup
|
||||
USE_MINIO=0
|
||||
USE_MINIO=1
|
||||
|
||||
# Nginx Configuration
|
||||
NGINX_PORT=80
|
||||
|
||||
# Email redirections and minio domain settings
|
||||
WEB_URL="http://localhost:8000"
|
||||
WEB_URL="http://localhost"
|
||||
|
||||
# Gunicorn Workers
|
||||
GUNICORN_WORKERS=2
|
||||
|
||||
# Base URLs
|
||||
ADMIN_BASE_URL="http://localhost:3001"
|
||||
ADMIN_BASE_PATH="/god-mode"
|
||||
ADMIN_BASE_URL=
|
||||
SPACE_BASE_URL=
|
||||
APP_BASE_URL=
|
||||
|
||||
SPACE_BASE_URL="http://localhost:3002"
|
||||
SPACE_BASE_PATH="/spaces"
|
||||
|
||||
APP_BASE_URL="http://localhost:3000"
|
||||
APP_BASE_PATH=""
|
||||
|
||||
LIVE_BASE_URL="http://localhost:3100"
|
||||
LIVE_BASE_PATH="/live"
|
||||
|
||||
LIVE_SERVER_SECRET_KEY="secret-key"
|
||||
|
||||
# Hard delete files after days
|
||||
HARD_DELETE_AFTER_DAYS=60
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "plane-api",
|
||||
"version": "0.26.0",
|
||||
"version": "0.25.3",
|
||||
"license": "AGPL-3.0",
|
||||
"private": true,
|
||||
"description": "API server powering Plane's backend"
|
||||
|
||||
@@ -48,6 +48,11 @@ class CycleSerializer(BaseSerializer):
|
||||
if not project_id:
|
||||
raise serializers.ValidationError("Project ID is required")
|
||||
|
||||
is_start_date_end_date_equal = (
|
||||
True
|
||||
if str(data.get("start_date")) == str(data.get("end_date"))
|
||||
else False
|
||||
)
|
||||
data["start_date"] = convert_to_utc(
|
||||
date=str(data.get("start_date").date()),
|
||||
project_id=project_id,
|
||||
@@ -56,6 +61,7 @@ class CycleSerializer(BaseSerializer):
|
||||
data["end_date"] = convert_to_utc(
|
||||
date=str(data.get("end_date", None).date()),
|
||||
project_id=project_id,
|
||||
is_start_date_end_date_equal=is_start_date_end_date_equal,
|
||||
)
|
||||
return data
|
||||
|
||||
|
||||
@@ -788,7 +788,6 @@ class TransferCycleIssueAPIEndpoint(BaseAPIView):
|
||||
issue_cycle__issue__archived_at__isnull=True,
|
||||
issue_cycle__issue__is_draft=False,
|
||||
issue_cycle__deleted_at__isnull=True,
|
||||
issue_cycle__issue__deleted_at__isnull=True,
|
||||
),
|
||||
)
|
||||
)
|
||||
@@ -800,7 +799,6 @@ class TransferCycleIssueAPIEndpoint(BaseAPIView):
|
||||
issue_cycle__issue__archived_at__isnull=True,
|
||||
issue_cycle__issue__is_draft=False,
|
||||
issue_cycle__deleted_at__isnull=True,
|
||||
issue_cycle__issue__deleted_at__isnull=True,
|
||||
),
|
||||
)
|
||||
)
|
||||
@@ -849,7 +847,6 @@ class TransferCycleIssueAPIEndpoint(BaseAPIView):
|
||||
)
|
||||
)
|
||||
)
|
||||
old_cycle = old_cycle.first()
|
||||
|
||||
estimate_type = Project.objects.filter(
|
||||
workspace__slug=slug,
|
||||
@@ -969,7 +966,7 @@ class TransferCycleIssueAPIEndpoint(BaseAPIView):
|
||||
)
|
||||
|
||||
estimate_completion_chart = burndown_plot(
|
||||
queryset=old_cycle,
|
||||
queryset=old_cycle.first(),
|
||||
slug=slug,
|
||||
project_id=project_id,
|
||||
plot_type="points",
|
||||
@@ -1117,7 +1114,7 @@ class TransferCycleIssueAPIEndpoint(BaseAPIView):
|
||||
|
||||
# Pass the new_cycle queryset to burndown_plot
|
||||
completion_chart = burndown_plot(
|
||||
queryset=old_cycle,
|
||||
queryset=old_cycle.first(),
|
||||
slug=slug,
|
||||
project_id=project_id,
|
||||
plot_type="issues",
|
||||
@@ -1129,12 +1126,12 @@ class TransferCycleIssueAPIEndpoint(BaseAPIView):
|
||||
).first()
|
||||
|
||||
current_cycle.progress_snapshot = {
|
||||
"total_issues": old_cycle.total_issues,
|
||||
"completed_issues": old_cycle.completed_issues,
|
||||
"cancelled_issues": old_cycle.cancelled_issues,
|
||||
"started_issues": old_cycle.started_issues,
|
||||
"unstarted_issues": old_cycle.unstarted_issues,
|
||||
"backlog_issues": old_cycle.backlog_issues,
|
||||
"total_issues": old_cycle.first().total_issues,
|
||||
"completed_issues": old_cycle.first().completed_issues,
|
||||
"cancelled_issues": old_cycle.first().cancelled_issues,
|
||||
"started_issues": old_cycle.first().started_issues,
|
||||
"unstarted_issues": old_cycle.first().unstarted_issues,
|
||||
"backlog_issues": old_cycle.first().backlog_issues,
|
||||
"distribution": {
|
||||
"labels": label_distribution_data,
|
||||
"assignees": assignee_distribution_data,
|
||||
|
||||
@@ -20,7 +20,6 @@ from plane.bgtasks.issue_activities_task import issue_activity
|
||||
from plane.db.models import Intake, IntakeIssue, Issue, Project, ProjectMember, State
|
||||
from plane.utils.host import base_host
|
||||
from .base import BaseAPIView
|
||||
from plane.db.models.intake import SourceType
|
||||
|
||||
|
||||
class IntakeIssueAPIEndpoint(BaseAPIView):
|
||||
@@ -126,7 +125,7 @@ class IntakeIssueAPIEndpoint(BaseAPIView):
|
||||
intake_id=intake.id,
|
||||
project_id=project_id,
|
||||
issue=issue,
|
||||
source=SourceType.IN_APP,
|
||||
source=request.data.get("source", "IN-APP"),
|
||||
)
|
||||
# Create an Issue Activity
|
||||
issue_activity.delay(
|
||||
|
||||
@@ -172,14 +172,14 @@ class ProjectAPIEndpoint(BaseAPIView):
|
||||
states = [
|
||||
{
|
||||
"name": "Backlog",
|
||||
"color": "#60646C",
|
||||
"color": "#A3A3A3",
|
||||
"sequence": 15000,
|
||||
"group": "backlog",
|
||||
"default": True,
|
||||
},
|
||||
{
|
||||
"name": "Todo",
|
||||
"color": "#60646C",
|
||||
"color": "#3A3A3A",
|
||||
"sequence": 25000,
|
||||
"group": "unstarted",
|
||||
},
|
||||
@@ -191,13 +191,13 @@ class ProjectAPIEndpoint(BaseAPIView):
|
||||
},
|
||||
{
|
||||
"name": "Done",
|
||||
"color": "#46A758",
|
||||
"color": "#16A34A",
|
||||
"sequence": 45000,
|
||||
"group": "completed",
|
||||
},
|
||||
{
|
||||
"name": "Cancelled",
|
||||
"color": "#9AA4BC",
|
||||
"color": "#EF4444",
|
||||
"sequence": 55000,
|
||||
"group": "cancelled",
|
||||
},
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
from .base import BaseSerializer
|
||||
from plane.db.models import APIToken, APIActivityLog
|
||||
from rest_framework import serializers
|
||||
from django.utils import timezone
|
||||
|
||||
|
||||
class APITokenSerializer(BaseSerializer):
|
||||
@@ -19,17 +17,10 @@ class APITokenSerializer(BaseSerializer):
|
||||
|
||||
|
||||
class APITokenReadSerializer(BaseSerializer):
|
||||
is_active = serializers.SerializerMethodField()
|
||||
|
||||
class Meta:
|
||||
model = APIToken
|
||||
exclude = ("token",)
|
||||
|
||||
def get_is_active(self, obj: APIToken) -> bool:
|
||||
if obj.expired_at is None:
|
||||
return True
|
||||
return timezone.now() < obj.expired_at
|
||||
|
||||
|
||||
class APIActivityLogSerializer(BaseSerializer):
|
||||
class Meta:
|
||||
|
||||
@@ -25,6 +25,11 @@ class CycleWriteSerializer(BaseSerializer):
|
||||
or (self.instance and self.instance.project_id)
|
||||
or self.context.get("project_id", None)
|
||||
)
|
||||
is_start_date_end_date_equal = (
|
||||
True
|
||||
if str(data.get("start_date")) == str(data.get("end_date"))
|
||||
else False
|
||||
)
|
||||
data["start_date"] = convert_to_utc(
|
||||
date=str(data.get("start_date").date()),
|
||||
project_id=project_id,
|
||||
@@ -33,6 +38,7 @@ class CycleWriteSerializer(BaseSerializer):
|
||||
data["end_date"] = convert_to_utc(
|
||||
date=str(data.get("end_date", None).date()),
|
||||
project_id=project_id,
|
||||
is_start_date_end_date_equal=is_start_date_end_date_equal,
|
||||
)
|
||||
return data
|
||||
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
# Module imports
|
||||
from .base import BaseSerializer
|
||||
from rest_framework import serializers
|
||||
|
||||
|
||||
from plane.db.models import State
|
||||
|
||||
|
||||
class StateSerializer(BaseSerializer):
|
||||
order = serializers.FloatField(required=False)
|
||||
|
||||
class Meta:
|
||||
model = State
|
||||
fields = [
|
||||
@@ -20,7 +18,6 @@ class StateSerializer(BaseSerializer):
|
||||
"default",
|
||||
"description",
|
||||
"sequence",
|
||||
"order",
|
||||
]
|
||||
read_only_fields = ["workspace", "project"]
|
||||
|
||||
|
||||
@@ -9,11 +9,11 @@ from rest_framework import status
|
||||
from .base import BaseAPIView
|
||||
from plane.db.models import APIToken, Workspace
|
||||
from plane.app.serializers import APITokenSerializer, APITokenReadSerializer
|
||||
from plane.app.permissions import WorkspaceEntityPermission
|
||||
from plane.app.permissions import WorkspaceOwnerPermission
|
||||
|
||||
|
||||
class ApiTokenEndpoint(BaseAPIView):
|
||||
permission_classes = [WorkspaceEntityPermission]
|
||||
permission_classes = [WorkspaceOwnerPermission]
|
||||
|
||||
def post(self, request, slug):
|
||||
label = request.data.get("label", str(uuid4().hex))
|
||||
@@ -68,7 +68,7 @@ class ApiTokenEndpoint(BaseAPIView):
|
||||
|
||||
|
||||
class ServiceApiTokenEndpoint(BaseAPIView):
|
||||
permission_classes = [WorkspaceEntityPermission]
|
||||
permission_classes = [WorkspaceOwnerPermission]
|
||||
|
||||
def post(self, request, slug):
|
||||
workspace = Workspace.objects.get(slug=slug)
|
||||
|
||||
@@ -137,7 +137,7 @@ class UserAssetsV2Endpoint(BaseAPIView):
|
||||
if type not in allowed_types:
|
||||
return Response(
|
||||
{
|
||||
"error": "Invalid file type. Only JPEG, PNG, WebP, JPG and GIF files are allowed.",
|
||||
"error": "Invalid file type. Only JPEG and PNG files are allowed.",
|
||||
"status": False,
|
||||
},
|
||||
status=status.HTTP_400_BAD_REQUEST,
|
||||
@@ -351,7 +351,7 @@ class WorkspaceFileAssetEndpoint(BaseAPIView):
|
||||
if type not in allowed_types:
|
||||
return Response(
|
||||
{
|
||||
"error": "Invalid file type. Only JPEG, PNG, WebP, JPG and GIF files are allowed.",
|
||||
"error": "Invalid file type. Only JPEG and PNG files are allowed.",
|
||||
"status": False,
|
||||
},
|
||||
status=status.HTTP_400_BAD_REQUEST,
|
||||
@@ -552,7 +552,7 @@ class ProjectAssetEndpoint(BaseAPIView):
|
||||
if type not in allowed_types:
|
||||
return Response(
|
||||
{
|
||||
"error": "Invalid file type. Only JPEG, PNG, WebP, JPG and GIF files are allowed.",
|
||||
"error": "Invalid file type. Only JPEG and PNG files are allowed.",
|
||||
"status": False,
|
||||
},
|
||||
status=status.HTTP_400_BAD_REQUEST,
|
||||
@@ -683,7 +683,7 @@ class ProjectBulkAssetEndpoint(BaseAPIView):
|
||||
# For some cases, the bulk api is called after the issue is deleted creating
|
||||
# an integrity error
|
||||
try:
|
||||
assets.update(issue_id=entity_id, project_id=project_id)
|
||||
assets.update(issue_id=entity_id)
|
||||
except IntegrityError:
|
||||
pass
|
||||
|
||||
|
||||
@@ -117,7 +117,6 @@ class CycleViewSet(BaseViewSet):
|
||||
issue_cycle__issue__archived_at__isnull=True,
|
||||
issue_cycle__issue__is_draft=False,
|
||||
issue_cycle__deleted_at__isnull=True,
|
||||
issue_cycle__issue__deleted_at__isnull=True,
|
||||
),
|
||||
)
|
||||
)
|
||||
@@ -130,7 +129,6 @@ class CycleViewSet(BaseViewSet):
|
||||
issue_cycle__issue__archived_at__isnull=True,
|
||||
issue_cycle__issue__is_draft=False,
|
||||
issue_cycle__deleted_at__isnull=True,
|
||||
issue_cycle__issue__deleted_at__isnull=True,
|
||||
),
|
||||
)
|
||||
)
|
||||
@@ -143,7 +141,6 @@ class CycleViewSet(BaseViewSet):
|
||||
issue_cycle__issue__archived_at__isnull=True,
|
||||
issue_cycle__issue__is_draft=False,
|
||||
issue_cycle__deleted_at__isnull=True,
|
||||
issue_cycle__issue__deleted_at__isnull=True,
|
||||
),
|
||||
)
|
||||
)
|
||||
@@ -269,7 +266,9 @@ class CycleViewSet(BaseViewSet):
|
||||
"created_by",
|
||||
)
|
||||
datetime_fields = ["start_date", "end_date"]
|
||||
data = user_timezone_converter(data, datetime_fields, project_timezone)
|
||||
data = user_timezone_converter(
|
||||
data, datetime_fields, project_timezone
|
||||
)
|
||||
return Response(data, status=status.HTTP_200_OK)
|
||||
|
||||
@allow_permission([ROLE.ADMIN, ROLE.MEMBER])
|
||||
@@ -416,7 +415,9 @@ class CycleViewSet(BaseViewSet):
|
||||
project_timezone = project.timezone
|
||||
|
||||
datetime_fields = ["start_date", "end_date"]
|
||||
cycle = user_timezone_converter(cycle, datetime_fields, project_timezone)
|
||||
cycle = user_timezone_converter(
|
||||
cycle, datetime_fields, project_timezone
|
||||
)
|
||||
|
||||
# Send the model activity
|
||||
model_activity.delay(
|
||||
@@ -573,12 +574,16 @@ class CycleDateCheckEndpoint(BaseAPIView):
|
||||
status=status.HTTP_400_BAD_REQUEST,
|
||||
)
|
||||
|
||||
is_start_date_end_date_equal = (
|
||||
True if str(start_date) == str(end_date) else False
|
||||
)
|
||||
start_date = convert_to_utc(
|
||||
date=str(start_date), project_id=project_id, is_start_date=True
|
||||
)
|
||||
end_date = convert_to_utc(
|
||||
date=str(end_date),
|
||||
project_id=project_id,
|
||||
is_start_date_end_date_equal=is_start_date_end_date_equal,
|
||||
)
|
||||
|
||||
# Check if any cycle intersects in the given interval
|
||||
@@ -663,7 +668,6 @@ class TransferCycleIssueEndpoint(BaseAPIView):
|
||||
issue_cycle__issue__archived_at__isnull=True,
|
||||
issue_cycle__issue__is_draft=False,
|
||||
issue_cycle__deleted_at__isnull=True,
|
||||
issue_cycle__issue__deleted_at__isnull=True,
|
||||
),
|
||||
)
|
||||
)
|
||||
@@ -728,7 +732,6 @@ class TransferCycleIssueEndpoint(BaseAPIView):
|
||||
)
|
||||
)
|
||||
)
|
||||
old_cycle = old_cycle.first()
|
||||
|
||||
estimate_type = Project.objects.filter(
|
||||
workspace__slug=slug,
|
||||
@@ -847,7 +850,7 @@ class TransferCycleIssueEndpoint(BaseAPIView):
|
||||
)
|
||||
|
||||
estimate_completion_chart = burndown_plot(
|
||||
queryset=old_cycle,
|
||||
queryset=old_cycle.first(),
|
||||
slug=slug,
|
||||
project_id=project_id,
|
||||
plot_type="points",
|
||||
@@ -994,7 +997,7 @@ class TransferCycleIssueEndpoint(BaseAPIView):
|
||||
|
||||
# Pass the new_cycle queryset to burndown_plot
|
||||
completion_chart = burndown_plot(
|
||||
queryset=old_cycle,
|
||||
queryset=old_cycle.first(),
|
||||
slug=slug,
|
||||
project_id=project_id,
|
||||
plot_type="issues",
|
||||
@@ -1006,12 +1009,12 @@ class TransferCycleIssueEndpoint(BaseAPIView):
|
||||
).first()
|
||||
|
||||
current_cycle.progress_snapshot = {
|
||||
"total_issues": old_cycle.total_issues,
|
||||
"completed_issues": old_cycle.completed_issues,
|
||||
"cancelled_issues": old_cycle.cancelled_issues,
|
||||
"started_issues": old_cycle.started_issues,
|
||||
"unstarted_issues": old_cycle.unstarted_issues,
|
||||
"backlog_issues": old_cycle.backlog_issues,
|
||||
"total_issues": old_cycle.first().total_issues,
|
||||
"completed_issues": old_cycle.first().completed_issues,
|
||||
"cancelled_issues": old_cycle.first().cancelled_issues,
|
||||
"started_issues": old_cycle.first().started_issues,
|
||||
"unstarted_issues": old_cycle.first().unstarted_issues,
|
||||
"backlog_issues": old_cycle.first().backlog_issues,
|
||||
"distribution": {
|
||||
"labels": label_distribution_data,
|
||||
"assignees": assignee_distribution_data,
|
||||
@@ -1119,14 +1122,6 @@ class CycleUserPropertiesEndpoint(BaseAPIView):
|
||||
class CycleProgressEndpoint(BaseAPIView):
|
||||
@allow_permission([ROLE.ADMIN, ROLE.MEMBER, ROLE.GUEST])
|
||||
def get(self, request, slug, project_id, cycle_id):
|
||||
|
||||
cycle = Cycle.objects.filter(
|
||||
workspace__slug=slug, project_id=project_id, id=cycle_id
|
||||
).first()
|
||||
if not cycle:
|
||||
return Response(
|
||||
{"error": "Cycle not found"}, status=status.HTTP_404_NOT_FOUND
|
||||
)
|
||||
aggregate_estimates = (
|
||||
Issue.issue_objects.filter(
|
||||
estimate_point__estimate__type="points",
|
||||
@@ -1177,60 +1172,53 @@ class CycleProgressEndpoint(BaseAPIView):
|
||||
),
|
||||
)
|
||||
)
|
||||
if cycle.progress_snapshot:
|
||||
backlog_issues = cycle.progress_snapshot.get("backlog_issues", 0)
|
||||
unstarted_issues = cycle.progress_snapshot.get("unstarted_issues", 0)
|
||||
started_issues = cycle.progress_snapshot.get("started_issues", 0)
|
||||
cancelled_issues = cycle.progress_snapshot.get("cancelled_issues", 0)
|
||||
completed_issues = cycle.progress_snapshot.get("completed_issues", 0)
|
||||
total_issues = cycle.progress_snapshot.get("total_issues", 0)
|
||||
else:
|
||||
backlog_issues = Issue.issue_objects.filter(
|
||||
issue_cycle__cycle_id=cycle_id,
|
||||
issue_cycle__deleted_at__isnull=True,
|
||||
workspace__slug=slug,
|
||||
project_id=project_id,
|
||||
state__group="backlog",
|
||||
).count()
|
||||
|
||||
unstarted_issues = Issue.issue_objects.filter(
|
||||
issue_cycle__cycle_id=cycle_id,
|
||||
issue_cycle__deleted_at__isnull=True,
|
||||
workspace__slug=slug,
|
||||
project_id=project_id,
|
||||
state__group="unstarted",
|
||||
).count()
|
||||
backlog_issues = Issue.issue_objects.filter(
|
||||
issue_cycle__cycle_id=cycle_id,
|
||||
issue_cycle__deleted_at__isnull=True,
|
||||
workspace__slug=slug,
|
||||
project_id=project_id,
|
||||
state__group="backlog",
|
||||
).count()
|
||||
|
||||
started_issues = Issue.issue_objects.filter(
|
||||
issue_cycle__cycle_id=cycle_id,
|
||||
issue_cycle__deleted_at__isnull=True,
|
||||
workspace__slug=slug,
|
||||
project_id=project_id,
|
||||
state__group="started",
|
||||
).count()
|
||||
unstarted_issues = Issue.issue_objects.filter(
|
||||
issue_cycle__cycle_id=cycle_id,
|
||||
issue_cycle__deleted_at__isnull=True,
|
||||
workspace__slug=slug,
|
||||
project_id=project_id,
|
||||
state__group="unstarted",
|
||||
).count()
|
||||
|
||||
cancelled_issues = Issue.issue_objects.filter(
|
||||
issue_cycle__cycle_id=cycle_id,
|
||||
issue_cycle__deleted_at__isnull=True,
|
||||
workspace__slug=slug,
|
||||
project_id=project_id,
|
||||
state__group="cancelled",
|
||||
).count()
|
||||
started_issues = Issue.issue_objects.filter(
|
||||
issue_cycle__cycle_id=cycle_id,
|
||||
issue_cycle__deleted_at__isnull=True,
|
||||
workspace__slug=slug,
|
||||
project_id=project_id,
|
||||
state__group="started",
|
||||
).count()
|
||||
|
||||
completed_issues = Issue.issue_objects.filter(
|
||||
issue_cycle__cycle_id=cycle_id,
|
||||
issue_cycle__deleted_at__isnull=True,
|
||||
workspace__slug=slug,
|
||||
project_id=project_id,
|
||||
state__group="completed",
|
||||
).count()
|
||||
cancelled_issues = Issue.issue_objects.filter(
|
||||
issue_cycle__cycle_id=cycle_id,
|
||||
issue_cycle__deleted_at__isnull=True,
|
||||
workspace__slug=slug,
|
||||
project_id=project_id,
|
||||
state__group="cancelled",
|
||||
).count()
|
||||
|
||||
total_issues = Issue.issue_objects.filter(
|
||||
issue_cycle__cycle_id=cycle_id,
|
||||
issue_cycle__deleted_at__isnull=True,
|
||||
workspace__slug=slug,
|
||||
project_id=project_id,
|
||||
).count()
|
||||
completed_issues = Issue.issue_objects.filter(
|
||||
issue_cycle__cycle_id=cycle_id,
|
||||
issue_cycle__deleted_at__isnull=True,
|
||||
workspace__slug=slug,
|
||||
project_id=project_id,
|
||||
state__group="completed",
|
||||
).count()
|
||||
|
||||
total_issues = Issue.issue_objects.filter(
|
||||
issue_cycle__cycle_id=cycle_id,
|
||||
issue_cycle__deleted_at__isnull=True,
|
||||
workspace__slug=slug,
|
||||
project_id=project_id,
|
||||
).count()
|
||||
|
||||
return Response(
|
||||
{
|
||||
@@ -1291,25 +1279,6 @@ class CycleAnalyticsEndpoint(BaseAPIView):
|
||||
status=status.HTTP_400_BAD_REQUEST,
|
||||
)
|
||||
|
||||
# this will tell whether the issues were transferred to the new cycle
|
||||
"""
|
||||
if the issues were transferred to the new cycle, then the progress_snapshot will be present
|
||||
return the progress_snapshot data in the analytics for each date
|
||||
|
||||
else issues were not transferred to the new cycle then generate the stats from the cycle isssue bridge tables
|
||||
"""
|
||||
|
||||
if cycle.progress_snapshot:
|
||||
distribution = cycle.progress_snapshot.get("distribution", {})
|
||||
return Response(
|
||||
{
|
||||
"labels": distribution.get("labels", []),
|
||||
"assignees": distribution.get("assignees", []),
|
||||
"completion_chart": distribution.get("completion_chart", {}),
|
||||
},
|
||||
status=status.HTTP_200_OK,
|
||||
)
|
||||
|
||||
estimate_type = Project.objects.filter(
|
||||
workspace__slug=slug,
|
||||
pk=project_id,
|
||||
|
||||
@@ -44,7 +44,6 @@ from plane.app.views.base import BaseAPIView
|
||||
from plane.utils.timezone_converter import user_timezone_converter
|
||||
from plane.utils.global_paginator import paginate
|
||||
from plane.utils.host import base_host
|
||||
from plane.db.models.intake import SourceType
|
||||
|
||||
|
||||
class IntakeViewSet(BaseViewSet):
|
||||
@@ -279,7 +278,7 @@ class IntakeIssueViewSet(BaseViewSet):
|
||||
intake_id=intake_id.id,
|
||||
project_id=project_id,
|
||||
issue_id=serializer.data["id"],
|
||||
source=SourceType.IN_APP,
|
||||
source=request.data.get("source", "IN-APP"),
|
||||
)
|
||||
# Create an Issue Activity
|
||||
issue_activity.delay(
|
||||
@@ -409,6 +408,7 @@ class IntakeIssueViewSet(BaseViewSet):
|
||||
)
|
||||
|
||||
if issue_serializer.is_valid():
|
||||
|
||||
# Log all the updates
|
||||
requested_data = json.dumps(issue_data, cls=DjangoJSONEncoder)
|
||||
if issue is not None:
|
||||
@@ -607,6 +607,7 @@ class IntakeIssueViewSet(BaseViewSet):
|
||||
|
||||
|
||||
class IntakeWorkItemDescriptionVersionEndpoint(BaseAPIView):
|
||||
|
||||
def process_paginated_result(self, fields, results, timezone):
|
||||
paginated_data = results.values(*fields)
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@ from plane.bgtasks.issue_activities_task import issue_activity
|
||||
from plane.utils.timezone_converter import user_timezone_converter
|
||||
from collections import defaultdict
|
||||
from plane.utils.host import base_host
|
||||
from plane.utils.order_queryset import order_issue_queryset
|
||||
|
||||
class SubIssuesEndpoint(BaseAPIView):
|
||||
permission_classes = [ProjectEntityPermission]
|
||||
@@ -103,15 +102,6 @@ class SubIssuesEndpoint(BaseAPIView):
|
||||
.order_by("-created_at")
|
||||
)
|
||||
|
||||
# Ordering
|
||||
order_by_param = request.GET.get("order_by", "-created_at")
|
||||
group_by = request.GET.get("group_by", False)
|
||||
|
||||
if order_by_param:
|
||||
sub_issues, order_by_param = order_issue_queryset(
|
||||
sub_issues, order_by_param
|
||||
)
|
||||
|
||||
# create's a dict with state group name with their respective issue id's
|
||||
result = defaultdict(list)
|
||||
for sub_issue in sub_issues:
|
||||
@@ -148,26 +138,6 @@ class SubIssuesEndpoint(BaseAPIView):
|
||||
sub_issues = user_timezone_converter(
|
||||
sub_issues, datetime_fields, request.user.user_timezone
|
||||
)
|
||||
# Grouping
|
||||
if group_by:
|
||||
result_dict = defaultdict(list)
|
||||
|
||||
for issue in sub_issues:
|
||||
if group_by == "assignees__ids":
|
||||
if issue["assignee_ids"]:
|
||||
assignee_ids = issue["assignee_ids"]
|
||||
for assignee_id in assignee_ids:
|
||||
result_dict[str(assignee_id)].append(issue)
|
||||
elif issue["assignee_ids"] == []:
|
||||
result_dict["None"].append(issue)
|
||||
|
||||
elif group_by:
|
||||
result_dict[str(issue[group_by])].append(issue)
|
||||
|
||||
return Response(
|
||||
{"sub_issues": result_dict, "state_distribution": result},
|
||||
status=status.HTTP_200_OK,
|
||||
)
|
||||
return Response(
|
||||
{"sub_issues": sub_issues, "state_distribution": result},
|
||||
status=status.HTTP_200_OK,
|
||||
|
||||
@@ -710,31 +710,23 @@ class ModuleViewSet(BaseViewSet):
|
||||
|
||||
@allow_permission([ROLE.ADMIN, ROLE.MEMBER])
|
||||
def partial_update(self, request, slug, project_id, pk):
|
||||
module_queryset = self.get_queryset().filter(pk=pk)
|
||||
module = self.get_queryset().filter(pk=pk)
|
||||
|
||||
current_module = module_queryset.first()
|
||||
|
||||
if not current_module:
|
||||
return Response(
|
||||
{"error": "Module not found"},
|
||||
status=status.HTTP_404_NOT_FOUND,
|
||||
)
|
||||
|
||||
if current_module.archived_at:
|
||||
if module.first().archived_at:
|
||||
return Response(
|
||||
{"error": "Archived module cannot be updated"},
|
||||
status=status.HTTP_400_BAD_REQUEST,
|
||||
)
|
||||
current_instance = json.dumps(
|
||||
ModuleSerializer(current_module).data, cls=DjangoJSONEncoder
|
||||
ModuleSerializer(module.first()).data, cls=DjangoJSONEncoder
|
||||
)
|
||||
serializer = ModuleWriteSerializer(
|
||||
current_module, data=request.data, partial=True
|
||||
module.first(), data=request.data, partial=True
|
||||
)
|
||||
|
||||
if serializer.is_valid():
|
||||
serializer.save()
|
||||
module = module_queryset.values(
|
||||
module = module.values(
|
||||
# Required fields
|
||||
"id",
|
||||
"workspace_id",
|
||||
|
||||
@@ -42,7 +42,6 @@ from plane.bgtasks.page_version_task import page_version
|
||||
from plane.bgtasks.recent_visited_task import recent_visited_task
|
||||
from plane.bgtasks.copy_s3_object import copy_s3_objects
|
||||
|
||||
|
||||
def unarchive_archive_page_and_descendants(page_id, archived_at):
|
||||
# Your SQL query
|
||||
sql = """
|
||||
@@ -199,7 +198,7 @@ class PageViewSet(BaseViewSet):
|
||||
project = Project.objects.get(pk=project_id)
|
||||
|
||||
"""
|
||||
if the role is guest and guest_view_all_features is false and owned by is not
|
||||
if the role is guest and guest_view_all_features is false and owned by is not
|
||||
the requesting user then dont show the page
|
||||
"""
|
||||
|
||||
@@ -573,12 +572,6 @@ class PageDuplicateEndpoint(BaseAPIView):
|
||||
pk=page_id, workspace__slug=slug, projects__id=project_id
|
||||
).first()
|
||||
|
||||
# check for permission
|
||||
if page.access == Page.PRIVATE_ACCESS and page.owned_by_id != request.user.id:
|
||||
return Response(
|
||||
{"error": "Permission denied"}, status=status.HTTP_403_FORBIDDEN
|
||||
)
|
||||
|
||||
# get all the project ids where page is present
|
||||
project_ids = ProjectPage.objects.filter(page_id=page_id).values_list(
|
||||
"project_id", flat=True
|
||||
|
||||
@@ -275,14 +275,14 @@ class ProjectViewSet(BaseViewSet):
|
||||
states = [
|
||||
{
|
||||
"name": "Backlog",
|
||||
"color": "#60646C",
|
||||
"color": "#A3A3A3",
|
||||
"sequence": 15000,
|
||||
"group": "backlog",
|
||||
"default": True,
|
||||
},
|
||||
{
|
||||
"name": "Todo",
|
||||
"color": "#60646C",
|
||||
"color": "#3A3A3A",
|
||||
"sequence": 25000,
|
||||
"group": "unstarted",
|
||||
},
|
||||
@@ -294,13 +294,13 @@ class ProjectViewSet(BaseViewSet):
|
||||
},
|
||||
{
|
||||
"name": "Done",
|
||||
"color": "#46A758",
|
||||
"color": "#16A34A",
|
||||
"sequence": 45000,
|
||||
"group": "completed",
|
||||
},
|
||||
{
|
||||
"name": "Cancelled",
|
||||
"color": "#9AA4BC",
|
||||
"color": "#EF4444",
|
||||
"sequence": 55000,
|
||||
"group": "cancelled",
|
||||
},
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# Python imports
|
||||
from itertools import groupby
|
||||
from collections import defaultdict
|
||||
|
||||
# Django imports
|
||||
from django.db.utils import IntegrityError
|
||||
@@ -75,19 +74,7 @@ class StateViewSet(BaseViewSet):
|
||||
@allow_permission([ROLE.ADMIN, ROLE.MEMBER, ROLE.GUEST])
|
||||
def list(self, request, slug, project_id):
|
||||
states = StateSerializer(self.get_queryset(), many=True).data
|
||||
|
||||
grouped_states = defaultdict(list)
|
||||
for state in states:
|
||||
grouped_states[state["group"]].append(state)
|
||||
|
||||
for group, group_states in grouped_states.items():
|
||||
count = len(group_states)
|
||||
|
||||
for index, state in enumerate(group_states, start=1):
|
||||
state["order"] = index / count
|
||||
|
||||
grouped = request.GET.get("grouped", False)
|
||||
|
||||
if grouped == "true":
|
||||
state_dict = {}
|
||||
for key, value in groupby(
|
||||
@@ -96,7 +83,6 @@ class StateViewSet(BaseViewSet):
|
||||
):
|
||||
state_dict[str(key)] = list(value)
|
||||
return Response(state_dict, status=status.HTTP_200_OK)
|
||||
|
||||
return Response(states, status=status.HTTP_200_OK)
|
||||
|
||||
@invalidate_cache(path="workspaces/:slug/states/", url_params=True, user=False)
|
||||
|
||||
@@ -42,7 +42,6 @@ from django.views.decorators.cache import cache_control
|
||||
from django.views.decorators.vary import vary_on_cookie
|
||||
from plane.utils.constants import RESTRICTED_WORKSPACE_SLUGS
|
||||
from plane.license.utils.instance_value import get_configuration_value
|
||||
from plane.bgtasks.workspace_seed_task import workspace_seed
|
||||
|
||||
|
||||
class WorkSpaceViewSet(BaseViewSet):
|
||||
@@ -127,8 +126,6 @@ class WorkSpaceViewSet(BaseViewSet):
|
||||
data["total_members"] = total_members
|
||||
data["role"] = 20
|
||||
|
||||
workspace_seed.delay(serializer.data["id"])
|
||||
|
||||
return Response(data, status=status.HTTP_201_CREATED)
|
||||
return Response(
|
||||
[serializer.errors[error][0] for error in serializer.errors],
|
||||
|
||||
@@ -29,7 +29,6 @@ class WorkspaceCyclesEndpoint(BaseAPIView):
|
||||
issue_cycle__issue__archived_at__isnull=True,
|
||||
issue_cycle__issue__is_draft=False,
|
||||
issue_cycle__deleted_at__isnull=True,
|
||||
issue_cycle__issue__deleted_at__isnull=True,
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
@@ -8,7 +8,6 @@ from plane.app.views.base import BaseAPIView
|
||||
from plane.db.models import State
|
||||
from plane.app.permissions import WorkspaceEntityPermission
|
||||
from plane.utils.cache import cache_response
|
||||
from collections import defaultdict
|
||||
|
||||
|
||||
class WorkspaceStatesEndpoint(BaseAPIView):
|
||||
@@ -23,16 +22,5 @@ class WorkspaceStatesEndpoint(BaseAPIView):
|
||||
project__archived_at__isnull=True,
|
||||
is_triage=False,
|
||||
)
|
||||
|
||||
grouped_states = defaultdict(list)
|
||||
for state in states:
|
||||
grouped_states[state.group].append(state)
|
||||
|
||||
for group, group_states in grouped_states.items():
|
||||
count = len(group_states)
|
||||
|
||||
for index, state in enumerate(group_states, start=1):
|
||||
state.order = index / count
|
||||
|
||||
serializer = StateSerializer(states, many=True).data
|
||||
return Response(serializer, status=status.HTTP_200_OK)
|
||||
|
||||
@@ -1,49 +1,30 @@
|
||||
# Django imports
|
||||
from django.conf import settings
|
||||
from django.http import HttpRequest
|
||||
|
||||
# Third party imports
|
||||
from rest_framework.request import Request
|
||||
|
||||
# Module imports
|
||||
from plane.utils.ip_address import get_client_ip
|
||||
|
||||
|
||||
def base_host(
|
||||
request: Request | HttpRequest,
|
||||
is_admin: bool = False,
|
||||
is_space: bool = False,
|
||||
is_app: bool = False,
|
||||
) -> str:
|
||||
def base_host(request: Request | HttpRequest, is_admin: bool = False, is_space: bool = False, is_app: bool = False) -> str:
|
||||
"""Utility function to return host / origin from the request"""
|
||||
# Calculate the base origin from request
|
||||
base_origin = settings.WEB_URL or settings.APP_BASE_URL
|
||||
|
||||
# Admin redirection
|
||||
# Admin redirections
|
||||
if is_admin:
|
||||
admin_base_path = getattr(settings, "ADMIN_BASE_PATH", "/god-mode/")
|
||||
if not admin_base_path.startswith("/"):
|
||||
admin_base_path = "/" + admin_base_path
|
||||
if not admin_base_path.endswith("/"):
|
||||
admin_base_path += "/"
|
||||
|
||||
if settings.ADMIN_BASE_URL:
|
||||
return settings.ADMIN_BASE_URL + admin_base_path
|
||||
return settings.ADMIN_BASE_URL
|
||||
else:
|
||||
return base_origin + admin_base_path
|
||||
return base_origin + "/god-mode/"
|
||||
|
||||
# Space redirection
|
||||
# Space redirections
|
||||
if is_space:
|
||||
space_base_path = getattr(settings, "SPACE_BASE_PATH", "/spaces/")
|
||||
if not space_base_path.startswith("/"):
|
||||
space_base_path = "/" + space_base_path
|
||||
if not space_base_path.endswith("/"):
|
||||
space_base_path += "/"
|
||||
|
||||
if settings.SPACE_BASE_URL:
|
||||
return settings.SPACE_BASE_URL + space_base_path
|
||||
return settings.SPACE_BASE_URL
|
||||
else:
|
||||
return base_origin + space_base_path
|
||||
return base_origin + "/spaces/"
|
||||
|
||||
# App Redirection
|
||||
if is_app:
|
||||
|
||||
@@ -459,7 +459,7 @@ def analytic_export_task(email, data, slug):
|
||||
|
||||
csv_buffer = generate_csv_from_rows(rows)
|
||||
send_export_email(email, slug, csv_buffer, rows)
|
||||
logging.getLogger("plane.worker").info("Email sent successfully.")
|
||||
logging.getLogger("plane").info("Email sent succesfully.")
|
||||
return
|
||||
except Exception as e:
|
||||
log_exception(e)
|
||||
|
||||
@@ -12,7 +12,6 @@ from plane.db.models import FileAsset, Page, Issue
|
||||
from plane.utils.exception_logger import log_exception
|
||||
from plane.settings.storage import S3Storage
|
||||
from celery import shared_task
|
||||
from plane.utils.url import normalize_url_path
|
||||
|
||||
|
||||
def get_entity_id_field(entity_type, entity_id):
|
||||
@@ -68,14 +67,11 @@ def sync_with_external_service(entity_name, description_html):
|
||||
"description_html": description_html,
|
||||
"variant": "rich" if entity_name == "PAGE" else "document",
|
||||
}
|
||||
|
||||
live_url = settings.LIVE_URL
|
||||
if not live_url:
|
||||
return {}
|
||||
|
||||
url = normalize_url_path(f"{live_url}/convert-document/")
|
||||
|
||||
response = requests.post(url, json=data, headers=None)
|
||||
response = requests.post(
|
||||
f"{settings.LIVE_BASE_URL}/convert-document/",
|
||||
json=data,
|
||||
headers=None,
|
||||
)
|
||||
if response.status_code == 200:
|
||||
return response.json()
|
||||
except requests.RequestException as e:
|
||||
|
||||
@@ -33,7 +33,6 @@ from plane.db.models import (
|
||||
Intake,
|
||||
IntakeIssue,
|
||||
)
|
||||
from plane.db.models.intake import SourceType
|
||||
|
||||
|
||||
def create_project(workspace, user_id):
|
||||
@@ -389,7 +388,7 @@ def create_intake_issues(workspace, project, user_id, intake_issue_count):
|
||||
if status == 0
|
||||
else None
|
||||
),
|
||||
source=SourceType.IN_APP,
|
||||
source="in-app",
|
||||
workspace=workspace,
|
||||
project=project,
|
||||
)
|
||||
|
||||
@@ -309,7 +309,7 @@ def send_email_notification(
|
||||
)
|
||||
msg.attach_alternative(html_content, "text/html")
|
||||
msg.send()
|
||||
logging.getLogger("plane.worker").info("Email Sent Successfully")
|
||||
logging.getLogger("plane").info("Email Sent Successfully")
|
||||
|
||||
# Update the logs
|
||||
EmailNotificationLog.objects.filter(
|
||||
@@ -325,7 +325,7 @@ def send_email_notification(
|
||||
release_lock(lock_id=lock_id)
|
||||
return
|
||||
else:
|
||||
logging.getLogger("plane.worker").info("Duplicate email received skipping")
|
||||
logging.getLogger("plane").info("Duplicate email received skipping")
|
||||
return
|
||||
except (Issue.DoesNotExist, User.DoesNotExist):
|
||||
release_lock(lock_id=lock_id)
|
||||
|
||||
@@ -63,7 +63,7 @@ def forgot_password(first_name, email, uidb64, token, current_site):
|
||||
)
|
||||
msg.attach_alternative(html_content, "text/html")
|
||||
msg.send()
|
||||
logging.getLogger("plane.worker").info("Email sent successfully")
|
||||
logging.getLogger("plane").info("Email sent successfully")
|
||||
return
|
||||
except Exception as e:
|
||||
log_exception(e)
|
||||
|
||||
@@ -482,7 +482,7 @@ def track_estimate_points(
|
||||
),
|
||||
old_value=old_estimate.value if old_estimate else None,
|
||||
new_value=new_estimate.value if new_estimate else None,
|
||||
field="estimate_" + new_estimate.estimate.type,
|
||||
field="estimate_point",
|
||||
project_id=project_id,
|
||||
workspace_id=workspace_id,
|
||||
comment="updated the estimate point to ",
|
||||
@@ -1650,6 +1650,40 @@ def issue_activity(
|
||||
|
||||
# Save all the values to database
|
||||
issue_activities_created = IssueActivity.objects.bulk_create(issue_activities)
|
||||
# Post the updates to segway for integrations and webhooks
|
||||
if len(issue_activities_created):
|
||||
for activity in issue_activities_created:
|
||||
webhook_activity.delay(
|
||||
event=(
|
||||
"issue_comment"
|
||||
if activity.field == "comment"
|
||||
else "intake_issue"
|
||||
if intake
|
||||
else "issue"
|
||||
),
|
||||
event_id=(
|
||||
activity.issue_comment_id
|
||||
if activity.field == "comment"
|
||||
else intake
|
||||
if intake
|
||||
else activity.issue_id
|
||||
),
|
||||
verb=activity.verb,
|
||||
field=(
|
||||
"description" if activity.field == "comment" else activity.field
|
||||
),
|
||||
old_value=(
|
||||
activity.old_value if activity.old_value != "" else None
|
||||
),
|
||||
new_value=(
|
||||
activity.new_value if activity.new_value != "" else None
|
||||
),
|
||||
actor_id=activity.actor_id,
|
||||
current_site=origin,
|
||||
slug=activity.workspace.slug,
|
||||
old_identifier=activity.old_identifier,
|
||||
new_identifier=activity.new_identifier,
|
||||
)
|
||||
|
||||
if notification:
|
||||
notifications.delay(
|
||||
|
||||
@@ -53,7 +53,7 @@ def magic_link(email, key, token):
|
||||
)
|
||||
msg.attach_alternative(html_content, "text/html")
|
||||
msg.send()
|
||||
logging.getLogger("plane.worker").info("Email sent successfully.")
|
||||
logging.getLogger("plane").info("Email sent successfully.")
|
||||
return
|
||||
except Exception as e:
|
||||
log_exception(e)
|
||||
|
||||
@@ -80,7 +80,7 @@ def project_add_user_email(current_site, project_member_id, invitor_id):
|
||||
# Send the email
|
||||
msg.send()
|
||||
# Log the success
|
||||
logging.getLogger("plane.worker").info("Email sent successfully.")
|
||||
logging.getLogger("plane").info("Email sent successfully.")
|
||||
return
|
||||
except Exception as e:
|
||||
log_exception(e)
|
||||
|
||||
@@ -76,7 +76,7 @@ def project_invitation(email, project_id, token, current_site, invitor):
|
||||
|
||||
msg.attach_alternative(html_content, "text/html")
|
||||
msg.send()
|
||||
logging.getLogger("plane.worker").info("Email sent successfully.")
|
||||
logging.getLogger("plane").info("Email sent successfully.")
|
||||
return
|
||||
except (Project.DoesNotExist, ProjectMemberInvite.DoesNotExist):
|
||||
return
|
||||
|
||||
@@ -58,7 +58,7 @@ def user_activation_email(current_site, user_id):
|
||||
|
||||
msg.attach_alternative(html_content, "text/html")
|
||||
msg.send()
|
||||
logging.getLogger("plane.worker").info("Email sent successfully.")
|
||||
logging.getLogger("plane").info("Email sent successfully.")
|
||||
return
|
||||
except Exception as e:
|
||||
log_exception(e)
|
||||
|
||||
@@ -60,7 +60,7 @@ def user_deactivation_email(current_site, user_id):
|
||||
# Attach HTML content
|
||||
msg.attach_alternative(html_content, "text/html")
|
||||
msg.send()
|
||||
logging.getLogger("plane.worker").info("Email sent successfully.")
|
||||
logging.getLogger("plane").info("Email sent successfully.")
|
||||
return
|
||||
except Exception as e:
|
||||
log_exception(e)
|
||||
|
||||
@@ -5,7 +5,6 @@ import logging
|
||||
import uuid
|
||||
|
||||
import requests
|
||||
from typing import Any, Dict, List, Optional, Union
|
||||
|
||||
# Third party imports
|
||||
from celery import shared_task
|
||||
@@ -71,89 +70,150 @@ MODEL_MAPPER = {
|
||||
}
|
||||
|
||||
|
||||
logger = logging.getLogger("plane.worker")
|
||||
|
||||
|
||||
def get_model_data(
|
||||
event: str, event_id: Union[str, List[str]], many: bool = False
|
||||
) -> Dict[str, Any]:
|
||||
"""
|
||||
Retrieve and serialize model data based on the event type.
|
||||
|
||||
Args:
|
||||
event (str): The type of event/model to retrieve data for
|
||||
event_id (Union[str, List[str]]): The ID or list of IDs of the model instance(s)
|
||||
many (bool): Whether to retrieve multiple instances
|
||||
|
||||
Returns:
|
||||
Dict[str, Any]: Serialized model data
|
||||
|
||||
Raises:
|
||||
ValueError: If serializer is not found for the event
|
||||
ObjectDoesNotExist: If model instance is not found
|
||||
"""
|
||||
def get_model_data(event, event_id, many=False):
|
||||
model = MODEL_MAPPER.get(event)
|
||||
if model is None:
|
||||
raise ValueError(f"Model not found for event: {event}")
|
||||
if many:
|
||||
queryset = model.objects.filter(pk__in=event_id)
|
||||
else:
|
||||
queryset = model.objects.get(pk=event_id)
|
||||
serializer = SERIALIZER_MAPPER.get(event)
|
||||
return serializer(queryset, many=many).data
|
||||
|
||||
|
||||
@shared_task(
|
||||
bind=True,
|
||||
autoretry_for=(requests.RequestException,),
|
||||
retry_backoff=600,
|
||||
max_retries=5,
|
||||
retry_jitter=True,
|
||||
)
|
||||
def webhook_task(self, webhook, slug, event, event_data, action, current_site):
|
||||
try:
|
||||
if many:
|
||||
queryset = model.objects.filter(pk__in=event_id)
|
||||
else:
|
||||
queryset = model.objects.get(pk=event_id)
|
||||
webhook = Webhook.objects.get(id=webhook, workspace__slug=slug)
|
||||
|
||||
serializer = SERIALIZER_MAPPER.get(event)
|
||||
if serializer is None:
|
||||
raise ValueError(f"Serializer not found for event: {event}")
|
||||
headers = {
|
||||
"Content-Type": "application/json",
|
||||
"User-Agent": "Autopilot",
|
||||
"X-Plane-Delivery": str(uuid.uuid4()),
|
||||
"X-Plane-Event": event,
|
||||
}
|
||||
|
||||
return serializer(queryset, many=many).data
|
||||
except ObjectDoesNotExist:
|
||||
raise ObjectDoesNotExist(f"No {event} found with id: {event_id}")
|
||||
# # Your secret key
|
||||
event_data = (
|
||||
json.loads(json.dumps(event_data, cls=DjangoJSONEncoder))
|
||||
if event_data is not None
|
||||
else None
|
||||
)
|
||||
|
||||
action = {
|
||||
"POST": "create",
|
||||
"PATCH": "update",
|
||||
"PUT": "update",
|
||||
"DELETE": "delete",
|
||||
}.get(action, action)
|
||||
|
||||
payload = {
|
||||
"event": event,
|
||||
"action": action,
|
||||
"webhook_id": str(webhook.id),
|
||||
"workspace_id": str(webhook.workspace_id),
|
||||
"data": event_data,
|
||||
}
|
||||
|
||||
# Use HMAC for generating signature
|
||||
if webhook.secret_key:
|
||||
hmac_signature = hmac.new(
|
||||
webhook.secret_key.encode("utf-8"),
|
||||
json.dumps(payload).encode("utf-8"),
|
||||
hashlib.sha256,
|
||||
)
|
||||
signature = hmac_signature.hexdigest()
|
||||
headers["X-Plane-Signature"] = signature
|
||||
|
||||
# Send the webhook event
|
||||
response = requests.post(webhook.url, headers=headers, json=payload, timeout=30)
|
||||
|
||||
# Log the webhook request
|
||||
WebhookLog.objects.create(
|
||||
workspace_id=str(webhook.workspace_id),
|
||||
webhook=str(webhook.id),
|
||||
event_type=str(event),
|
||||
request_method=str(action),
|
||||
request_headers=str(headers),
|
||||
request_body=str(payload),
|
||||
response_status=str(response.status_code),
|
||||
response_headers=str(response.headers),
|
||||
response_body=str(response.text),
|
||||
retry_count=str(self.request.retries),
|
||||
)
|
||||
|
||||
except Webhook.DoesNotExist:
|
||||
return
|
||||
except requests.RequestException as e:
|
||||
# Log the failed webhook request
|
||||
WebhookLog.objects.create(
|
||||
workspace_id=str(webhook.workspace_id),
|
||||
webhook=str(webhook.id),
|
||||
event_type=str(event),
|
||||
request_method=str(action),
|
||||
request_headers=str(headers),
|
||||
request_body=str(payload),
|
||||
response_status=500,
|
||||
response_headers="",
|
||||
response_body=str(e),
|
||||
retry_count=str(self.request.retries),
|
||||
)
|
||||
# Retry logic
|
||||
if self.request.retries >= self.max_retries:
|
||||
Webhook.objects.filter(pk=webhook.id).update(is_active=False)
|
||||
if webhook:
|
||||
# send email for the deactivation of the webhook
|
||||
send_webhook_deactivation_email(
|
||||
webhook_id=webhook.id,
|
||||
receiver_id=webhook.created_by_id,
|
||||
reason=str(e),
|
||||
current_site=current_site,
|
||||
)
|
||||
return
|
||||
raise requests.RequestException()
|
||||
|
||||
except Exception as e:
|
||||
if settings.DEBUG:
|
||||
print(e)
|
||||
log_exception(e)
|
||||
return
|
||||
|
||||
|
||||
@shared_task
|
||||
def send_webhook_deactivation_email(
|
||||
webhook_id: str, receiver_id: str, current_site: str, reason: str
|
||||
) -> None:
|
||||
"""
|
||||
Send an email notification when a webhook is deactivated.
|
||||
def send_webhook_deactivation_email(webhook_id, receiver_id, current_site, reason):
|
||||
# Get email configurations
|
||||
(
|
||||
EMAIL_HOST,
|
||||
EMAIL_HOST_USER,
|
||||
EMAIL_HOST_PASSWORD,
|
||||
EMAIL_PORT,
|
||||
EMAIL_USE_TLS,
|
||||
EMAIL_USE_SSL,
|
||||
EMAIL_FROM,
|
||||
) = get_email_configuration()
|
||||
|
||||
receiver = User.objects.get(pk=receiver_id)
|
||||
webhook = Webhook.objects.get(pk=webhook_id)
|
||||
subject = "Webhook Deactivated"
|
||||
message = f"Webhook {webhook.url} has been deactivated due to failed requests."
|
||||
|
||||
# Send the mail
|
||||
context = {
|
||||
"email": receiver.email,
|
||||
"message": message,
|
||||
"webhook_url": f"{current_site}/{str(webhook.workspace.slug)}/settings/webhooks/{str(webhook.id)}",
|
||||
}
|
||||
html_content = render_to_string(
|
||||
"emails/notifications/webhook-deactivate.html", context
|
||||
)
|
||||
text_content = strip_tags(html_content)
|
||||
|
||||
Args:
|
||||
webhook_id (str): ID of the deactivated webhook
|
||||
receiver_id (str): ID of the user to receive the notification
|
||||
current_site (str): Current site URL
|
||||
reason (str): Reason for webhook deactivation
|
||||
"""
|
||||
try:
|
||||
(
|
||||
EMAIL_HOST,
|
||||
EMAIL_HOST_USER,
|
||||
EMAIL_HOST_PASSWORD,
|
||||
EMAIL_PORT,
|
||||
EMAIL_USE_TLS,
|
||||
EMAIL_USE_SSL,
|
||||
EMAIL_FROM,
|
||||
) = get_email_configuration()
|
||||
|
||||
receiver = User.objects.get(pk=receiver_id)
|
||||
webhook = Webhook.objects.get(pk=webhook_id)
|
||||
|
||||
# Get the webhook payload
|
||||
subject = "Webhook Deactivated"
|
||||
message = f"Webhook {webhook.url} has been deactivated due to failed requests."
|
||||
|
||||
# Send the mail
|
||||
context = {
|
||||
"email": receiver.email,
|
||||
"message": message,
|
||||
"webhook_url": f"{current_site}/{str(webhook.workspace.slug)}/settings/webhooks/{str(webhook.id)}",
|
||||
}
|
||||
html_content = render_to_string(
|
||||
"emails/notifications/webhook-deactivate.html", context
|
||||
)
|
||||
text_content = strip_tags(html_content)
|
||||
|
||||
# Set the email connection
|
||||
connection = get_connection(
|
||||
host=EMAIL_HOST,
|
||||
port=int(EMAIL_PORT),
|
||||
@@ -163,7 +223,6 @@ def send_webhook_deactivation_email(
|
||||
use_ssl=EMAIL_USE_SSL == "1",
|
||||
)
|
||||
|
||||
# Create the email message
|
||||
msg = EmailMultiAlternatives(
|
||||
subject=subject,
|
||||
body=text_content,
|
||||
@@ -173,10 +232,11 @@ def send_webhook_deactivation_email(
|
||||
)
|
||||
msg.attach_alternative(html_content, "text/html")
|
||||
msg.send()
|
||||
logger.info("Email sent successfully.")
|
||||
logging.getLogger("plane").info("Email sent successfully.")
|
||||
return
|
||||
except Exception as e:
|
||||
log_exception(e)
|
||||
logger.error(f"Failed to send email: {e}")
|
||||
return
|
||||
|
||||
|
||||
@shared_task(
|
||||
@@ -187,29 +247,10 @@ def send_webhook_deactivation_email(
|
||||
retry_jitter=True,
|
||||
)
|
||||
def webhook_send_task(
|
||||
self,
|
||||
webhook_id: str,
|
||||
slug: str,
|
||||
event: str,
|
||||
event_data: Optional[Dict[str, Any]],
|
||||
action: str,
|
||||
current_site: str,
|
||||
activity: Optional[Dict[str, Any]],
|
||||
) -> None:
|
||||
"""
|
||||
Send webhook notifications to configured endpoints.
|
||||
|
||||
Args:
|
||||
webhook (str): Webhook ID
|
||||
slug (str): Workspace slug
|
||||
event (str): Event type
|
||||
event_data (Optional[Dict[str, Any]]): Event data to be sent
|
||||
action (str): HTTP method/action
|
||||
current_site (str): Current site URL
|
||||
activity (Optional[Dict[str, Any]]): Activity data
|
||||
"""
|
||||
self, webhook, slug, event, event_data, action, current_site, activity
|
||||
):
|
||||
try:
|
||||
webhook = Webhook.objects.get(id=webhook_id, workspace__slug=slug)
|
||||
webhook = Webhook.objects.get(id=webhook, workspace__slug=slug)
|
||||
|
||||
headers = {
|
||||
"Content-Type": "application/json",
|
||||
@@ -256,12 +297,7 @@ def webhook_send_task(
|
||||
)
|
||||
signature = hmac_signature.hexdigest()
|
||||
headers["X-Plane-Signature"] = signature
|
||||
except Exception as e:
|
||||
log_exception(e)
|
||||
logger.error(f"Failed to send webhook: {e}")
|
||||
return
|
||||
|
||||
try:
|
||||
# Send the webhook event
|
||||
response = requests.post(webhook.url, headers=headers, json=payload, timeout=30)
|
||||
|
||||
@@ -278,7 +314,7 @@ def webhook_send_task(
|
||||
response_body=str(response.text),
|
||||
retry_count=str(self.request.retries),
|
||||
)
|
||||
logger.info(f"Webhook {webhook.id} sent successfully")
|
||||
|
||||
except requests.RequestException as e:
|
||||
# Log the failed webhook request
|
||||
WebhookLog.objects.create(
|
||||
@@ -293,13 +329,12 @@ def webhook_send_task(
|
||||
response_body=str(e),
|
||||
retry_count=str(self.request.retries),
|
||||
)
|
||||
logger.error(f"Webhook {webhook.id} failed with error: {e}")
|
||||
# Retry logic
|
||||
if self.request.retries >= self.max_retries:
|
||||
Webhook.objects.filter(pk=webhook.id).update(is_active=False)
|
||||
if webhook:
|
||||
# send email for the deactivation of the webhook
|
||||
send_webhook_deactivation_email.delay(
|
||||
send_webhook_deactivation_email(
|
||||
webhook_id=webhook.id,
|
||||
receiver_id=webhook.created_by_id,
|
||||
reason=str(e),
|
||||
@@ -309,50 +344,26 @@ def webhook_send_task(
|
||||
raise requests.RequestException()
|
||||
|
||||
except Exception as e:
|
||||
if settings.DEBUG:
|
||||
print(e)
|
||||
log_exception(e)
|
||||
return
|
||||
|
||||
|
||||
@shared_task
|
||||
def webhook_activity(
|
||||
event: str,
|
||||
verb: str,
|
||||
field: Optional[str],
|
||||
old_value: Any,
|
||||
new_value: Any,
|
||||
actor_id: str | uuid.UUID,
|
||||
slug: str,
|
||||
current_site: str,
|
||||
event_id: str | uuid.UUID,
|
||||
old_identifier: Optional[str],
|
||||
new_identifier: Optional[str],
|
||||
) -> None:
|
||||
"""
|
||||
Process and send webhook notifications for various activities in the system.
|
||||
|
||||
This task filters relevant webhooks based on the event type and sends notifications
|
||||
to all active webhooks for the workspace.
|
||||
|
||||
Args:
|
||||
event (str): Type of event (project, issue, module, cycle, issue_comment)
|
||||
verb (str): Action performed (created, updated, deleted)
|
||||
field (Optional[str]): Name of the field that was changed
|
||||
old_value (Any): Previous value of the field
|
||||
new_value (Any): New value of the field
|
||||
actor_id (str | uuid.UUID): ID of the user who performed the action
|
||||
slug (str): Workspace slug
|
||||
current_site (str): Current site URL
|
||||
event_id (str | uuid.UUID): ID of the event object
|
||||
old_identifier (Optional[str]): Previous identifier if any
|
||||
new_identifier (Optional[str]): New identifier if any
|
||||
|
||||
Returns:
|
||||
None
|
||||
|
||||
Note:
|
||||
The function silently returns on ObjectDoesNotExist exceptions to handle
|
||||
race conditions where objects might have been deleted.
|
||||
"""
|
||||
event,
|
||||
verb,
|
||||
field,
|
||||
old_value,
|
||||
new_value,
|
||||
actor_id,
|
||||
slug,
|
||||
current_site,
|
||||
event_id,
|
||||
old_identifier,
|
||||
new_identifier,
|
||||
):
|
||||
try:
|
||||
webhooks = Webhook.objects.filter(workspace__slug=slug, is_active=True)
|
||||
|
||||
@@ -373,7 +384,7 @@ def webhook_activity(
|
||||
|
||||
for webhook in webhooks:
|
||||
webhook_send_task.delay(
|
||||
webhook_id=webhook.id,
|
||||
webhook=webhook.id,
|
||||
slug=slug,
|
||||
event=event,
|
||||
event_data=(
|
||||
|
||||
@@ -78,7 +78,7 @@ def workspace_invitation(email, workspace_id, token, current_site, inviter):
|
||||
)
|
||||
msg.attach_alternative(html_content, "text/html")
|
||||
msg.send()
|
||||
logging.getLogger("plane.worker").info("Email sent successfully")
|
||||
logging.getLogger("plane").info("Email sent successfully")
|
||||
return
|
||||
except (Workspace.DoesNotExist, WorkspaceMemberInvite.DoesNotExist):
|
||||
return
|
||||
|
||||
@@ -1,319 +0,0 @@
|
||||
# Python imports
|
||||
import os
|
||||
import json
|
||||
import time
|
||||
import uuid
|
||||
from typing import Dict
|
||||
import logging
|
||||
|
||||
# Django imports
|
||||
from django.conf import settings
|
||||
|
||||
# Third party imports
|
||||
from celery import shared_task
|
||||
|
||||
# Module imports
|
||||
from plane.db.models import (
|
||||
Workspace,
|
||||
WorkspaceMember,
|
||||
Project,
|
||||
ProjectMember,
|
||||
IssueUserProperty,
|
||||
State,
|
||||
Label,
|
||||
Issue,
|
||||
IssueLabel,
|
||||
IssueSequence,
|
||||
IssueActivity,
|
||||
)
|
||||
|
||||
logger = logging.getLogger("plane.worker")
|
||||
|
||||
|
||||
def read_seed_file(filename):
|
||||
"""
|
||||
Read a JSON file from the seed directory.
|
||||
|
||||
Args:
|
||||
filename (str): Name of the JSON file to read
|
||||
|
||||
Returns:
|
||||
dict: Contents of the JSON file
|
||||
"""
|
||||
file_path = os.path.join(settings.SEED_DIR, "data", filename)
|
||||
try:
|
||||
with open(file_path, "r") as file:
|
||||
return json.load(file)
|
||||
except FileNotFoundError:
|
||||
logger.error(f"Seed file {filename} not found in {settings.SEED_DIR}/data")
|
||||
return None
|
||||
except json.JSONDecodeError:
|
||||
logger.error(f"Error decoding JSON from {filename}")
|
||||
return None
|
||||
|
||||
|
||||
def create_project_and_member(workspace: Workspace) -> Dict[int, uuid.UUID]:
|
||||
"""Creates a project and associated members for a workspace.
|
||||
|
||||
Creates a new project using the workspace name and sets up all necessary
|
||||
member associations and user properties.
|
||||
|
||||
Args:
|
||||
workspace: The workspace to create the project in
|
||||
|
||||
Returns:
|
||||
A mapping of seed project IDs to actual project IDs
|
||||
"""
|
||||
project_seeds = read_seed_file("projects.json")
|
||||
project_identifier = "".join(ch for ch in workspace.name if ch.isalnum())[:5]
|
||||
|
||||
# Create members
|
||||
workspace_members = WorkspaceMember.objects.filter(workspace=workspace).values(
|
||||
"member_id", "role"
|
||||
)
|
||||
|
||||
projects_map: Dict[int, uuid.UUID] = {}
|
||||
|
||||
if not project_seeds:
|
||||
logger.warning(
|
||||
"Task: workspace_seed_task -> No project seeds found. Skipping project creation."
|
||||
)
|
||||
return projects_map
|
||||
|
||||
for project_seed in project_seeds:
|
||||
project_id = project_seed.pop("id")
|
||||
# Remove the name from seed data since we want to use workspace name
|
||||
project_seed.pop("name", None)
|
||||
project_seed.pop("identifier", None)
|
||||
|
||||
project = Project.objects.create(
|
||||
**project_seed,
|
||||
workspace=workspace,
|
||||
name=workspace.name, # Use workspace name
|
||||
identifier=project_identifier,
|
||||
created_by_id=workspace.created_by_id,
|
||||
)
|
||||
|
||||
# Create project members
|
||||
ProjectMember.objects.bulk_create(
|
||||
[
|
||||
ProjectMember(
|
||||
project=project,
|
||||
member_id=workspace_member["member_id"],
|
||||
role=workspace_member["role"],
|
||||
workspace_id=workspace.id,
|
||||
created_by_id=workspace.created_by_id,
|
||||
)
|
||||
for workspace_member in workspace_members
|
||||
]
|
||||
)
|
||||
|
||||
# Create issue user properties
|
||||
IssueUserProperty.objects.bulk_create(
|
||||
[
|
||||
IssueUserProperty(
|
||||
project=project,
|
||||
user_id=workspace_member["member_id"],
|
||||
workspace_id=workspace.id,
|
||||
display_filters={
|
||||
"group_by": None,
|
||||
"order_by": "sort_order",
|
||||
"type": None,
|
||||
"sub_issue": True,
|
||||
"show_empty_groups": True,
|
||||
"layout": "list",
|
||||
"calendar_date_range": "",
|
||||
},
|
||||
created_by_id=workspace.created_by_id,
|
||||
)
|
||||
for workspace_member in workspace_members
|
||||
]
|
||||
)
|
||||
# update map
|
||||
projects_map[project_id] = project.id
|
||||
logger.info(f"Task: workspace_seed_task -> Project {project_id} created")
|
||||
|
||||
return projects_map
|
||||
|
||||
|
||||
def create_project_states(
|
||||
workspace: Workspace, project_map: Dict[int, uuid.UUID]
|
||||
) -> Dict[int, uuid.UUID]:
|
||||
"""Creates states for each project in the workspace.
|
||||
|
||||
Args:
|
||||
workspace: The workspace containing the projects
|
||||
project_map: Mapping of seed project IDs to actual project IDs
|
||||
|
||||
Returns:
|
||||
A mapping of seed state IDs to actual state IDs
|
||||
"""
|
||||
|
||||
state_seeds = read_seed_file("states.json")
|
||||
state_map: Dict[int, uuid.UUID] = {}
|
||||
|
||||
if not state_seeds:
|
||||
return state_map
|
||||
|
||||
for state_seed in state_seeds:
|
||||
state_id = state_seed.pop("id")
|
||||
project_id = state_seed.pop("project_id")
|
||||
|
||||
state = State.objects.create(
|
||||
**state_seed,
|
||||
project_id=project_map[project_id],
|
||||
workspace=workspace,
|
||||
created_by_id=workspace.created_by_id,
|
||||
)
|
||||
|
||||
state_map[state_id] = state.id
|
||||
logger.info(f"Task: workspace_seed_task -> State {state_id} created")
|
||||
return state_map
|
||||
|
||||
|
||||
def create_project_labels(
|
||||
workspace: Workspace, project_map: Dict[int, uuid.UUID]
|
||||
) -> Dict[int, uuid.UUID]:
|
||||
"""Creates labels for each project in the workspace.
|
||||
|
||||
Args:
|
||||
workspace: The workspace containing the projects
|
||||
project_map: Mapping of seed project IDs to actual project IDs
|
||||
|
||||
Returns:
|
||||
A mapping of seed label IDs to actual label IDs
|
||||
"""
|
||||
label_seeds = read_seed_file("labels.json")
|
||||
label_map: Dict[int, uuid.UUID] = {}
|
||||
|
||||
if not label_seeds:
|
||||
return label_map
|
||||
|
||||
for label_seed in label_seeds:
|
||||
label_id = label_seed.pop("id")
|
||||
project_id = label_seed.pop("project_id")
|
||||
label = Label.objects.create(
|
||||
**label_seed,
|
||||
project_id=project_map[project_id],
|
||||
workspace=workspace,
|
||||
created_by_id=workspace.created_by_id,
|
||||
)
|
||||
label_map[label_id] = label.id
|
||||
|
||||
logger.info(f"Task: workspace_seed_task -> Label {label_id} created")
|
||||
return label_map
|
||||
|
||||
|
||||
def create_project_issues(
|
||||
workspace: Workspace,
|
||||
project_map: Dict[int, uuid.UUID],
|
||||
states_map: Dict[int, uuid.UUID],
|
||||
labels_map: Dict[int, uuid.UUID],
|
||||
) -> None:
|
||||
"""Creates issues and their associated records for each project.
|
||||
|
||||
Creates issues along with their sequences, activities, and label associations.
|
||||
|
||||
Args:
|
||||
workspace: The workspace containing the projects
|
||||
project_map: Mapping of seed project IDs to actual project IDs
|
||||
states_map: Mapping of seed state IDs to actual state IDs
|
||||
labels_map: Mapping of seed label IDs to actual label IDs
|
||||
"""
|
||||
issue_seeds = read_seed_file("issues.json")
|
||||
|
||||
if not issue_seeds:
|
||||
return
|
||||
|
||||
for issue_seed in issue_seeds:
|
||||
required_fields = ["id", "labels", "project_id", "state_id"]
|
||||
# get the values
|
||||
for field in required_fields:
|
||||
if field not in issue_seed:
|
||||
logger.error(
|
||||
f"Task: workspace_seed_task -> Required field '{field}' missing in issue seed"
|
||||
)
|
||||
continue
|
||||
|
||||
# get the values
|
||||
issue_id = issue_seed.pop("id")
|
||||
labels = issue_seed.pop("labels")
|
||||
project_id = issue_seed.pop("project_id")
|
||||
state_id = issue_seed.pop("state_id")
|
||||
|
||||
issue = Issue.objects.create(
|
||||
**issue_seed,
|
||||
state_id=states_map[state_id],
|
||||
project_id=project_map[project_id],
|
||||
workspace=workspace,
|
||||
created_by_id=workspace.created_by_id,
|
||||
)
|
||||
IssueSequence.objects.create(
|
||||
issue=issue,
|
||||
project_id=project_map[project_id],
|
||||
workspace_id=workspace.id,
|
||||
created_by_id=workspace.created_by_id,
|
||||
)
|
||||
|
||||
IssueActivity.objects.create(
|
||||
issue=issue,
|
||||
project_id=project_map[project_id],
|
||||
workspace_id=workspace.id,
|
||||
comment="created the issue",
|
||||
verb="created",
|
||||
actor_id=workspace.created_by_id,
|
||||
epoch=time.time(),
|
||||
)
|
||||
|
||||
for label_id in labels:
|
||||
IssueLabel.objects.create(
|
||||
issue=issue,
|
||||
label_id=labels_map[label_id],
|
||||
project_id=project_map[project_id],
|
||||
workspace_id=workspace.id,
|
||||
created_by_id=workspace.created_by_id,
|
||||
)
|
||||
|
||||
logger.info(f"Task: workspace_seed_task -> Issue {issue_id} created")
|
||||
return
|
||||
|
||||
|
||||
@shared_task
|
||||
def workspace_seed(workspace_id: uuid.UUID) -> None:
|
||||
"""Seeds a new workspace with initial project data.
|
||||
|
||||
Creates a complete workspace setup including:
|
||||
- Projects and project members
|
||||
- Project states
|
||||
- Project labels
|
||||
- Issues and their associations
|
||||
|
||||
Args:
|
||||
workspace_id: ID of the workspace to seed
|
||||
"""
|
||||
try:
|
||||
logger.info(f"Task: workspace_seed_task -> Seeding workspace {workspace_id}")
|
||||
# Get the workspace
|
||||
workspace = Workspace.objects.get(id=workspace_id)
|
||||
|
||||
# Create a project with the same name as workspace
|
||||
project_map = create_project_and_member(workspace)
|
||||
|
||||
# Create project states
|
||||
state_map = create_project_states(workspace, project_map)
|
||||
|
||||
# Create project labels
|
||||
label_map = create_project_labels(workspace, project_map)
|
||||
|
||||
# create project issues
|
||||
create_project_issues(workspace, project_map, state_map, label_map)
|
||||
|
||||
logger.info(
|
||||
f"Task: workspace_seed_task -> Workspace {workspace_id} seeded successfully"
|
||||
)
|
||||
return
|
||||
except Exception as e:
|
||||
logger.error(
|
||||
f"Task: workspace_seed_task -> Failed to seed workspace {workspace_id}: {str(e)}"
|
||||
)
|
||||
raise e
|
||||
@@ -1,15 +1,7 @@
|
||||
# Python imports
|
||||
import os
|
||||
import logging
|
||||
|
||||
# Third party imports
|
||||
from celery import Celery
|
||||
from pythonjsonlogger.jsonlogger import JsonFormatter
|
||||
from celery.signals import after_setup_logger, after_setup_task_logger
|
||||
from celery.schedules import crontab
|
||||
|
||||
# Module imports
|
||||
from plane.settings.redis import redis_instance
|
||||
from celery.schedules import crontab
|
||||
|
||||
# Set the default Django settings module for the 'celery' program.
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "plane.settings.production")
|
||||
@@ -55,28 +47,6 @@ app.conf.beat_schedule = {
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
# Setup logging
|
||||
@after_setup_logger.connect
|
||||
def setup_loggers(logger, *args, **kwargs):
|
||||
formatter = JsonFormatter(
|
||||
'"%(levelname)s %(asctime)s %(module)s %(name)s %(message)s'
|
||||
)
|
||||
handler = logging.StreamHandler()
|
||||
handler.setFormatter(fmt=formatter)
|
||||
logger.addHandler(handler)
|
||||
|
||||
|
||||
@after_setup_task_logger.connect
|
||||
def setup_task_loggers(logger, *args, **kwargs):
|
||||
formatter = JsonFormatter(
|
||||
'"%(levelname)s %(asctime)s %(module)s %(name)s %(message)s'
|
||||
)
|
||||
handler = logging.StreamHandler()
|
||||
handler.setFormatter(fmt=formatter)
|
||||
logger.addHandler(handler)
|
||||
|
||||
|
||||
# Load task modules from all registered Django app configs.
|
||||
app.autodiscover_tasks()
|
||||
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
# Generated by Django 4.2.17 on 2025-04-25 09:02
|
||||
|
||||
from django.db import migrations, models
|
||||
from plane.db.models.intake import SourceType
|
||||
|
||||
def set_default_source_type(apps, schema_editor):
|
||||
IntakeIssue = apps.get_model("db", "IntakeIssue")
|
||||
IntakeIssue.objects.filter(source__iexact="in-app").update(source=SourceType.IN_APP)
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
('db', '0093_page_moved_to_page_page_moved_to_project_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(
|
||||
set_default_source_type,
|
||||
migrations.RunPython.noop,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='profile',
|
||||
name='start_of_the_week',
|
||||
field=models.PositiveSmallIntegerField(choices=[(0, 'Sunday'), (1, 'Monday'), (2, 'Tuesday'), (3, 'Wednesday'), (4, 'Thursday'), (5, 'Friday'), (6, 'Saturday')], default=0),
|
||||
),
|
||||
]
|
||||
@@ -1,23 +0,0 @@
|
||||
# Generated by Django 4.2.14 on 2025-05-09 11:31
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('db', '0094_auto_20250425_0902'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='page',
|
||||
name='external_id',
|
||||
field=models.CharField(blank=True, max_length=255, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='page',
|
||||
name='external_source',
|
||||
field=models.CharField(blank=True, max_length=255, null=True),
|
||||
),
|
||||
]
|
||||
@@ -31,10 +31,6 @@ class Intake(ProjectBaseModel):
|
||||
ordering = ("name",)
|
||||
|
||||
|
||||
class SourceType(models.TextChoices):
|
||||
IN_APP = "IN_APP"
|
||||
|
||||
|
||||
class IntakeIssue(ProjectBaseModel):
|
||||
intake = models.ForeignKey(
|
||||
"db.Intake", related_name="issue_intake", on_delete=models.CASCADE
|
||||
|
||||
@@ -17,11 +17,6 @@ def get_view_props():
|
||||
|
||||
|
||||
class Page(BaseModel):
|
||||
PRIVATE_ACCESS = 1
|
||||
PUBLIC_ACCESS = 0
|
||||
|
||||
ACCESS_CHOICES = ((PRIVATE_ACCESS, "Private"), (PUBLIC_ACCESS, "Public"))
|
||||
|
||||
workspace = models.ForeignKey(
|
||||
"db.Workspace", on_delete=models.CASCADE, related_name="pages"
|
||||
)
|
||||
@@ -58,9 +53,6 @@ class Page(BaseModel):
|
||||
moved_to_page = models.UUIDField(null=True, blank=True)
|
||||
moved_to_project = models.UUIDField(null=True, blank=True)
|
||||
|
||||
external_id = models.CharField(max_length=255, null=True, blank=True)
|
||||
external_source = models.CharField(max_length=255, null=True, blank=True)
|
||||
|
||||
class Meta:
|
||||
verbose_name = "Page"
|
||||
verbose_name_plural = "Pages"
|
||||
@@ -99,7 +91,9 @@ class PageLog(BaseModel):
|
||||
transaction = models.UUIDField(default=uuid.uuid4)
|
||||
page = models.ForeignKey(Page, related_name="page_log", on_delete=models.CASCADE)
|
||||
entity_identifier = models.UUIDField(null=True)
|
||||
entity_name = models.CharField(max_length=30, verbose_name="Transaction Type")
|
||||
entity_name = models.CharField(
|
||||
max_length=30, verbose_name="Transaction Type"
|
||||
)
|
||||
workspace = models.ForeignKey(
|
||||
"db.Workspace", on_delete=models.CASCADE, related_name="workspace_page_log"
|
||||
)
|
||||
|
||||
@@ -164,24 +164,6 @@ class User(AbstractBaseUser, PermissionsMixin):
|
||||
|
||||
|
||||
class Profile(TimeAuditModel):
|
||||
SUNDAY = 0
|
||||
MONDAY = 1
|
||||
TUESDAY = 2
|
||||
WEDNESDAY = 3
|
||||
THURSDAY = 4
|
||||
FRIDAY = 5
|
||||
SATURDAY = 6
|
||||
|
||||
START_OF_THE_WEEK_CHOICES = (
|
||||
(SUNDAY, "Sunday"),
|
||||
(MONDAY, "Monday"),
|
||||
(TUESDAY, "Tuesday"),
|
||||
(WEDNESDAY, "Wednesday"),
|
||||
(THURSDAY, "Thursday"),
|
||||
(FRIDAY, "Friday"),
|
||||
(SATURDAY, "Saturday"),
|
||||
)
|
||||
|
||||
id = models.UUIDField(
|
||||
default=uuid.uuid4, unique=True, editable=False, db_index=True, primary_key=True
|
||||
)
|
||||
@@ -212,9 +194,6 @@ class Profile(TimeAuditModel):
|
||||
mobile_timezone_auto_set = models.BooleanField(default=False)
|
||||
# language
|
||||
language = models.CharField(max_length=255, default="en")
|
||||
start_of_the_week = models.PositiveSmallIntegerField(
|
||||
choices=START_OF_THE_WEEK_CHOICES, default=SUNDAY
|
||||
)
|
||||
|
||||
class Meta:
|
||||
verbose_name = "Profile"
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
# Module imports
|
||||
from plane.db.models import APIActivityLog
|
||||
from plane.utils.ip_address import get_client_ip
|
||||
|
||||
class APITokenLogMiddleware:
|
||||
def __init__(self, get_response):
|
||||
self.get_response = get_response
|
||||
|
||||
def __call__(self, request):
|
||||
request_body = request.body
|
||||
response = self.get_response(request)
|
||||
self.process_request(request, response, request_body)
|
||||
return response
|
||||
|
||||
def process_request(self, request, response, request_body):
|
||||
api_key_header = "X-Api-Key"
|
||||
api_key = request.headers.get(api_key_header)
|
||||
# If the API key is present, log the request
|
||||
if api_key:
|
||||
try:
|
||||
APIActivityLog.objects.create(
|
||||
token_identifier=api_key,
|
||||
path=request.path,
|
||||
method=request.method,
|
||||
query_params=request.META.get("QUERY_STRING", ""),
|
||||
headers=str(request.headers),
|
||||
body=(request_body.decode("utf-8") if request_body else None),
|
||||
response_body=(
|
||||
response.content.decode("utf-8") if response.content else None
|
||||
),
|
||||
response_code=response.status_code,
|
||||
ip_address=get_client_ip(request=request),
|
||||
user_agent=request.META.get("HTTP_USER_AGENT", None),
|
||||
)
|
||||
|
||||
except Exception as e:
|
||||
print(e)
|
||||
# If the token does not exist, you can decide whether to log this as an invalid attempt
|
||||
|
||||
return None
|
||||
@@ -10,10 +10,8 @@ from rest_framework.request import Request
|
||||
|
||||
# Module imports
|
||||
from plane.utils.ip_address import get_client_ip
|
||||
from plane.db.models import APIActivityLog
|
||||
|
||||
|
||||
api_logger = logging.getLogger("plane.api.request")
|
||||
api_logger = logging.getLogger("plane.api")
|
||||
|
||||
|
||||
class RequestLoggerMiddleware:
|
||||
@@ -71,41 +69,3 @@ class RequestLoggerMiddleware:
|
||||
|
||||
# return the response
|
||||
return response
|
||||
|
||||
|
||||
class APITokenLogMiddleware:
|
||||
def __init__(self, get_response):
|
||||
self.get_response = get_response
|
||||
|
||||
def __call__(self, request):
|
||||
request_body = request.body
|
||||
response = self.get_response(request)
|
||||
self.process_request(request, response, request_body)
|
||||
return response
|
||||
|
||||
def process_request(self, request, response, request_body):
|
||||
api_key_header = "X-Api-Key"
|
||||
api_key = request.headers.get(api_key_header)
|
||||
# If the API key is present, log the request
|
||||
if api_key:
|
||||
try:
|
||||
APIActivityLog.objects.create(
|
||||
token_identifier=api_key,
|
||||
path=request.path,
|
||||
method=request.method,
|
||||
query_params=request.META.get("QUERY_STRING", ""),
|
||||
headers=str(request.headers),
|
||||
body=(request_body.decode("utf-8") if request_body else None),
|
||||
response_body=(
|
||||
response.content.decode("utf-8") if response.content else None
|
||||
),
|
||||
response_code=response.status_code,
|
||||
ip_address=get_client_ip(request=request),
|
||||
user_agent=request.META.get("HTTP_USER_AGENT", None),
|
||||
)
|
||||
|
||||
except Exception as e:
|
||||
api_logger.exception(e)
|
||||
# If the token does not exist, you can decide whether to log this as an invalid attempt
|
||||
|
||||
return None
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"name": "Welcome to Plane 👋",
|
||||
"sequence_id": 1,
|
||||
"description_html": "<p class=\"editor-paragraph-block\">Hey there! This demo project is your playground to get hands-on with Plane. We've set this up so you can click around and see how everything works without worrying about breaking anything.</p><p class=\"editor-paragraph-block\">Each work item is designed to make you familiar with the basics of using Plane. Just follow along card by card at your own pace.</p><p class=\"editor-paragraph-block\">First thing to try</p><ol class=\"list-decimal pl-7 space-y-[--list-spacing-y] tight\" data-tight=\"true\"><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Look in the <strong>Properties</strong> section below where it says <strong>State: Todo</strong>.</p></li><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Click on it and change it to <strong>Done</strong> from the dropdown. Alternatively, you can drag and drop the card to the Done column.</p></li></ol>",
|
||||
"description_stripped": "Hey there! This demo project is your playground to get hands-on with Plane. We've set this up so you can click around and see how everything works without worrying about breaking anything.Each work item is designed to make you familiar with the basics of using Plane. Just follow along card by card at your own pace.First thing to tryLook in the Properties section below where it says State: Todo.Click on it and change it to Done from the dropdown. Alternatively, you can drag and drop the card to the Done column.",
|
||||
"sort_order": 1000,
|
||||
"state_id": 3,
|
||||
"labels": [],
|
||||
"priority": "none",
|
||||
"project_id": 1
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "1. Create Projects 🎯",
|
||||
"sequence_id": 2,
|
||||
"description_html": "<p class=\"editor-paragraph-block\"><br>A Project in Plane is where all your work comes together. Think of it as a base that organizes your work items and everything else your team needs to get things done.</p><div data-emoji-unicode=\"128204\" data-emoji-url=\"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/1f4cc.png\" data-logo-in-use=\"emoji\" data-background=\"light-blue\" data-block-type=\"callout-component\"><p class=\"editor-paragraph-block\"><strong>Note: </strong>This tutorial is already set up as a Project, and these cards you're reading are work items within it!</p><p class=\"editor-paragraph-block\">We're showing you how to create a new project just so you'll know exactly what to do when you're ready to start your own real one.</p></div><ol class=\"list-decimal pl-7 space-y-[--list-spacing-y] tight\" data-tight=\"true\"><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Look over at the left sidebar and find where it says <strong>Projects.</strong></p><image-component src=\"https://media.docs.plane.so/seed_assets/21.png\" width=\"395px\" height=\"362px\" id=\"7cb0d276-8686-4c8e-9f00-06a18140964d\" aspectratio=\"1.0900243309002433\"></image-component></li><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Hover your mouse there and you'll see a little <strong>+</strong> icon pop up - go ahead and click it!</p></li><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">A modal opens where you can give your project a name and other details.</p></li><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Notice the Access type<strong> </strong>options? <strong>Public</strong> means anyone (except Guest users) can see and join it, while <strong>Private</strong> keeps it just for those you invite.</p><div data-icon-color=\"#6d7b8a\" data-icon-name=\"Info\" data-emoji-unicode=\"128161\" data-emoji-url=\"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/1f4a1.png\" data-logo-in-use=\"emoji\" data-background=\"green\" data-block-type=\"callout-component\"><p class=\"editor-paragraph-block\"><strong>Tip:</strong> You can also quickly create a new project by using the keyboard shortcut <strong>P</strong> from anywhere in Plane!</p></div></li></ol>",
|
||||
"sort_order": 2000,
|
||||
"state_id": 2,
|
||||
"labels": [2],
|
||||
"priority": "none",
|
||||
"project_id": 1
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "2. Invite your team 🤜🤛",
|
||||
"sequence_id": 3,
|
||||
"description_html": "<p class=\"editor-paragraph-block\">Let's get your teammates on board!</p><p class=\"editor-paragraph-block\">First, you'll need to invite them to your workspace before they can join specific projects:</p><ol class=\"list-decimal pl-7 space-y-[--list-spacing-y] tight\" data-tight=\"true\"><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Click on your workspace name in the top-left corner, then select <strong>Settings</strong> from the dropdown.<br></p><image-component src=\"https://media.docs.plane.so/seed_assets/31.png\" width=\"395px\" height=\"367px\" id=\"26b0f613-b9d8-48b8-a10d-1a75501f19e0\" aspectratio=\"1.074766355140187\"></image-component></li><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Head over to the <strong>Members</strong> tab - this is your user management hub. Click <strong>Add member</strong> on the top right.<br></p><image-component src=\"https://media.docs.plane.so/seed_assets/32.png\" width=\"1144.380859375px\" height=\"206.3244316692872px\" id=\"7c64e9b0-4f6d-4958-917d-f77119cd48bd\" aspectratio=\"5.546511627906977\"></image-component></li><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Enter your teammate's email address. Select a role for them (Admin, Member or Guest) that determines what they can do in the workspace.</p></li><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Your team member will get an email invite. Once they've joined your workspace, you can add them to specific projects.</p></li><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">To do this, go to your project's <strong>Settings</strong> page.</p><image-component src=\"https://media.docs.plane.so/seed_assets/33.png\" width=\"1119.380859375px\" height=\"329.9601265352615px\" id=\"3029c693-19fc-458e-9f5c-fdf3511dd2b6\" aspectratio=\"3.39247311827957\"></image-component></li><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Find the <strong>Members</strong> section, select your teammate, and assign them a project role - this controls what they can do within just this project.</p></li></ol><p class=\"editor-paragraph-block\"><br>That's it!</p><div class=\"py-4 border-custom-border-400\" data-type=\"horizontalRule\"><div></div></div><p class=\"editor-paragraph-block\">To learn more about user management, see <a target=\"_blank\" rel=\"noopener noreferrer nofollow\" class=\"text-custom-primary-300 underline underline-offset-[3px] hover:text-custom-primary-500 transition-colors cursor-pointer\" href=\"https://docs.plane.so/core-concepts/workspaces/members\">Manage users and roles</a>.</p>",
|
||||
"description_stripped": "Let's get your teammates on board!First, you'll need to invite them to your workspace before they can join specific projects:Click on your workspace name in the top-left corner, then select Settings from the dropdown.Head over to the Members tab - this is your user management hub. Click Add member on the top right.Enter your teammate's email address. Select a role for them (Admin, Member or Guest) that determines what they can do in the workspace.Your team member will get an email invite. Once they've joined your workspace, you can add them to specific projects.To do this, go to your project's Settings page.Find the Members section, select your teammate, and assign them a project role - this controls what they can do within just this project.That's it!To learn more about user management, see Manage users and roles.",
|
||||
"sort_order": 3000,
|
||||
"state_id": 1,
|
||||
"labels": [],
|
||||
"priority": "none",
|
||||
"project_id": 1
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"name": "3. Create and assign Work Items ✏️",
|
||||
"sequence_id": 4,
|
||||
"description_html": "<p class=\"editor-paragraph-block\">A work item is the fundamental building block of your project. Think of these as the actionable tasks that move your project forward.</p><p class=\"editor-paragraph-block\">Ready to add something to your project's to-do list? Here's how:</p><ol class=\"list-decimal pl-7 space-y-[--list-spacing-y] tight\" data-tight=\"true\"><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Click the <strong>Add work item</strong> button in the top-right corner of the Work Items page.</p><image-component src=\"https://media.docs.plane.so/seed_assets/41.png\" width=\"1085.380859375px\" height=\"482.53758375605696px\" id=\"ba055bc3-4162-4750-9ad4-9434fc0e7121\" aspectratio=\"2.249318801089918\"></image-component></li><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Give your task a clear title and add any details in the description.</p></li><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Set up the essentials:</p><ul class=\"list-disc pl-7 space-y-[--list-spacing-y] tight\" data-tight=\"true\"><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Assign it to a team member (or yourself!)</p></li><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Choose a priority level</p></li><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Add start and due dates if there's a timeline</p></li></ul></li></ol><div data-emoji-unicode=\"128161\" data-emoji-url=\"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/1f4a1.png\" data-logo-in-use=\"emoji\" data-background=\"green\" data-block-type=\"callout-component\"><p class=\"editor-paragraph-block\"><strong>Tip:</strong> Save time by using the keyboard shortcut <strong>C</strong> from anywhere in your project to quickly create a new work item!</p></div><div class=\"py-4 border-custom-border-400\" data-type=\"horizontalRule\"><div></div></div><p class=\"editor-paragraph-block\">Want to dive deeper into all the things you can do with work items? Check out our <a target=\"_blank\" rel=\"noopener noreferrer nofollow\" class=\"text-custom-primary-300 underline underline-offset-[3px] hover:text-custom-primary-500 transition-colors cursor-pointer\" href=\"https://docs.plane.so/core-concepts/issues/overview\">documentation</a>.</p>",
|
||||
"description_stripped": "A work item is the fundamental building block of your project. Think of these as the actionable tasks that move your project forward.Ready to add something to your project's to-do list? Here's how:Click the Add work item button in the top-right corner of the Work Items page.Give your task a clear title and add any details in the description.Set up the essentials:Assign it to a team member (or yourself!)Choose a priority levelAdd start and due dates if there's a timelineTip: Save time by using the keyboard shortcut C from anywhere in your project to quickly create a new work item!Want to dive deeper into all the things you can do with work items? Check out our documentation.",
|
||||
"sort_order": 4000,
|
||||
"state_id": 1,
|
||||
"labels": [2],
|
||||
"priority": "none",
|
||||
"project_id": 1
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"name": "4. Visualize your work 🔮",
|
||||
"sequence_id": 5,
|
||||
"description_html": "<p class=\"editor-paragraph-block\">Plane offers multiple ways to look at your work items depending on what you need to see. Let's explore how to change views and customize them!</p><image-component src=\"https://media.docs.plane.so/seed_assets/51.png\" aspectratio=\"4.489130434782608\"></image-component><h2 class=\"editor-heading-block\">Switch between layouts</h2><ol class=\"list-decimal pl-7 space-y-[--list-spacing-y] tight\" data-tight=\"true\"><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Look at the top toolbar in your project. You'll see several layout icons.</p></li><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Click any of these icons to instantly switch between layouts.</p></li></ol><div data-emoji-unicode=\"128161\" data-emoji-url=\"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/1f4a1.png\" data-logo-in-use=\"emoji\" data-background=\"green\" data-block-type=\"callout-component\"><p class=\"editor-paragraph-block\"><strong>Tip:</strong> Different layouts work best for different needs. Try Board view for tracking progress, Calendar for deadline management, and Gantt for timeline planning! See <a target=\"_blank\" rel=\"noopener noreferrer nofollow\" class=\"text-custom-primary-300 underline underline-offset-[3px] hover:text-custom-primary-500 transition-colors cursor-pointer\" href=\"https://docs.plane.so/core-concepts/issues/layouts\"><strong>Layouts</strong></a> for more info.</p></div><h2 class=\"editor-heading-block\">Filter and display options</h2><p class=\"editor-paragraph-block\">Need to focus on specific work?</p><ol class=\"list-decimal pl-7 space-y-[--list-spacing-y] tight\" data-tight=\"true\"><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Click the <strong>Filters</strong> dropdown in the toolbar. Select criteria and choose which items to show.</p></li><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Click the <strong>Display</strong> dropdown to tailor how the information appears in your layout</p></li><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Created the perfect setup? Save it for later by clicking the the <strong>Save View</strong> button.</p></li><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Access saved views anytime from the <strong>Views</strong> section in your sidebar.</p></li></ol>",
|
||||
"description_stripped": "Plane offers multiple ways to look at your work items depending on what you need to see. Let's explore how to change views and customize them!Switch between layoutsLook at the top toolbar in your project. You'll see several layout icons.Click any of these icons to instantly switch between layouts.Tip: Different layouts work best for different needs. Try Board view for tracking progress, Calendar for deadline management, and Gantt for timeline planning! See Layouts for more info.Filter and display optionsNeed to focus on specific work?Click the Filters dropdown in the toolbar. Select criteria and choose which items to show.Click the Display dropdown to tailor how the information appears in your layoutCreated the perfect setup? Save it for later by clicking the the Save View button.Access saved views anytime from the Views section in your sidebar.",
|
||||
"sort_order": 5000,
|
||||
"state_id": 1,
|
||||
"labels": [],
|
||||
"priority": "none",
|
||||
"project_id": 1
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"name": "5. Use Cycles to time box tasks 🗓️",
|
||||
"sequence_id": 6,
|
||||
"description_html": "<p class=\"editor-paragraph-block\">A Cycle in Plane is like a sprint - a dedicated timeframe where your team focuses on completing specific work items. It helps you break down your project into manageable chunks with clear start and end dates so everyone knows what to work on and when it needs to be done.</p><h2 class=\"editor-heading-block\"><strong>Setup Cycles</strong></h2><ol class=\"list-decimal pl-7 space-y-[--list-spacing-y] tight\" data-tight=\"true\"><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Go to the <strong>Cycles</strong> section in your project (you can find it in the left sidebar)</p><image-component src=\"https://media.docs.plane.so/seed_assets/61.png\" width=\"1144.380859375px\" height=\"341.8747850334119px\" id=\"9c3aea94-703a-4d4c-8c39-4201e994711d\" aspectratio=\"3.3473684210526318\"></image-component></li><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Click the <strong>Add cycle </strong>button in the top-right corner</p></li><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Enter details and set the start and end dates for your cycle.</p></li><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Click <strong>Create cycle</strong> and you're ready to go!</p></li><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Add existing work items to the Cycle or create new ones.</p></li></ol><div data-emoji-unicode=\"128161\" data-emoji-url=\"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/1f4a1.png\" data-logo-in-use=\"emoji\" data-background=\"green\" data-block-type=\"callout-component\"><p class=\"editor-paragraph-block\"><strong>Tip:</strong> To create a new Cycle quickly, just press <code class=\"rounded bg-custom-background-80 px-[6px] py-[1.5px] font-mono font-medium text-orange-500 border-[0.5px] border-custom-border-200\" spellcheck=\"false\">Q</code> from anywhere in your project!</p></div><div class=\"py-4 border-custom-border-400\" data-type=\"horizontalRule\"><div></div></div><p class=\"editor-paragraph-block\">Want to learn more?</p><ul class=\"list-disc pl-7 space-y-[--list-spacing-y] tight\" data-tight=\"true\"><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Starting and stopping cycles</p></li><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Transferring work items between cycles</p></li><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Tracking progress with charts</p></li></ul><p class=\"editor-paragraph-block\">Check out our <a target=\"_blank\" rel=\"noopener noreferrer nofollow\" class=\"text-custom-primary-300 underline underline-offset-[3px] hover:text-custom-primary-500 transition-colors cursor-pointer\" href=\"https://docs.plane.so/core-concepts/cycles\">detailed documentation</a> for everything you need to know!</p>",
|
||||
"description_stripped": "A Cycle in Plane is like a sprint - a dedicated timeframe where your team focuses on completing specific work items. It helps you break down your project into manageable chunks with clear start and end dates so everyone knows what to work on and when it needs to be done.Setup CyclesGo to the Cycles section in your project (you can find it in the left sidebar)Click the Add cycle button in the top-right cornerEnter details and set the start and end dates for your cycle.Click Create cycle and you're ready to go!Add existing work items to the Cycle or create new ones.Tip: To create a new Cycle quickly, just press Q from anywhere in your project!Want to learn more?Starting and stopping cyclesTransferring work items between cyclesTracking progress with chartsCheck out our detailed documentation for everything you need to know!",
|
||||
"sort_order": 6000,
|
||||
"state_id": 1,
|
||||
"labels": [2],
|
||||
"priority": "none",
|
||||
"project_id": 1
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"name": "6. Customize your settings ⚙️",
|
||||
"sequence_id": 7,
|
||||
"description_html": "<p class=\"editor-paragraph-block\">Now that you're getting familiar with Plane, let's explore how you can customize settings to make it work just right for you and your team!</p><h2 class=\"editor-heading-block\">Workspace settings</h2><p class=\"editor-paragraph-block\">Remember those workspace settings we mentioned when inviting team members? There's a lot more you can do there:</p><ul class=\"list-disc pl-7 space-y-[--list-spacing-y] tight\" data-tight=\"true\"><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Invite and manage workspace members</p></li><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Upgrade plans and manage billing</p></li><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Import data from other tools</p></li><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Export your data</p></li><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Manage integrations</p></li></ul><h2 class=\"editor-heading-block\">Project Settings</h2><p class=\"editor-paragraph-block\">Each project has its own settings where you can:</p><ul class=\"list-disc pl-7 space-y-[--list-spacing-y] tight\" data-tight=\"true\"><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Change project details and visibility</p></li><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Invite specific members to just this project</p></li><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Customize your workflow States (like adding a \"Testing\" state)</p></li><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Create and organize Labels</p></li><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Enable or disable features you need (or don't need)</p></li></ul><h2 class=\"editor-heading-block\">Your Profile Settings</h2><p class=\"editor-paragraph-block\">You can also customize your own personal experience! Click on your profile icon in the top-right corner to find:</p><ul class=\"list-disc pl-7 space-y-[--list-spacing-y] tight\" data-tight=\"true\"><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Profile settings (update your name, photo, etc.)</p></li><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Choose your timezone and preferred language for the interface</p></li><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Email notification preferences (what you want to be alerted about)</p></li><li class=\"not-prose space-y-2\"><p class=\"editor-paragraph-block\">Appearance settings (light/dark mode)<br></p></li></ul><p class=\"editor-paragraph-block\">Taking a few minutes to set things up just the way you like will make your everyday Plane experience much smoother!</p><div data-emoji-unicode=\"128278\" data-emoji-url=\"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/1f516.png\" data-logo-in-use=\"emoji\" data-background=\"green\" data-block-type=\"callout-component\"><p class=\"editor-paragraph-block\"><strong>Note:</strong> Some settings are only available to workspace or project admins. If you don't see certain options, you might need admin access.</p></div><p class=\"editor-paragraph-block\"></p><div class=\"py-4 border-custom-border-400\" data-type=\"horizontalRule\"><div></div></div><p class=\"editor-paragraph-block\"></p>",
|
||||
"description_stripped": "Now that you're getting familiar with Plane, let's explore how you can customize settings to make it work just right for you and your team!Workspace settingsRemember those workspace settings we mentioned when inviting team members? There's a lot more you can do there:Invite and manage workspace membersUpgrade plans and manage billingImport data from other toolsExport your dataManage integrationsProject SettingsEach project has its own settings where you can:Change project details and visibilityInvite specific members to just this projectCustomize your workflow States (like adding a \"Testing\" state)Create and organize LabelsEnable or disable features you need (or don't need)Your Profile SettingsYou can also customize your own personal experience! Click on your profile icon in the top-right corner to find:Profile settings (update your name, photo, etc.)Choose your timezone and preferred language for the interfaceEmail notification preferences (what you want to be alerted about)Appearance settings (light/dark mode)Taking a few minutes to set things up just the way you like will make your everyday Plane experience much smoother!Note: Some settings are only available to workspace or project admins. If you don't see certain options, you might need admin access.",
|
||||
"sort_order": 7000,
|
||||
"state_id": 1,
|
||||
"labels": [],
|
||||
"priority": "none",
|
||||
"project_id": 1
|
||||
}
|
||||
]
|
||||
@@ -1,16 +0,0 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"name": "admin",
|
||||
"color": "#0693e3",
|
||||
"sort_order": 85535,
|
||||
"project_id": 1
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "concepts",
|
||||
"color": "#9900ef",
|
||||
"sort_order": 95535,
|
||||
"project_id": 1
|
||||
}
|
||||
]
|
||||
@@ -1,17 +0,0 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"name": "Plane Demo Project",
|
||||
"identifier": "PDP",
|
||||
"description": "Welcome to the Plane Demo Project! This project throws you into the driver’s seat of Plane, work management software. Through curated work items, you’ll uncover key features, pick up best practices, and see how Plane can streamline your team’s workflow. Whether you’re a startup hungry to scale or an enterprise sharpening efficiency, this demo is your launchpad to mastering Plane. Jump in and see what it can do!",
|
||||
"network": 2,
|
||||
"cover_image": "https://images.unsplash.com/photo-1691230995681-480d86cbc135?auto=format&fit=crop&q=80&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&w=870&q=80",
|
||||
"logo_props": {
|
||||
"emoji": {
|
||||
"url": "https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/1f447.png",
|
||||
"value": "128071"
|
||||
},
|
||||
"in_use": "emoji"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -1,47 +0,0 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"name": "Backlog",
|
||||
"color": "#A3A3A3",
|
||||
"sequence": 15000,
|
||||
"group": "backlog",
|
||||
"default": true,
|
||||
"project_id": 1
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "Todo",
|
||||
"color": "#3A3A3A",
|
||||
"sequence": 25000,
|
||||
"group": "unstarted",
|
||||
"default": false,
|
||||
"project_id": 1
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "In Progress",
|
||||
"color": "#F59E0B",
|
||||
"sequence": 35000,
|
||||
"group": "started",
|
||||
"default": false,
|
||||
"project_id": 1
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"name": "Done",
|
||||
"color": "#16A34A",
|
||||
"sequence": 45000,
|
||||
"group": "completed",
|
||||
"default": false,
|
||||
"project_id": 1
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"name": "Cancelled",
|
||||
"color": "#EF4444",
|
||||
"sequence": 55000,
|
||||
"group": "cancelled",
|
||||
"default": false,
|
||||
"project_id": 1
|
||||
}
|
||||
]
|
||||
@@ -3,7 +3,7 @@
|
||||
# Python imports
|
||||
import os
|
||||
from urllib.parse import urlparse
|
||||
from urllib.parse import urljoin
|
||||
|
||||
|
||||
# Third party imports
|
||||
import dj_database_url
|
||||
@@ -13,10 +13,6 @@ from django.core.management.utils import get_random_secret_key
|
||||
from corsheaders.defaults import default_headers
|
||||
|
||||
|
||||
# Module imports
|
||||
from plane.utils.url import is_valid_url
|
||||
|
||||
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
# Secret Key
|
||||
@@ -62,7 +58,7 @@ MIDDLEWARE = [
|
||||
"django.middleware.clickjacking.XFrameOptionsMiddleware",
|
||||
"crum.CurrentRequestUserMiddleware",
|
||||
"django.middleware.gzip.GZipMiddleware",
|
||||
"plane.middleware.logger.APITokenLogMiddleware",
|
||||
"plane.middleware.api_log_middleware.APITokenLogMiddleware",
|
||||
"plane.middleware.logger.RequestLoggerMiddleware",
|
||||
]
|
||||
|
||||
@@ -314,35 +310,11 @@ CSRF_TRUSTED_ORIGINS = cors_allowed_origins
|
||||
CSRF_COOKIE_DOMAIN = os.environ.get("COOKIE_DOMAIN", None)
|
||||
CSRF_FAILURE_VIEW = "plane.authentication.views.common.csrf_failure"
|
||||
|
||||
###### Base URLs ######
|
||||
|
||||
# Admin Base URL
|
||||
# Base URLs
|
||||
ADMIN_BASE_URL = os.environ.get("ADMIN_BASE_URL", None)
|
||||
if ADMIN_BASE_URL and not is_valid_url(ADMIN_BASE_URL):
|
||||
ADMIN_BASE_URL = None
|
||||
ADMIN_BASE_PATH = os.environ.get("ADMIN_BASE_PATH", "/god-mode/")
|
||||
|
||||
# Space Base URL
|
||||
SPACE_BASE_URL = os.environ.get("SPACE_BASE_URL", None)
|
||||
if SPACE_BASE_URL and not is_valid_url(SPACE_BASE_URL):
|
||||
SPACE_BASE_URL = None
|
||||
SPACE_BASE_PATH = os.environ.get("SPACE_BASE_PATH", "/spaces/")
|
||||
|
||||
# App Base URL
|
||||
APP_BASE_URL = os.environ.get("APP_BASE_URL", None)
|
||||
if APP_BASE_URL and not is_valid_url(APP_BASE_URL):
|
||||
APP_BASE_URL = None
|
||||
APP_BASE_PATH = os.environ.get("APP_BASE_PATH", "/")
|
||||
|
||||
# Live Base URL
|
||||
LIVE_BASE_URL = os.environ.get("LIVE_BASE_URL", None)
|
||||
if LIVE_BASE_URL and not is_valid_url(LIVE_BASE_URL):
|
||||
LIVE_BASE_URL = None
|
||||
LIVE_BASE_PATH = os.environ.get("LIVE_BASE_PATH", "/live/")
|
||||
|
||||
LIVE_URL = urljoin(LIVE_BASE_URL, LIVE_BASE_PATH) if LIVE_BASE_URL else None
|
||||
|
||||
# WEB URL
|
||||
APP_BASE_URL = os.environ.get("APP_BASE_URL")
|
||||
LIVE_BASE_URL = os.environ.get("LIVE_BASE_URL")
|
||||
WEB_URL = os.environ.get("WEB_URL")
|
||||
|
||||
HARD_DELETE_AFTER_DAYS = int(os.environ.get("HARD_DELETE_AFTER_DAYS", 60))
|
||||
@@ -400,21 +372,9 @@ ATTACHMENT_MIME_TYPES = [
|
||||
"video/x-ms-wmv",
|
||||
# Archives
|
||||
"application/zip",
|
||||
"application/x-rar",
|
||||
"application/x-rar-compressed",
|
||||
"application/x-tar",
|
||||
"application/gzip",
|
||||
"application/x-zip",
|
||||
"application/x-zip-compressed",
|
||||
"application/x-7z-compressed",
|
||||
"application/x-compressed",
|
||||
"application/x-compressed-tar",
|
||||
"application/x-compressed-tar-gz",
|
||||
"application/x-compressed-tar-bz2",
|
||||
"application/x-compressed-tar-zip",
|
||||
"application/x-compressed-tar-7z",
|
||||
"application/x-compressed-tar-rar",
|
||||
"application/x-compressed-tar-zip",
|
||||
# 3D Models
|
||||
"model/gltf-binary",
|
||||
"model/gltf+json",
|
||||
@@ -431,11 +391,4 @@ ATTACHMENT_MIME_TYPES = [
|
||||
"text/xml",
|
||||
"text/csv",
|
||||
"application/xml",
|
||||
# SQL
|
||||
"application/x-sql",
|
||||
# Gzip
|
||||
"application/x-gzip",
|
||||
]
|
||||
|
||||
# Seed directory path
|
||||
SEED_DIR = os.path.join(BASE_DIR, "seeds")
|
||||
|
||||
@@ -56,11 +56,6 @@ LOGGING = {
|
||||
}
|
||||
},
|
||||
"loggers": {
|
||||
"plane.api.request": {
|
||||
"level": "INFO",
|
||||
"handlers": ["console"],
|
||||
"propagate": False,
|
||||
},
|
||||
"plane.api": {"level": "INFO", "handlers": ["console"], "propagate": False},
|
||||
"plane.worker": {"level": "INFO", "handlers": ["console"], "propagate": False},
|
||||
"plane.exception": {
|
||||
@@ -68,10 +63,5 @@ LOGGING = {
|
||||
"handlers": ["console"],
|
||||
"propagate": False,
|
||||
},
|
||||
"plane.external": {
|
||||
"level": "INFO",
|
||||
"handlers": ["console"],
|
||||
"propagate": False,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -58,11 +58,6 @@ LOGGING = {
|
||||
},
|
||||
},
|
||||
"loggers": {
|
||||
"plane.api.request": {
|
||||
"level": "DEBUG" if DEBUG else "INFO",
|
||||
"handlers": ["console"],
|
||||
"propagate": False,
|
||||
},
|
||||
"plane.api": {
|
||||
"level": "DEBUG" if DEBUG else "INFO",
|
||||
"handlers": ["console"],
|
||||
@@ -75,11 +70,6 @@ LOGGING = {
|
||||
},
|
||||
"plane.exception": {
|
||||
"level": "DEBUG" if DEBUG else "ERROR",
|
||||
"handlers": ["console", "file"],
|
||||
"propagate": False,
|
||||
},
|
||||
"plane.external": {
|
||||
"level": "INFO",
|
||||
"handlers": ["console"],
|
||||
"propagate": False,
|
||||
},
|
||||
|
||||
@@ -3,9 +3,6 @@ from django.contrib.postgres.aggregates import ArrayAgg
|
||||
from django.contrib.postgres.fields import ArrayField
|
||||
from django.db.models import Q, UUIDField, Value, F, Case, When, JSONField, CharField
|
||||
from django.db.models.functions import Coalesce, JSONObject, Concat
|
||||
from django.db.models import QuerySet
|
||||
|
||||
from typing import List, Optional, Dict, Any, Union
|
||||
|
||||
# Module imports
|
||||
from plane.db.models import (
|
||||
@@ -20,25 +17,13 @@ from plane.db.models import (
|
||||
)
|
||||
|
||||
|
||||
def issue_queryset_grouper(
|
||||
queryset: QuerySet[Issue], group_by: Optional[str], sub_group_by: Optional[str]
|
||||
) -> QuerySet[Issue]:
|
||||
def issue_queryset_grouper(queryset, group_by, sub_group_by):
|
||||
FIELD_MAPPER = {
|
||||
"label_ids": "labels__id",
|
||||
"assignee_ids": "assignees__id",
|
||||
"module_ids": "issue_module__module_id",
|
||||
}
|
||||
|
||||
GROUP_FILTER_MAPPER = {
|
||||
"assignees__id": Q(issue_assignee__deleted_at__isnull=True),
|
||||
"labels__id": Q(label_issue__deleted_at__isnull=True),
|
||||
"issue_module__module_id": Q(issue_module__deleted_at__isnull=True),
|
||||
}
|
||||
|
||||
for group_key in [group_by, sub_group_by]:
|
||||
if group_key in GROUP_FILTER_MAPPER:
|
||||
queryset = queryset.filter(GROUP_FILTER_MAPPER[group_key])
|
||||
|
||||
annotations_map = {
|
||||
"assignee_ids": (
|
||||
"assignees__id",
|
||||
@@ -65,9 +50,7 @@ def issue_queryset_grouper(
|
||||
return queryset.annotate(**default_annotations)
|
||||
|
||||
|
||||
def issue_on_results(
|
||||
issues: QuerySet[Issue], group_by: Optional[str], sub_group_by: Optional[str]
|
||||
) -> List[Dict[str, Any]]:
|
||||
def issue_on_results(issues, group_by, sub_group_by):
|
||||
FIELD_MAPPER = {
|
||||
"labels__id": "label_ids",
|
||||
"assignees__id": "assignee_ids",
|
||||
@@ -177,12 +160,7 @@ def issue_on_results(
|
||||
return issues
|
||||
|
||||
|
||||
def issue_group_values(
|
||||
field: str,
|
||||
slug: str,
|
||||
project_id: Optional[str] = None,
|
||||
filters: Dict[str, Any] = {},
|
||||
) -> List[Union[str, Any]]:
|
||||
def issue_group_values(field, slug, project_id=None, filters=dict):
|
||||
if field == "state_id":
|
||||
queryset = State.objects.filter(
|
||||
is_triage=False, workspace__slug=slug
|
||||
|
||||
@@ -96,7 +96,7 @@ class EntityAssetEndpoint(BaseAPIView):
|
||||
if type not in allowed_types:
|
||||
return Response(
|
||||
{
|
||||
"error": "Invalid file type. Only JPEG, PNG, WebP, JPG and GIF files are allowed.",
|
||||
"error": "Invalid file type. Only JPEG and PNG files are allowed.",
|
||||
"status": False,
|
||||
},
|
||||
status=status.HTTP_400_BAD_REQUEST,
|
||||
|
||||
@@ -21,7 +21,6 @@ from plane.app.serializers import (
|
||||
)
|
||||
from plane.utils.issue_filters import issue_filters
|
||||
from plane.bgtasks.issue_activities_task import issue_activity
|
||||
from plane.db.models.intake import SourceType
|
||||
|
||||
|
||||
class IntakeIssuePublicViewSet(BaseViewSet):
|
||||
@@ -157,7 +156,7 @@ class IntakeIssuePublicViewSet(BaseViewSet):
|
||||
intake_id=intake_id,
|
||||
project_id=project_deploy_board.project_id,
|
||||
issue=issue,
|
||||
source=SourceType.IN_APP,
|
||||
source=request.data.get("source", "IN-APP"),
|
||||
)
|
||||
|
||||
serializer = IssueStateIntakeSerializer(issue)
|
||||
|
||||
@@ -2,10 +2,12 @@
|
||||
|
||||
from django.conf import settings
|
||||
from django.urls import include, path, re_path
|
||||
from django.views.generic import TemplateView
|
||||
|
||||
handler404 = "plane.app.views.error_404.custom_404_view"
|
||||
|
||||
urlpatterns = [
|
||||
path("", TemplateView.as_view(template_name="index.html")),
|
||||
path("api/", include("plane.app.urls")),
|
||||
path("api/public/", include("plane.space.urls")),
|
||||
path("api/instances/", include("plane.license.urls")),
|
||||
|
||||
@@ -140,9 +140,7 @@ def burndown_plot(queryset, slug, project_id, plot_type, cycle_id=None, module_i
|
||||
# Get all dates between the two dates
|
||||
date_range = [
|
||||
(queryset.start_date + timedelta(days=x)).date()
|
||||
for x in range(
|
||||
(queryset.end_date.date() - queryset.start_date.date()).days + 1
|
||||
)
|
||||
for x in range((queryset.end_date - queryset.start_date).days + 1)
|
||||
]
|
||||
else:
|
||||
date_range = []
|
||||
@@ -182,9 +180,7 @@ def burndown_plot(queryset, slug, project_id, plot_type, cycle_id=None, module_i
|
||||
# Get all dates between the two dates
|
||||
date_range = [
|
||||
(queryset.start_date + timedelta(days=x))
|
||||
for x in range(
|
||||
(queryset.target_date - queryset.start_date).days + 1
|
||||
)
|
||||
for x in range((queryset.target_date - queryset.start_date).days + 1)
|
||||
]
|
||||
|
||||
chart_data = {str(date): 0 for date in date_range}
|
||||
|
||||
@@ -9,7 +9,7 @@ from django.conf import settings
|
||||
def log_exception(e):
|
||||
# Log the error
|
||||
logger = logging.getLogger("plane.exception")
|
||||
logger.exception(e)
|
||||
logger.error(str(e))
|
||||
|
||||
if settings.DEBUG:
|
||||
# Print the traceback if in debug mode
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Django imports
|
||||
from django.contrib.postgres.aggregates import ArrayAgg
|
||||
from django.contrib.postgres.fields import ArrayField
|
||||
from django.db.models import Q, UUIDField, Value, QuerySet
|
||||
from django.db.models import Q, UUIDField, Value
|
||||
from django.db.models.functions import Coalesce
|
||||
|
||||
# Module imports
|
||||
@@ -15,31 +15,16 @@ from plane.db.models import (
|
||||
State,
|
||||
WorkspaceMember,
|
||||
)
|
||||
from typing import Optional, Dict, Tuple, Any, Union, List
|
||||
|
||||
|
||||
def issue_queryset_grouper(
|
||||
queryset: QuerySet[Issue],
|
||||
group_by: Optional[str],
|
||||
sub_group_by: Optional[str],
|
||||
) -> QuerySet[Issue]:
|
||||
FIELD_MAPPER: Dict[str, str] = {
|
||||
def issue_queryset_grouper(queryset, group_by, sub_group_by):
|
||||
FIELD_MAPPER = {
|
||||
"label_ids": "labels__id",
|
||||
"assignee_ids": "assignees__id",
|
||||
"module_ids": "issue_module__module_id",
|
||||
}
|
||||
|
||||
GROUP_FILTER_MAPPER: Dict[str, Q] = {
|
||||
"assignees__id": Q(issue_assignee__deleted_at__isnull=True),
|
||||
"labels__id": Q(label_issue__deleted_at__isnull=True),
|
||||
"issue_module__module_id": Q(issue_module__deleted_at__isnull=True),
|
||||
}
|
||||
|
||||
for group_key in [group_by, sub_group_by]:
|
||||
if group_key in GROUP_FILTER_MAPPER:
|
||||
queryset = queryset.filter(GROUP_FILTER_MAPPER[group_key])
|
||||
|
||||
annotations_map: Dict[str, Tuple[str, Q]] = {
|
||||
annotations_map = {
|
||||
"assignee_ids": (
|
||||
"assignees__id",
|
||||
~Q(assignees__id__isnull=True) & Q(issue_assignee__deleted_at__isnull=True),
|
||||
@@ -57,8 +42,7 @@ def issue_queryset_grouper(
|
||||
),
|
||||
),
|
||||
}
|
||||
|
||||
default_annotations: Dict[str, Any] = {
|
||||
default_annotations = {
|
||||
key: Coalesce(
|
||||
ArrayAgg(field, distinct=True, filter=condition),
|
||||
Value([], output_field=ArrayField(UUIDField())),
|
||||
@@ -70,20 +54,16 @@ def issue_queryset_grouper(
|
||||
return queryset.annotate(**default_annotations)
|
||||
|
||||
|
||||
def issue_on_results(
|
||||
issues: QuerySet[Issue],
|
||||
group_by: Optional[str],
|
||||
sub_group_by: Optional[str],
|
||||
) -> List[Dict[str, Any]]:
|
||||
FIELD_MAPPER: Dict[str, str] = {
|
||||
def issue_on_results(issues, group_by, sub_group_by):
|
||||
FIELD_MAPPER = {
|
||||
"labels__id": "label_ids",
|
||||
"assignees__id": "assignee_ids",
|
||||
"issue_module__module_id": "module_ids",
|
||||
}
|
||||
|
||||
original_list: List[str] = ["assignee_ids", "label_ids", "module_ids"]
|
||||
original_list = ["assignee_ids", "label_ids", "module_ids"]
|
||||
|
||||
required_fields: List[str] = [
|
||||
required_fields = [
|
||||
"id",
|
||||
"name",
|
||||
"state_id",
|
||||
@@ -118,72 +98,62 @@ def issue_on_results(
|
||||
original_list.append(sub_group_by)
|
||||
|
||||
required_fields.extend(original_list)
|
||||
return list(issues.values(*required_fields))
|
||||
return issues.values(*required_fields)
|
||||
|
||||
|
||||
def issue_group_values(
|
||||
field: str,
|
||||
slug: str,
|
||||
project_id: Optional[str] = None,
|
||||
filters: Dict[str, Any] = {},
|
||||
) -> List[Union[str, Any]]:
|
||||
def issue_group_values(field, slug, project_id=None, filters=dict):
|
||||
if field == "state_id":
|
||||
queryset = State.objects.filter(
|
||||
is_triage=False, workspace__slug=slug
|
||||
).values_list("id", flat=True)
|
||||
if project_id:
|
||||
return list(queryset.filter(project_id=project_id))
|
||||
return list(queryset)
|
||||
|
||||
else:
|
||||
return list(queryset)
|
||||
if field == "labels__id":
|
||||
queryset = Label.objects.filter(workspace__slug=slug).values_list(
|
||||
"id", flat=True
|
||||
)
|
||||
if project_id:
|
||||
return list(queryset.filter(project_id=project_id)) + ["None"]
|
||||
return list(queryset) + ["None"]
|
||||
|
||||
else:
|
||||
return list(queryset) + ["None"]
|
||||
if field == "assignees__id":
|
||||
if project_id:
|
||||
return ProjectMember.objects.filter(
|
||||
workspace__slug=slug, project_id=project_id, is_active=True
|
||||
).values_list("member_id", flat=True)
|
||||
else:
|
||||
return list(
|
||||
ProjectMember.objects.filter(
|
||||
workspace__slug=slug, project_id=project_id, is_active=True
|
||||
WorkspaceMember.objects.filter(
|
||||
workspace__slug=slug, is_active=True
|
||||
).values_list("member_id", flat=True)
|
||||
)
|
||||
return list(
|
||||
WorkspaceMember.objects.filter(
|
||||
workspace__slug=slug, is_active=True
|
||||
).values_list("member_id", flat=True)
|
||||
)
|
||||
|
||||
if field == "issue_module__module_id":
|
||||
queryset = Module.objects.filter(workspace__slug=slug).values_list(
|
||||
"id", flat=True
|
||||
)
|
||||
if project_id:
|
||||
return list(queryset.filter(project_id=project_id)) + ["None"]
|
||||
return list(queryset) + ["None"]
|
||||
|
||||
else:
|
||||
return list(queryset) + ["None"]
|
||||
if field == "cycle_id":
|
||||
queryset = Cycle.objects.filter(workspace__slug=slug).values_list(
|
||||
"id", flat=True
|
||||
)
|
||||
if project_id:
|
||||
return list(queryset.filter(project_id=project_id)) + ["None"]
|
||||
return list(queryset) + ["None"]
|
||||
|
||||
else:
|
||||
return list(queryset) + ["None"]
|
||||
if field == "project_id":
|
||||
queryset = Project.objects.filter(workspace__slug=slug).values_list(
|
||||
"id", flat=True
|
||||
)
|
||||
return list(queryset)
|
||||
|
||||
if field == "priority":
|
||||
return ["low", "medium", "high", "urgent", "none"]
|
||||
|
||||
if field == "state__group":
|
||||
return ["backlog", "unstarted", "started", "completed", "cancelled"]
|
||||
|
||||
if field == "target_date":
|
||||
queryset = (
|
||||
Issue.issue_objects.filter(workspace__slug=slug)
|
||||
@@ -193,8 +163,8 @@ def issue_group_values(
|
||||
)
|
||||
if project_id:
|
||||
return list(queryset.filter(project_id=project_id))
|
||||
return list(queryset)
|
||||
|
||||
else:
|
||||
return list(queryset)
|
||||
if field == "start_date":
|
||||
queryset = (
|
||||
Issue.issue_objects.filter(workspace__slug=slug)
|
||||
@@ -204,7 +174,8 @@ def issue_group_values(
|
||||
)
|
||||
if project_id:
|
||||
return list(queryset.filter(project_id=project_id))
|
||||
return list(queryset)
|
||||
else:
|
||||
return list(queryset)
|
||||
|
||||
if field == "created_by":
|
||||
queryset = (
|
||||
@@ -215,6 +186,7 @@ def issue_group_values(
|
||||
)
|
||||
if project_id:
|
||||
return list(queryset.filter(project_id=project_id))
|
||||
return list(queryset)
|
||||
else:
|
||||
return list(queryset)
|
||||
|
||||
return []
|
||||
|
||||
@@ -9,13 +9,7 @@ from rest_framework.request import Request
|
||||
# Module imports
|
||||
from plane.utils.ip_address import get_client_ip
|
||||
|
||||
|
||||
def base_host(
|
||||
request: Request | HttpRequest,
|
||||
is_admin: bool = False,
|
||||
is_space: bool = False,
|
||||
is_app: bool = False,
|
||||
) -> str:
|
||||
def base_host(request: Request | HttpRequest, is_admin: bool = False, is_space: bool = False, is_app: bool = False) -> str:
|
||||
"""Utility function to return host / origin from the request"""
|
||||
# Calculate the base origin from request
|
||||
base_origin = settings.WEB_URL or settings.APP_BASE_URL
|
||||
@@ -23,31 +17,19 @@ def base_host(
|
||||
if not base_origin:
|
||||
raise ImproperlyConfigured("APP_BASE_URL or WEB_URL is not set")
|
||||
|
||||
# Admin redirection
|
||||
# Admin redirections
|
||||
if is_admin:
|
||||
admin_base_path = getattr(settings, "ADMIN_BASE_PATH", "/god-mode/")
|
||||
if not admin_base_path.startswith("/"):
|
||||
admin_base_path = "/" + admin_base_path
|
||||
if not admin_base_path.endswith("/"):
|
||||
admin_base_path += "/"
|
||||
|
||||
if settings.ADMIN_BASE_URL:
|
||||
return settings.ADMIN_BASE_URL + admin_base_path
|
||||
return settings.ADMIN_BASE_URL
|
||||
else:
|
||||
return base_origin + admin_base_path
|
||||
return base_origin + "/god-mode/"
|
||||
|
||||
# Space redirection
|
||||
# Space redirections
|
||||
if is_space:
|
||||
space_base_path = getattr(settings, "SPACE_BASE_PATH", "/spaces/")
|
||||
if not space_base_path.startswith("/"):
|
||||
space_base_path = "/" + space_base_path
|
||||
if not space_base_path.endswith("/"):
|
||||
space_base_path += "/"
|
||||
|
||||
if settings.SPACE_BASE_URL:
|
||||
return settings.SPACE_BASE_URL + space_base_path
|
||||
return settings.SPACE_BASE_URL
|
||||
else:
|
||||
return base_origin + space_base_path
|
||||
return base_origin + "/spaces/"
|
||||
|
||||
# App Redirection
|
||||
if is_app:
|
||||
|
||||
@@ -36,7 +36,7 @@ def user_timezone_converter(queryset, datetime_fields, user_timezone):
|
||||
|
||||
|
||||
def convert_to_utc(
|
||||
date, project_id, is_start_date=False
|
||||
date, project_id, is_start_date=False, is_start_date_end_date_equal=False
|
||||
):
|
||||
"""
|
||||
Converts a start date string to the project's local timezone at 12:00 AM
|
||||
@@ -82,8 +82,10 @@ def convert_to_utc(
|
||||
|
||||
return utc_datetime
|
||||
else:
|
||||
# the cycle end date is the last minute of the day
|
||||
localized_datetime += timedelta(hours=23, minutes=59, seconds=0)
|
||||
# If it's start an end date are equal, add 23 hours, 59 minutes, and 59 seconds
|
||||
# to make it the end of the day
|
||||
if is_start_date_end_date_equal:
|
||||
localized_datetime += timedelta(hours=23, minutes=59, seconds=59)
|
||||
|
||||
# Convert the localized datetime to UTC
|
||||
utc_datetime = localized_datetime.astimezone(pytz.utc)
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
# Python imports
|
||||
import re
|
||||
from typing import Optional
|
||||
from urllib.parse import urlparse, urlunparse
|
||||
|
||||
|
||||
def is_valid_url(url: str) -> bool:
|
||||
"""
|
||||
Validates whether the given string is a well-formed URL.
|
||||
|
||||
Args:
|
||||
url (str): The URL string to validate.
|
||||
|
||||
Returns:
|
||||
bool: True if the URL is valid, False otherwise.
|
||||
|
||||
Example:
|
||||
>>> is_valid_url("https://example.com")
|
||||
True
|
||||
>>> is_valid_url("not a url")
|
||||
False
|
||||
"""
|
||||
try:
|
||||
result = urlparse(url)
|
||||
# A valid URL should have at least scheme and netloc
|
||||
return all([result.scheme, result.netloc])
|
||||
except TypeError:
|
||||
return False
|
||||
|
||||
|
||||
def get_url_components(url: str) -> Optional[dict]:
|
||||
"""
|
||||
Parses the URL and returns its components if valid.
|
||||
|
||||
Args:
|
||||
url (str): The URL string to parse.
|
||||
|
||||
Returns:
|
||||
Optional[dict]: A dictionary with URL components if valid, None otherwise.
|
||||
|
||||
Example:
|
||||
>>> get_url_components("https://example.com/path?query=1")
|
||||
{'scheme': 'https', 'netloc': 'example.com', 'path': '/path', 'params': '', 'query': 'query=1', 'fragment': ''}
|
||||
"""
|
||||
if not is_valid_url(url):
|
||||
return None
|
||||
result = urlparse(url)
|
||||
return {
|
||||
"scheme": result.scheme,
|
||||
"netloc": result.netloc,
|
||||
"path": result.path,
|
||||
"params": result.params,
|
||||
"query": result.query,
|
||||
"fragment": result.fragment,
|
||||
}
|
||||
|
||||
|
||||
def normalize_url_path(url: str) -> str:
|
||||
"""
|
||||
Normalize the path component of a URL by replacing multiple consecutive slashes with a single slash.
|
||||
|
||||
This function preserves the protocol, domain, query parameters, and fragments of the URL,
|
||||
only modifying the path portion to ensure there are no duplicate slashes.
|
||||
|
||||
Args:
|
||||
url (str): The input URL string to normalize.
|
||||
|
||||
Returns:
|
||||
str: The normalized URL with redundant slashes in the path removed.
|
||||
|
||||
Example:
|
||||
>>> normalize_url_path('https://example.com//foo///bar//baz?x=1#frag')
|
||||
'https://example.com/foo/bar/baz?x=1#frag'
|
||||
"""
|
||||
parts = urlparse(url)
|
||||
# Normalize the path
|
||||
normalized_path = re.sub(r"/+", "/", parts.path)
|
||||
# Reconstruct the URL
|
||||
return urlunparse(parts._replace(path=normalized_path))
|
||||
@@ -1,4 +1,4 @@
|
||||
from django.urls import path
|
||||
from plane.web.views import robots_txt, health_check
|
||||
from django.views.generic import TemplateView
|
||||
|
||||
urlpatterns = [path("robots.txt", robots_txt), path("", health_check)]
|
||||
urlpatterns = [path("about/", TemplateView.as_view(template_name="about.html"))]
|
||||
|
||||
@@ -1,9 +1 @@
|
||||
from django.http import HttpResponse, JsonResponse
|
||||
|
||||
|
||||
def health_check(request):
|
||||
return JsonResponse({"status": "OK"})
|
||||
|
||||
|
||||
def robots_txt(request):
|
||||
return HttpResponse("User-agent: *\nDisallow: /", content_type="text/plain")
|
||||
# Create your views here.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# base requirements
|
||||
|
||||
# django
|
||||
Django==4.2.21
|
||||
Django==4.2.20
|
||||
# rest framework
|
||||
djangorestframework==3.15.2
|
||||
# postgres
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
|
||||
{% extends 'base.html' %}
|
||||
{% load static %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<h1>Hello from plane!</h1>
|
||||
<p>Made with Django</p>
|
||||
{% endblock content %}
|
||||
@@ -0,0 +1,5 @@
|
||||
{% extends 'base.html' %} {% load static %} {% block content %}
|
||||
<div class="container mt-5">
|
||||
<h1>Hello from plane!</h1>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
@@ -51,9 +51,10 @@ x-app-env: &app-env
|
||||
API_KEY_RATE_LIMIT: ${API_KEY_RATE_LIMIT:-60/minute}
|
||||
MINIO_ENDPOINT_SSL: ${MINIO_ENDPOINT_SSL:-0}
|
||||
|
||||
|
||||
services:
|
||||
web:
|
||||
image: artifacts.plane.so/makeplane/plane-frontend:${APP_RELEASE:-stable}
|
||||
image: ${DOCKERHUB_USER:-makeplane}/plane-frontend:${APP_RELEASE:-stable}
|
||||
command: node web/server.js web
|
||||
deploy:
|
||||
replicas: ${WEB_REPLICAS:-1}
|
||||
@@ -64,7 +65,7 @@ services:
|
||||
- worker
|
||||
|
||||
space:
|
||||
image: artifacts.plane.so/makeplane/plane-space:${APP_RELEASE:-stable}
|
||||
image: ${DOCKERHUB_USER:-makeplane}/plane-space:${APP_RELEASE:-stable}
|
||||
command: node space/server.js space
|
||||
deploy:
|
||||
replicas: ${SPACE_REPLICAS:-1}
|
||||
@@ -76,7 +77,7 @@ services:
|
||||
- web
|
||||
|
||||
admin:
|
||||
image: artifacts.plane.so/makeplane/plane-admin:${APP_RELEASE:-stable}
|
||||
image: ${DOCKERHUB_USER:-makeplane}/plane-admin:${APP_RELEASE:-stable}
|
||||
command: node admin/server.js admin
|
||||
deploy:
|
||||
replicas: ${ADMIN_REPLICAS:-1}
|
||||
@@ -87,7 +88,7 @@ services:
|
||||
- web
|
||||
|
||||
live:
|
||||
image: artifacts.plane.so/makeplane/plane-live:${APP_RELEASE:-stable}
|
||||
image: ${DOCKERHUB_USER:-makeplane}/plane-live:${APP_RELEASE:-stable}
|
||||
command: node live/dist/server.js live
|
||||
environment:
|
||||
<<: [*live-env]
|
||||
@@ -100,7 +101,7 @@ services:
|
||||
- web
|
||||
|
||||
api:
|
||||
image: artifacts.plane.so/makeplane/plane-backend:${APP_RELEASE:-stable}
|
||||
image: ${DOCKERHUB_USER:-makeplane}/plane-backend:${APP_RELEASE:-stable}
|
||||
command: ./bin/docker-entrypoint-api.sh
|
||||
deploy:
|
||||
replicas: ${API_REPLICAS:-1}
|
||||
@@ -116,7 +117,7 @@ services:
|
||||
- plane-mq
|
||||
|
||||
worker:
|
||||
image: artifacts.plane.so/makeplane/plane-backend:${APP_RELEASE:-stable}
|
||||
image: ${DOCKERHUB_USER:-makeplane}/plane-backend:${APP_RELEASE:-stable}
|
||||
command: ./bin/docker-entrypoint-worker.sh
|
||||
deploy:
|
||||
replicas: ${WORKER_REPLICAS:-1}
|
||||
@@ -133,7 +134,7 @@ services:
|
||||
- plane-mq
|
||||
|
||||
beat-worker:
|
||||
image: artifacts.plane.so/makeplane/plane-backend:${APP_RELEASE:-stable}
|
||||
image: ${DOCKERHUB_USER:-makeplane}/plane-backend:${APP_RELEASE:-stable}
|
||||
command: ./bin/docker-entrypoint-beat.sh
|
||||
deploy:
|
||||
replicas: ${BEAT_WORKER_REPLICAS:-1}
|
||||
@@ -150,7 +151,7 @@ services:
|
||||
- plane-mq
|
||||
|
||||
migrator:
|
||||
image: artifacts.plane.so/makeplane/plane-backend:${APP_RELEASE:-stable}
|
||||
image: ${DOCKERHUB_USER:-makeplane}/plane-backend:${APP_RELEASE:-stable}
|
||||
command: ./bin/docker-entrypoint-migrator.sh
|
||||
deploy:
|
||||
replicas: 1
|
||||
@@ -212,7 +213,7 @@ services:
|
||||
|
||||
# Comment this if you already have a reverse proxy running
|
||||
proxy:
|
||||
image: artifacts.plane.so/makeplane/plane-proxy:${APP_RELEASE:-stable}
|
||||
image: ${DOCKERHUB_USER:-makeplane}/plane-proxy:${APP_RELEASE:-stable}
|
||||
ports:
|
||||
- target: 80
|
||||
published: ${NGINX_PORT:-80}
|
||||
|
||||
@@ -5,7 +5,7 @@ SCRIPT_DIR=$PWD
|
||||
SERVICE_FOLDER=plane-app
|
||||
PLANE_INSTALL_DIR=$PWD/$SERVICE_FOLDER
|
||||
export APP_RELEASE=stable
|
||||
export DOCKERHUB_USER=artifacts.plane.so/makeplane
|
||||
export DOCKERHUB_USER=makeplane
|
||||
export PULL_POLICY=${PULL_POLICY:-if_not_present}
|
||||
export GH_REPO=makeplane/plane
|
||||
export RELEASE_DOWNLOAD_URL="https://github.com/$GH_REPO/releases/download"
|
||||
@@ -631,7 +631,7 @@ if [ -f "$DOCKER_ENV_PATH" ]; then
|
||||
CUSTOM_BUILD=$(getEnvValue "CUSTOM_BUILD" "$DOCKER_ENV_PATH")
|
||||
|
||||
if [ -z "$DOCKERHUB_USER" ]; then
|
||||
DOCKERHUB_USER=artifacts.plane.so/makeplane
|
||||
DOCKERHUB_USER=makeplane
|
||||
updateEnvFile "DOCKERHUB_USER" "$DOCKERHUB_USER" "$DOCKER_ENV_PATH"
|
||||
fi
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ SERVICE_FOLDER=plane-app
|
||||
SCRIPT_DIR=$PWD
|
||||
PLANE_INSTALL_DIR=$PWD/$SERVICE_FOLDER
|
||||
export APP_RELEASE="stable"
|
||||
export DOCKERHUB_USER=artifacts.plane.so/makeplane
|
||||
export DOCKERHUB_USER=makeplane
|
||||
|
||||
export GH_REPO=makeplane/plane
|
||||
export RELEASE_DOWNLOAD_URL="https://github.com/$GH_REPO/releases/download"
|
||||
@@ -596,7 +596,7 @@ if [ -f "$DOCKER_ENV_PATH" ]; then
|
||||
APP_RELEASE=$(getEnvValue "APP_RELEASE" "$DOCKER_ENV_PATH")
|
||||
|
||||
if [ -z "$DOCKERHUB_USER" ]; then
|
||||
DOCKERHUB_USER=artifacts.plane.so/makeplane
|
||||
DOCKERHUB_USER=makeplane
|
||||
updateEnvFile "DOCKERHUB_USER" "$DOCKERHUB_USER" "$DOCKER_ENV_PATH"
|
||||
fi
|
||||
|
||||
|
||||
@@ -60,4 +60,4 @@ GUNICORN_WORKERS=1
|
||||
MINIO_ENDPOINT_SSL=0
|
||||
|
||||
# API key rate limit
|
||||
API_KEY_RATE_LIMIT=60/minute
|
||||
API_KEY_RATE_LIMIT="60/minute"
|
||||
|
||||
+73
-91
@@ -6,8 +6,6 @@ services:
|
||||
- dev_env
|
||||
volumes:
|
||||
- redisdata:/data
|
||||
ports:
|
||||
- "6379:6379"
|
||||
|
||||
plane-mq:
|
||||
image: rabbitmq:3.13.6-management-alpine
|
||||
@@ -28,15 +26,7 @@ services:
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- dev_env
|
||||
entrypoint: >
|
||||
/bin/sh -c "
|
||||
mkdir -p /export/${AWS_S3_BUCKET_NAME} &&
|
||||
minio server /export --console-address ':9090' &
|
||||
sleep 5 &&
|
||||
mc alias set myminio http://localhost:9000 ${AWS_ACCESS_KEY_ID} ${AWS_SECRET_ACCESS_KEY} &&
|
||||
mc mb myminio/${AWS_S3_BUCKET_NAME} -p || true
|
||||
&& tail -f /dev/null
|
||||
"
|
||||
command: server /export --console-address ":9090"
|
||||
volumes:
|
||||
- uploads:/export
|
||||
env_file:
|
||||
@@ -44,9 +34,6 @@ services:
|
||||
environment:
|
||||
MINIO_ROOT_USER: ${AWS_ACCESS_KEY_ID}
|
||||
MINIO_ROOT_PASSWORD: ${AWS_SECRET_ACCESS_KEY}
|
||||
ports:
|
||||
- "9000:9000"
|
||||
- "9090:9090"
|
||||
|
||||
plane-db:
|
||||
image: postgres:15.7-alpine
|
||||
@@ -60,65 +47,63 @@ services:
|
||||
- .env
|
||||
environment:
|
||||
PGDATA: /var/lib/postgresql/data
|
||||
ports:
|
||||
- "5432:5432"
|
||||
|
||||
# web:
|
||||
# build:
|
||||
# context: .
|
||||
# dockerfile: ./web/Dockerfile.dev
|
||||
# restart: unless-stopped
|
||||
# networks:
|
||||
# - dev_env
|
||||
# volumes:
|
||||
# - ./web:/app/web
|
||||
# env_file:
|
||||
# - ./web/.env
|
||||
# depends_on:
|
||||
# - api
|
||||
# - worker
|
||||
web:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./web/Dockerfile.dev
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- dev_env
|
||||
volumes:
|
||||
- ./web:/app/web
|
||||
env_file:
|
||||
- ./web/.env
|
||||
depends_on:
|
||||
- api
|
||||
- worker
|
||||
|
||||
# space:
|
||||
# build:
|
||||
# context: .
|
||||
# dockerfile: ./space/Dockerfile.dev
|
||||
# restart: unless-stopped
|
||||
# networks:
|
||||
# - dev_env
|
||||
# volumes:
|
||||
# - ./space:/app/space
|
||||
# depends_on:
|
||||
# - api
|
||||
# - worker
|
||||
# - web
|
||||
space:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./space/Dockerfile.dev
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- dev_env
|
||||
volumes:
|
||||
- ./space:/app/space
|
||||
depends_on:
|
||||
- api
|
||||
- worker
|
||||
- web
|
||||
|
||||
# admin:
|
||||
# build:
|
||||
# context: .
|
||||
# dockerfile: ./admin/Dockerfile.dev
|
||||
# restart: unless-stopped
|
||||
# networks:
|
||||
# - dev_env
|
||||
# volumes:
|
||||
# - ./admin:/app/admin
|
||||
# depends_on:
|
||||
# - api
|
||||
# - worker
|
||||
# - web
|
||||
admin:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./admin/Dockerfile.dev
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- dev_env
|
||||
volumes:
|
||||
- ./admin:/app/admin
|
||||
depends_on:
|
||||
- api
|
||||
- worker
|
||||
- web
|
||||
|
||||
# live:
|
||||
# build:
|
||||
# context: .
|
||||
# dockerfile: ./live/Dockerfile.dev
|
||||
# restart: unless-stopped
|
||||
# networks:
|
||||
# - dev_env
|
||||
# volumes:
|
||||
# - ./live:/app/live
|
||||
# depends_on:
|
||||
# - api
|
||||
# - worker
|
||||
# - web
|
||||
live:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./live/Dockerfile.dev
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- dev_env
|
||||
volumes:
|
||||
- ./live:/app/live
|
||||
depends_on:
|
||||
- api
|
||||
- worker
|
||||
- web
|
||||
|
||||
api:
|
||||
build:
|
||||
@@ -137,9 +122,6 @@ services:
|
||||
depends_on:
|
||||
- plane-db
|
||||
- plane-redis
|
||||
- plane-mq
|
||||
ports:
|
||||
- "8000:8000"
|
||||
|
||||
worker:
|
||||
build:
|
||||
@@ -197,25 +179,25 @@ services:
|
||||
- plane-db
|
||||
- plane-redis
|
||||
|
||||
# proxy:
|
||||
# build:
|
||||
# context: ./nginx
|
||||
# dockerfile: Dockerfile.dev
|
||||
# restart: unless-stopped
|
||||
# networks:
|
||||
# - dev_env
|
||||
# ports:
|
||||
# - ${NGINX_PORT}:80
|
||||
# env_file:
|
||||
# - .env
|
||||
# environment:
|
||||
# FILE_SIZE_LIMIT: ${FILE_SIZE_LIMIT:-5242880}
|
||||
# BUCKET_NAME: ${AWS_S3_BUCKET_NAME:-uploads}
|
||||
# depends_on:
|
||||
# - api
|
||||
# - web
|
||||
# - space
|
||||
# - admin
|
||||
proxy:
|
||||
build:
|
||||
context: ./nginx
|
||||
dockerfile: Dockerfile.dev
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- dev_env
|
||||
ports:
|
||||
- ${NGINX_PORT}:80
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
FILE_SIZE_LIMIT: ${FILE_SIZE_LIMIT:-5242880}
|
||||
BUCKET_NAME: ${AWS_S3_BUCKET_NAME:-uploads}
|
||||
depends_on:
|
||||
- web
|
||||
- api
|
||||
- space
|
||||
- admin
|
||||
|
||||
volumes:
|
||||
redisdata:
|
||||
|
||||
+3
-8
@@ -1,13 +1,8 @@
|
||||
API_BASE_URL="http://localhost:8000"
|
||||
|
||||
WEB_BASE_URL="http://localhost:3000"
|
||||
|
||||
LIVE_BASE_URL="http://localhost:3100"
|
||||
API_BASE_URL="http://api:8000"
|
||||
LIVE_BASE_PATH="/live"
|
||||
|
||||
LIVE_SERVER_SECRET_KEY="secret-key"
|
||||
REDIS_URL="redis://plane-redis:6379/"
|
||||
|
||||
# If you prefer not to provide a Redis URL, you can set the REDIS_HOST and REDIS_PORT environment variables instead.
|
||||
REDIS_PORT=6379
|
||||
REDIS_HOST=localhost
|
||||
REDIS_URL="redis://localhost:6379/"
|
||||
REDIS_HOST=plane-redis
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "live",
|
||||
"version": "0.26.0",
|
||||
"version": "0.25.3",
|
||||
"license": "AGPL-3.0",
|
||||
"description": "A realtime collaborative server powers Plane's rich text editor",
|
||||
"main": "./src/server.ts",
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
"name": "plane",
|
||||
"description": "Open-source project management that unlocks customer value",
|
||||
"repository": "https://github.com/makeplane/plane.git",
|
||||
"version": "0.26.0",
|
||||
"version": "0.25.3",
|
||||
"license": "AGPL-3.0",
|
||||
"private": true,
|
||||
"workspaces": [
|
||||
@@ -24,7 +24,7 @@
|
||||
"devDependencies": {
|
||||
"prettier": "latest",
|
||||
"prettier-plugin-tailwindcss": "^0.5.4",
|
||||
"turbo": "^2.5.2"
|
||||
"turbo": "^2.4.2"
|
||||
},
|
||||
"resolutions": {
|
||||
"nanoid": "3.3.8",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@plane/constants",
|
||||
"version": "0.26.0",
|
||||
"version": "0.25.3",
|
||||
"private": true,
|
||||
"main": "./src/index.ts",
|
||||
"license": "AGPL-3.0"
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
export enum EIconSize {
|
||||
XS = "xs",
|
||||
SM = "sm",
|
||||
MD = "md",
|
||||
LG = "lg",
|
||||
XL = "xl",
|
||||
}
|
||||
@@ -32,4 +32,3 @@ export * from "./dashboard";
|
||||
export * from "./page";
|
||||
export * from "./emoji";
|
||||
export * from "./subscription";
|
||||
export * from "./icon";
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
import {
|
||||
TIssueGroupByOptions,
|
||||
TIssueOrderByOptions,
|
||||
IIssueDisplayProperties,
|
||||
IIssueFilterOptions,
|
||||
TIssue,
|
||||
} from "@plane/types";
|
||||
import { TIssueGroupByOptions, TIssueOrderByOptions, IIssueDisplayProperties } from "@plane/types";
|
||||
|
||||
export const ALL_ISSUES = "All Issues";
|
||||
|
||||
@@ -171,15 +165,6 @@ export const ISSUE_DISPLAY_PROPERTIES_KEYS: (keyof IIssueDisplayProperties)[] =
|
||||
"issue_type",
|
||||
];
|
||||
|
||||
export const SUB_ISSUES_DISPLAY_PROPERTIES_KEYS: (keyof IIssueDisplayProperties)[] = [
|
||||
"key",
|
||||
"assignee",
|
||||
"start_date",
|
||||
"due_date",
|
||||
"priority",
|
||||
"state",
|
||||
];
|
||||
|
||||
export const ISSUE_DISPLAY_PROPERTIES: {
|
||||
key: keyof IIssueDisplayProperties;
|
||||
titleTranslationKey: string;
|
||||
@@ -367,17 +352,3 @@ export const SPREADSHEET_PROPERTY_DETAILS: {
|
||||
icon: "LayersIcon",
|
||||
},
|
||||
};
|
||||
|
||||
// Map filter keys to their corresponding issue property keys
|
||||
export const FILTER_TO_ISSUE_MAP: Partial<Record<keyof IIssueFilterOptions, keyof TIssue>> = {
|
||||
assignees: "assignee_ids",
|
||||
created_by: "created_by",
|
||||
labels: "label_ids",
|
||||
priority: "priority",
|
||||
cycle: "cycle_id",
|
||||
module: "module_ids",
|
||||
project: "project_id",
|
||||
state: "state_id",
|
||||
issue_type: "type_id",
|
||||
state_group: "state__group",
|
||||
} as const;
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import { ILayoutDisplayFiltersOptions, TIssueActivityComment } from "@plane/types";
|
||||
import {
|
||||
ILayoutDisplayFiltersOptions,
|
||||
TIssueActivityComment,
|
||||
} from "@plane/types";
|
||||
import {
|
||||
TIssueFilterPriorityObject,
|
||||
ISSUE_DISPLAY_PROPERTIES_KEYS,
|
||||
EIssuesStoreType,
|
||||
SUB_ISSUES_DISPLAY_PROPERTIES_KEYS,
|
||||
} from "./common";
|
||||
|
||||
import { TIssueLayout } from "./layout";
|
||||
@@ -94,11 +96,23 @@ export type TIssueFiltersToDisplayByPageType = {
|
||||
export const ISSUE_DISPLAY_FILTERS_BY_PAGE: TIssueFiltersToDisplayByPageType = {
|
||||
profile_issues: {
|
||||
list: {
|
||||
filters: ["priority", "state_group", "labels", "start_date", "target_date"],
|
||||
filters: [
|
||||
"priority",
|
||||
"state_group",
|
||||
"labels",
|
||||
"start_date",
|
||||
"target_date",
|
||||
],
|
||||
display_properties: ISSUE_DISPLAY_PROPERTIES_KEYS,
|
||||
display_filters: {
|
||||
group_by: ["state_detail.group", "priority", "project", "labels", null],
|
||||
order_by: ["sort_order", "-created_at", "-updated_at", "start_date", "-priority"],
|
||||
order_by: [
|
||||
"sort_order",
|
||||
"-created_at",
|
||||
"-updated_at",
|
||||
"start_date",
|
||||
"-priority",
|
||||
],
|
||||
type: [null, "active", "backlog"],
|
||||
},
|
||||
extra_options: {
|
||||
@@ -107,11 +121,23 @@ export const ISSUE_DISPLAY_FILTERS_BY_PAGE: TIssueFiltersToDisplayByPageType = {
|
||||
},
|
||||
},
|
||||
kanban: {
|
||||
filters: ["priority", "state_group", "labels", "start_date", "target_date"],
|
||||
filters: [
|
||||
"priority",
|
||||
"state_group",
|
||||
"labels",
|
||||
"start_date",
|
||||
"target_date",
|
||||
],
|
||||
display_properties: ISSUE_DISPLAY_PROPERTIES_KEYS,
|
||||
display_filters: {
|
||||
group_by: ["state_detail.group", "priority", "project", "labels"],
|
||||
order_by: ["sort_order", "-created_at", "-updated_at", "start_date", "-priority"],
|
||||
order_by: [
|
||||
"sort_order",
|
||||
"-created_at",
|
||||
"-updated_at",
|
||||
"start_date",
|
||||
"-priority",
|
||||
],
|
||||
type: [null, "active", "backlog"],
|
||||
},
|
||||
extra_options: {
|
||||
@@ -147,7 +173,13 @@ export const ISSUE_DISPLAY_FILTERS_BY_PAGE: TIssueFiltersToDisplayByPageType = {
|
||||
"created_by",
|
||||
null,
|
||||
],
|
||||
order_by: ["sort_order", "-created_at", "-updated_at", "start_date", "-priority"],
|
||||
order_by: [
|
||||
"sort_order",
|
||||
"-created_at",
|
||||
"-updated_at",
|
||||
"start_date",
|
||||
"-priority",
|
||||
],
|
||||
type: [null, "active", "backlog"],
|
||||
},
|
||||
extra_options: {
|
||||
@@ -158,11 +190,34 @@ export const ISSUE_DISPLAY_FILTERS_BY_PAGE: TIssueFiltersToDisplayByPageType = {
|
||||
},
|
||||
draft_issues: {
|
||||
list: {
|
||||
filters: ["priority", "state_group", "cycle", "module", "labels", "start_date", "target_date", "issue_type"],
|
||||
filters: [
|
||||
"priority",
|
||||
"state_group",
|
||||
"cycle",
|
||||
"module",
|
||||
"labels",
|
||||
"start_date",
|
||||
"target_date",
|
||||
"issue_type",
|
||||
],
|
||||
display_properties: ISSUE_DISPLAY_PROPERTIES_KEYS,
|
||||
display_filters: {
|
||||
group_by: ["state_detail.group", "cycle", "module", "priority", "project", "labels", null],
|
||||
order_by: ["sort_order", "-created_at", "-updated_at", "start_date", "-priority"],
|
||||
group_by: [
|
||||
"state_detail.group",
|
||||
"cycle",
|
||||
"module",
|
||||
"priority",
|
||||
"project",
|
||||
"labels",
|
||||
null,
|
||||
],
|
||||
order_by: [
|
||||
"sort_order",
|
||||
"-created_at",
|
||||
"-updated_at",
|
||||
"start_date",
|
||||
"-priority",
|
||||
],
|
||||
type: [null, "active", "backlog"],
|
||||
},
|
||||
extra_options: {
|
||||
@@ -171,11 +226,33 @@ export const ISSUE_DISPLAY_FILTERS_BY_PAGE: TIssueFiltersToDisplayByPageType = {
|
||||
},
|
||||
},
|
||||
kanban: {
|
||||
filters: ["priority", "state_group", "cycle", "module", "labels", "start_date", "target_date", "issue_type"],
|
||||
filters: [
|
||||
"priority",
|
||||
"state_group",
|
||||
"cycle",
|
||||
"module",
|
||||
"labels",
|
||||
"start_date",
|
||||
"target_date",
|
||||
"issue_type",
|
||||
],
|
||||
display_properties: ISSUE_DISPLAY_PROPERTIES_KEYS,
|
||||
display_filters: {
|
||||
group_by: ["state_detail.group", "cycle", "module", "priority", "project", "labels"],
|
||||
order_by: ["sort_order", "-created_at", "-updated_at", "start_date", "-priority"],
|
||||
group_by: [
|
||||
"state_detail.group",
|
||||
"cycle",
|
||||
"module",
|
||||
"priority",
|
||||
"project",
|
||||
"labels",
|
||||
],
|
||||
order_by: [
|
||||
"sort_order",
|
||||
"-created_at",
|
||||
"-updated_at",
|
||||
"start_date",
|
||||
"-priority",
|
||||
],
|
||||
type: [null, "active", "backlog"],
|
||||
},
|
||||
extra_options: {
|
||||
@@ -246,8 +323,24 @@ export const ISSUE_DISPLAY_FILTERS_BY_PAGE: TIssueFiltersToDisplayByPageType = {
|
||||
],
|
||||
display_properties: ISSUE_DISPLAY_PROPERTIES_KEYS,
|
||||
display_filters: {
|
||||
group_by: ["state", "priority", "cycle", "module", "labels", "assignees", "created_by", null],
|
||||
order_by: ["sort_order", "-created_at", "-updated_at", "start_date", "-priority", "target_date"],
|
||||
group_by: [
|
||||
"state",
|
||||
"priority",
|
||||
"cycle",
|
||||
"module",
|
||||
"labels",
|
||||
"assignees",
|
||||
"created_by",
|
||||
null,
|
||||
],
|
||||
order_by: [
|
||||
"sort_order",
|
||||
"-created_at",
|
||||
"-updated_at",
|
||||
"start_date",
|
||||
"-priority",
|
||||
"target_date",
|
||||
],
|
||||
type: [null, "active", "backlog"],
|
||||
},
|
||||
extra_options: {
|
||||
@@ -271,9 +364,33 @@ export const ISSUE_DISPLAY_FILTERS_BY_PAGE: TIssueFiltersToDisplayByPageType = {
|
||||
],
|
||||
display_properties: ISSUE_DISPLAY_PROPERTIES_KEYS,
|
||||
display_filters: {
|
||||
group_by: ["state", "priority", "cycle", "module", "labels", "assignees", "created_by"],
|
||||
sub_group_by: ["state", "priority", "cycle", "module", "labels", "assignees", "created_by", null],
|
||||
order_by: ["sort_order", "-created_at", "-updated_at", "start_date", "-priority", "target_date"],
|
||||
group_by: [
|
||||
"state",
|
||||
"priority",
|
||||
"cycle",
|
||||
"module",
|
||||
"labels",
|
||||
"assignees",
|
||||
"created_by",
|
||||
],
|
||||
sub_group_by: [
|
||||
"state",
|
||||
"priority",
|
||||
"cycle",
|
||||
"module",
|
||||
"labels",
|
||||
"assignees",
|
||||
"created_by",
|
||||
null,
|
||||
],
|
||||
order_by: [
|
||||
"sort_order",
|
||||
"-created_at",
|
||||
"-updated_at",
|
||||
"start_date",
|
||||
"-priority",
|
||||
"target_date",
|
||||
],
|
||||
type: [null, "active", "backlog"],
|
||||
},
|
||||
extra_options: {
|
||||
@@ -319,7 +436,13 @@ export const ISSUE_DISPLAY_FILTERS_BY_PAGE: TIssueFiltersToDisplayByPageType = {
|
||||
],
|
||||
display_properties: ISSUE_DISPLAY_PROPERTIES_KEYS,
|
||||
display_filters: {
|
||||
order_by: ["sort_order", "-created_at", "-updated_at", "start_date", "-priority"],
|
||||
order_by: [
|
||||
"sort_order",
|
||||
"-created_at",
|
||||
"-updated_at",
|
||||
"start_date",
|
||||
"-priority",
|
||||
],
|
||||
type: [null, "active", "backlog"],
|
||||
},
|
||||
extra_options: {
|
||||
@@ -343,7 +466,13 @@ export const ISSUE_DISPLAY_FILTERS_BY_PAGE: TIssueFiltersToDisplayByPageType = {
|
||||
],
|
||||
display_properties: ["key", "issue_type"],
|
||||
display_filters: {
|
||||
order_by: ["sort_order", "-created_at", "-updated_at", "start_date", "-priority"],
|
||||
order_by: [
|
||||
"sort_order",
|
||||
"-created_at",
|
||||
"-updated_at",
|
||||
"start_date",
|
||||
"-priority",
|
||||
],
|
||||
type: [null, "active", "backlog"],
|
||||
},
|
||||
extra_options: {
|
||||
@@ -352,23 +481,11 @@ export const ISSUE_DISPLAY_FILTERS_BY_PAGE: TIssueFiltersToDisplayByPageType = {
|
||||
},
|
||||
},
|
||||
},
|
||||
sub_work_items: {
|
||||
list: {
|
||||
display_properties: SUB_ISSUES_DISPLAY_PROPERTIES_KEYS,
|
||||
filters: ["priority", "state", "project", "issue_type", "assignees", "start_date", "target_date"],
|
||||
display_filters: {
|
||||
order_by: ["-created_at", "-updated_at", "start_date", "-priority"],
|
||||
group_by: ["state", "priority", "assignees", null],
|
||||
},
|
||||
extra_options: {
|
||||
access: true,
|
||||
values: ["sub_issue"],
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const ISSUE_STORE_TO_FILTERS_MAP: Partial<Record<EIssuesStoreType, TFiltersByLayout>> = {
|
||||
export const ISSUE_STORE_TO_FILTERS_MAP: Partial<
|
||||
Record<EIssuesStoreType, TFiltersByLayout>
|
||||
> = {
|
||||
[EIssuesStoreType.PROJECT]: ISSUE_DISPLAY_FILTERS_BY_PAGE.issues,
|
||||
};
|
||||
|
||||
@@ -379,7 +496,10 @@ export enum EActivityFilterType {
|
||||
|
||||
export type TActivityFilters = EActivityFilterType;
|
||||
|
||||
export const ACTIVITY_FILTER_TYPE_OPTIONS: Record<TActivityFilters, { labelTranslationKey: string }> = {
|
||||
export const ACTIVITY_FILTER_TYPE_OPTIONS: Record<
|
||||
TActivityFilters,
|
||||
{ labelTranslationKey: string }
|
||||
> = {
|
||||
[EActivityFilterType.ACTIVITY]: {
|
||||
labelTranslationKey: "common.updates",
|
||||
},
|
||||
@@ -395,12 +515,17 @@ export type TActivityFilterOption = {
|
||||
onClick: () => void;
|
||||
};
|
||||
|
||||
export const defaultActivityFilters: TActivityFilters[] = [EActivityFilterType.ACTIVITY, EActivityFilterType.COMMENT];
|
||||
export const defaultActivityFilters: TActivityFilters[] = [
|
||||
EActivityFilterType.ACTIVITY,
|
||||
EActivityFilterType.COMMENT,
|
||||
];
|
||||
|
||||
export const filterActivityOnSelectedFilters = (
|
||||
activity: TIssueActivityComment[],
|
||||
filters: TActivityFilters[]
|
||||
): TIssueActivityComment[] =>
|
||||
activity.filter((activity) => filters.includes(activity.activity_type as TActivityFilters));
|
||||
activity.filter((activity) =>
|
||||
filters.includes(activity.activity_type as TActivityFilters)
|
||||
);
|
||||
|
||||
export const ENABLE_ISSUE_DEPENDENCIES = false;
|
||||
|
||||
@@ -17,15 +17,15 @@
|
||||
"lint:errors": "eslint src --ext .ts,.tsx --quiet"
|
||||
},
|
||||
"dependencies": {
|
||||
"express": "^4.21.2",
|
||||
"reflect-metadata": "^0.2.2"
|
||||
"reflect-metadata": "^0.2.2",
|
||||
"express": "^4.21.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@plane/eslint-config": "*",
|
||||
"@plane/typescript-config": "*",
|
||||
"@types/express": "^4.17.21",
|
||||
"@types/node": "^20.14.9",
|
||||
"@types/reflect-metadata": "^0.1.0",
|
||||
"@plane/typescript-config": "*",
|
||||
"@types/node": "^20.14.9",
|
||||
"@types/ws": "^8.5.10",
|
||||
"tsup": "8.4.0",
|
||||
"typescript": "^5.3.3"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@plane/editor",
|
||||
"version": "0.26.0",
|
||||
"version": "0.25.3",
|
||||
"description": "Core Editor that powers Plane",
|
||||
"license": "AGPL-3.0",
|
||||
"private": true,
|
||||
|
||||
@@ -233,9 +233,7 @@
|
||||
padding-left: var(--normal-content-margin);
|
||||
padding-right: var(--normal-content-margin);
|
||||
}
|
||||
}
|
||||
|
||||
@container page-content-container (max-width: 930px) {
|
||||
.page-summary-container {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@plane/eslint-config",
|
||||
"private": true,
|
||||
"version": "0.26.0",
|
||||
"version": "0.25.3",
|
||||
"license": "AGPL-3.0",
|
||||
"files": [
|
||||
"library.js",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@plane/hooks",
|
||||
"version": "0.26.0",
|
||||
"version": "0.25.3",
|
||||
"license": "AGPL-3.0",
|
||||
"description": "React hooks that are shared across multiple apps internally",
|
||||
"private": true,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@plane/i18n",
|
||||
"version": "0.26.0",
|
||||
"version": "0.25.3",
|
||||
"license": "AGPL-3.0",
|
||||
"description": "I18n shared across multiple apps internally",
|
||||
"private": true,
|
||||
|
||||
@@ -21,7 +21,6 @@ export const SUPPORTED_LANGUAGES: ILanguageOption[] = [
|
||||
{ label: "Indonesian", value: "id" },
|
||||
{ label: "Română", value: "ro" },
|
||||
{ label: "Tiếng việt", value: "vi-VN" },
|
||||
{ label: "Türkçe", value: "tr-TR" },
|
||||
];
|
||||
|
||||
export const LANGUAGE_STORAGE_KEY = "userLanguage";
|
||||
|
||||
@@ -348,7 +348,7 @@
|
||||
"couldnt_remove_the_project_from_favorites": "Nepodařilo se odstranit projekt z oblíbených. Zkuste to prosím znovu.",
|
||||
"add_to_favorites": "Přidat do oblíbených",
|
||||
"remove_from_favorites": "Odebrat z oblíbených",
|
||||
"publish_project": "Publikovat projekt",
|
||||
"publish_settings": "Nastavení publikování",
|
||||
"publish": "Publikovat",
|
||||
"copy_link": "Kopírovat odkaz",
|
||||
"leave_project": "Opustit projekt",
|
||||
@@ -365,12 +365,12 @@
|
||||
"work_management": "Správa práce",
|
||||
"projects_and_issues": "Projekty a pracovní položky",
|
||||
"projects_and_issues_description": "Aktivujte nebo deaktivujte tyto funkce v projektu.",
|
||||
"cycles_description": "Časově vymezte práci podle projektu a podle potřeby upravte období. Jeden cyklus může trvat 2 týdny, další jen 1 týden.",
|
||||
"modules_description": "Organizujte práci do podprojektů s vyhrazenými vedoucími a přiřazenými osobami.",
|
||||
"views_description": "Uložte vlastní řazení, filtry a možnosti zobrazení nebo je sdílejte se svým týmem.",
|
||||
"pages_description": "Vytvářejte a upravujte volně strukturovaný obsah – poznámky, dokumenty, cokoli.",
|
||||
"intake_description": "Umožněte nečlenům sdílet chyby, zpětnou vazbu a návrhy, aniž by narušili váš pracovní postup.",
|
||||
"time_tracking_description": "Zaznamenávejte čas strávený na pracovních položkách a projektech.",
|
||||
"cycles_description": "Časově ohraničte práci podle potřeby a měňte frekvenci mezi obdobími.",
|
||||
"modules_description": "Seskupujte práci do podobných podprojektů s vlastními vedoucími a přiřazenými osobami.",
|
||||
"views_description": "Uložte řazení, filtry a zobrazovací možnosti pro pozdější použití nebo sdílení.",
|
||||
"pages_description": "Pište cokoli, jako obvykle.",
|
||||
"intake_description": "Zůstaňte v obraze u pracovních položek, které odebíráte. Aktivujte toto pro zasílání oznámení.",
|
||||
"time_tracking_description": "Sledujte čas strávený na pracovních položkách a projektech.",
|
||||
"work_management_description": "Spravujte svou práci a projekty snadno.",
|
||||
"documentation": "Dokumentace",
|
||||
"message_support": "Kontaktovat podporu",
|
||||
@@ -500,6 +500,7 @@
|
||||
"export": "Exportovat",
|
||||
"member": "{count, plural, one{# člen} few{# členové} other{# členů}}",
|
||||
"new_password_must_be_different_from_old_password": "Nové heslo musí být odlišné od starého hesla",
|
||||
|
||||
"project_view": {
|
||||
"sort_by": {
|
||||
"created_at": "Vytvořeno dne",
|
||||
@@ -507,10 +508,12 @@
|
||||
"name": "Název"
|
||||
}
|
||||
},
|
||||
|
||||
"toast": {
|
||||
"success": "Úspěch!",
|
||||
"error": "Chyba!"
|
||||
},
|
||||
|
||||
"links": {
|
||||
"toasts": {
|
||||
"created": {
|
||||
@@ -539,6 +542,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"home": {
|
||||
"empty": {
|
||||
"quickstart_guide": "Váš průvodce rychlým startem",
|
||||
@@ -606,6 +610,7 @@
|
||||
"title": "Domů",
|
||||
"star_us_on_github": "Ohodnoťte nás na GitHubu"
|
||||
},
|
||||
|
||||
"link": {
|
||||
"modal": {
|
||||
"url": {
|
||||
@@ -619,6 +624,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"common": {
|
||||
"all": "Vše",
|
||||
"states": "Stavy",
|
||||
@@ -862,21 +868,22 @@
|
||||
"pending": "Čekající",
|
||||
"invite": "Pozvat",
|
||||
"view": "Pohled",
|
||||
"deactivated_user": "Deaktivovaný uživatel",
|
||||
"apply": "Použít",
|
||||
"applying": "Používání"
|
||||
"deactivated_user": "Deaktivovaný uživatel"
|
||||
},
|
||||
|
||||
"chart": {
|
||||
"x_axis": "Osa X",
|
||||
"y_axis": "Osa Y",
|
||||
"metric": "Metrika"
|
||||
},
|
||||
|
||||
"form": {
|
||||
"title": {
|
||||
"required": "Název je povinný",
|
||||
"max_length": "Název by měl být kratší než {length} znaků"
|
||||
}
|
||||
},
|
||||
|
||||
"entity": {
|
||||
"grouping_title": "Seskupení {entity}",
|
||||
"priority": "Priorita {entity}",
|
||||
@@ -900,6 +907,7 @@
|
||||
"failed": "Chyba při přidávání {entity}"
|
||||
}
|
||||
},
|
||||
|
||||
"epic": {
|
||||
"all": "Všechny epiky",
|
||||
"label": "{count, plural, one {Epik} other {Epiky}}",
|
||||
@@ -917,6 +925,7 @@
|
||||
"required": "Název epiku je povinný."
|
||||
}
|
||||
},
|
||||
|
||||
"issue": {
|
||||
"label": "{count, plural, one {Pracovní položka} few {Pracovní položky} other {Pracovních položek}}",
|
||||
"all": "Všechny pracovní položky",
|
||||
@@ -1083,6 +1092,7 @@
|
||||
},
|
||||
"open_in_full_screen": "Otevřít pracovní položku na celou obrazovku"
|
||||
},
|
||||
|
||||
"attachment": {
|
||||
"error": "Soubor nelze připojit. Zkuste to prosím znovu.",
|
||||
"only_one_file_allowed": "Je možné nahrát pouze jeden soubor najednou.",
|
||||
@@ -1090,6 +1100,7 @@
|
||||
"drag_and_drop": "Přetáhněte soubor kamkoli pro nahrání",
|
||||
"delete": "Smazat přílohu"
|
||||
},
|
||||
|
||||
"label": {
|
||||
"select": "Vybrat štítek",
|
||||
"create": {
|
||||
@@ -1099,6 +1110,7 @@
|
||||
"type": "Zadejte pro vytvoření nového štítku"
|
||||
}
|
||||
},
|
||||
|
||||
"sub_work_item": {
|
||||
"update": {
|
||||
"success": "Podřízená pracovní položka úspěšně aktualizována",
|
||||
@@ -1109,6 +1121,7 @@
|
||||
"error": "Chyba při odebírání podřízené položky"
|
||||
}
|
||||
},
|
||||
|
||||
"view": {
|
||||
"label": "{count, plural, one {Pohled} few {Pohledy} other {Pohledů}}",
|
||||
"create": {
|
||||
@@ -1118,6 +1131,7 @@
|
||||
"label": "Aktualizovat pohled"
|
||||
}
|
||||
},
|
||||
|
||||
"inbox_issue": {
|
||||
"status": {
|
||||
"pending": {
|
||||
@@ -1203,6 +1217,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"workspace_creation": {
|
||||
"heading": "Vytvořte si pracovní prostor",
|
||||
"subheading": "Pro používání Plane musíte vytvořit nebo se připojit k pracovnímu prostoru.",
|
||||
@@ -1254,6 +1269,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"workspace_dashboard": {
|
||||
"empty_state": {
|
||||
"general": {
|
||||
@@ -1269,6 +1285,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"workspace_analytics": {
|
||||
"label": "Analytika",
|
||||
"page_label": "{workspace} - Analytika",
|
||||
@@ -1313,6 +1330,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"workspace_projects": {
|
||||
"label": "{count, plural, one {Projekt} few {Projekty} other {Projektů}}",
|
||||
"create": {
|
||||
@@ -1387,6 +1405,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"workspace_views": {
|
||||
"add_view": "Přidat pohled",
|
||||
"empty_state": {
|
||||
@@ -1421,6 +1440,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"workspace_settings": {
|
||||
"label": "Nastavení pracovního prostoru",
|
||||
"page_label": "{workspace} - Obecná nastavení",
|
||||
@@ -1602,6 +1622,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"profile": {
|
||||
"label": "Profil",
|
||||
"page_label": "Vaše práce",
|
||||
@@ -1664,6 +1685,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"project_settings": {
|
||||
"general": {
|
||||
"enter_project_id": "Zadejte ID projektu",
|
||||
@@ -1809,6 +1831,7 @@
|
||||
"auto_close_status": "Stav automatického uzavření"
|
||||
}
|
||||
},
|
||||
|
||||
"empty_state": {
|
||||
"labels": {
|
||||
"title": "Zatím žádné štítky",
|
||||
@@ -1821,6 +1844,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"project_cycles": {
|
||||
"add_cycle": "Přidat cyklus",
|
||||
"more_details": "Více detailů",
|
||||
@@ -1946,6 +1970,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"project_issues": {
|
||||
"empty_state": {
|
||||
"no_issues": {
|
||||
@@ -1974,6 +1999,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"project_module": {
|
||||
"add_module": "Přidat modul",
|
||||
"update_module": "Aktualizovat modul",
|
||||
@@ -2027,6 +2053,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"project_views": {
|
||||
"empty_state": {
|
||||
"general": {
|
||||
@@ -2046,6 +2073,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"project_page": {
|
||||
"empty_state": {
|
||||
"general": {
|
||||
@@ -2075,6 +2103,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"command_k": {
|
||||
"empty_state": {
|
||||
"search": {
|
||||
@@ -2082,6 +2111,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"issue_relation": {
|
||||
"empty_state": {
|
||||
"search": {
|
||||
@@ -2092,6 +2122,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"issue_comment": {
|
||||
"empty_state": {
|
||||
"general": {
|
||||
@@ -2100,6 +2131,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"notification": {
|
||||
"label": "Schránka",
|
||||
"page_label": "{workspace} - Schránka",
|
||||
@@ -2156,6 +2188,7 @@
|
||||
"custom": "Vlastní"
|
||||
}
|
||||
},
|
||||
|
||||
"active_cycle": {
|
||||
"empty_state": {
|
||||
"progress": {
|
||||
@@ -2175,6 +2208,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"disabled_project": {
|
||||
"empty_state": {
|
||||
"inbox": {
|
||||
@@ -2237,6 +2271,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"stickies": {
|
||||
"title": "Vaše poznámky",
|
||||
"placeholder": "kliknutím začněte psát",
|
||||
@@ -2294,6 +2329,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"role_details": {
|
||||
"guest": {
|
||||
"title": "Host",
|
||||
@@ -2308,6 +2344,7 @@
|
||||
"description": "Má všechna oprávnění v prostoru."
|
||||
}
|
||||
},
|
||||
|
||||
"user_roles": {
|
||||
"product_or_project_manager": "Produktový/Projektový manažer",
|
||||
"development_or_engineering": "Vývoj/Inženýrství",
|
||||
@@ -2320,6 +2357,7 @@
|
||||
"human_resources": "Lidské zdroje",
|
||||
"other": "Jiné"
|
||||
},
|
||||
|
||||
"importer": {
|
||||
"github": {
|
||||
"title": "GitHub",
|
||||
@@ -2330,6 +2368,7 @@
|
||||
"description": "Importujte položky a epiky z Jira."
|
||||
}
|
||||
},
|
||||
|
||||
"exporter": {
|
||||
"csv": {
|
||||
"title": "CSV",
|
||||
@@ -2358,6 +2397,7 @@
|
||||
"created": "Vytvořeno",
|
||||
"subscribed": "Odebíráno"
|
||||
},
|
||||
|
||||
"themes": {
|
||||
"theme_options": {
|
||||
"system_preference": {
|
||||
@@ -2403,17 +2443,20 @@
|
||||
"manual": "Ručně"
|
||||
}
|
||||
},
|
||||
|
||||
"cycle": {
|
||||
"label": "{count, plural, one {Cyklus} few {Cykly} other {Cyklů}}",
|
||||
"no_cycle": "Žádný cyklus"
|
||||
},
|
||||
|
||||
"module": {
|
||||
"label": "{count, plural, one {Modul} few {Moduly} other {Modulů}}",
|
||||
"no_module": "Žádný modul"
|
||||
},
|
||||
|
||||
"description_versions": {
|
||||
"last_edited_by": "Naposledy upraveno uživatelem",
|
||||
"previously_edited_by": "Dříve upraveno uživatelem",
|
||||
"edited_by": "Upraveno uživatelem"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -348,7 +348,7 @@
|
||||
"couldnt_remove_the_project_from_favorites": "Projekt konnte nicht aus den Favoriten entfernt werden. Bitte versuchen Sie es erneut.",
|
||||
"add_to_favorites": "Zu Favoriten hinzufügen",
|
||||
"remove_from_favorites": "Aus Favoriten entfernen",
|
||||
"publish_project": "Projekt veröffentlichen",
|
||||
"publish_settings": "Veröffentlichungseinstellungen",
|
||||
"publish": "Veröffentlichen",
|
||||
"copy_link": "Link kopieren",
|
||||
"leave_project": "Projekt verlassen",
|
||||
@@ -365,11 +365,11 @@
|
||||
"work_management": "Arbeitsverwaltung",
|
||||
"projects_and_issues": "Projekte und Arbeitselemente",
|
||||
"projects_and_issues_description": "Aktivieren oder deaktivieren Sie diese Funktionen im Projekt.",
|
||||
"cycles_description": "Zeitlich begrenzen Sie die Arbeit pro Projekt und passen Sie den Zeitraum bei Bedarf an. Ein Zyklus kann 2 Wochen dauern, der nächste nur 1 Woche.",
|
||||
"modules_description": "Organisieren Sie die Arbeit in Unterprojekte mit eigenen Leitern und Zuständigen.",
|
||||
"views_description": "Speichern Sie benutzerdefinierte Sortierungen, Filter und Anzeigeoptionen oder teilen Sie sie mit Ihrem Team.",
|
||||
"pages_description": "Erstellen und bearbeiten Sie frei formulierte Inhalte – Notizen, Dokumente, alles Mögliche.",
|
||||
"intake_description": "Erlauben Sie Nicht-Mitgliedern, Bugs, Feedback und Vorschläge zu teilen – ohne Ihren Arbeitsablauf zu stören.",
|
||||
"cycles_description": "Begrenzen Sie die Arbeit zeitlich bei Bedarf und ändern Sie die Häufigkeit zwischen Zeiträumen.",
|
||||
"modules_description": "Gruppieren Sie die Arbeit in ähnliche Unterprojekte mit eigenen Leitern und zugewiesenen Personen.",
|
||||
"views_description": "Speichern Sie Sortierungen, Filter und Anzeigeoptionen für die spätere Verwendung oder zum Teilen.",
|
||||
"pages_description": "Schreiben Sie alles Mögliche, wie gewohnt.",
|
||||
"intake_description": "Bleiben Sie über abonnierte Arbeitselemente informiert. Aktivieren Sie diese Option, um Benachrichtigungen zu erhalten.",
|
||||
"time_tracking_description": "Erfassen Sie die auf Arbeitselemente und Projekte verwendete Zeit.",
|
||||
"work_management_description": "Verwalten Sie Ihre Arbeit und Projekte mühelos.",
|
||||
"documentation": "Dokumentation",
|
||||
@@ -500,6 +500,7 @@
|
||||
"export": "Exportieren",
|
||||
"member": "{count, plural, one{# Mitglied} few{# Mitglieder} other{# Mitglieder}}",
|
||||
"new_password_must_be_different_from_old_password": "Das neue Passwort muss von dem alten Passwort abweichen",
|
||||
|
||||
"project_view": {
|
||||
"sort_by": {
|
||||
"created_at": "Erstellt am",
|
||||
@@ -862,9 +863,7 @@
|
||||
"pending": "Ausstehend",
|
||||
"invite": "Einladen",
|
||||
"view": "Ansicht",
|
||||
"deactivated_user": "Deaktivierter Benutzer",
|
||||
"apply": "Anwenden",
|
||||
"applying": "Wird angewendet"
|
||||
"deactivated_user": "Deaktivierter Benutzer"
|
||||
},
|
||||
"chart": {
|
||||
"x_axis": "X-Achse",
|
||||
@@ -2402,17 +2401,20 @@
|
||||
"manual": "Manuell"
|
||||
}
|
||||
},
|
||||
|
||||
"cycle": {
|
||||
"label": "{count, plural, one {Zyklus} few {Zyklen} other {Zyklen}}",
|
||||
"no_cycle": "Kein Zyklus"
|
||||
},
|
||||
|
||||
"module": {
|
||||
"label": "{count, plural, one {Modul} few {Module} other {Module}}",
|
||||
"no_module": "Kein Modul"
|
||||
},
|
||||
|
||||
"description_versions": {
|
||||
"last_edited_by": "Zuletzt bearbeitet von",
|
||||
"previously_edited_by": "Zuvor bearbeitet von",
|
||||
"edited_by": "Bearbeitet von"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
"couldnt_remove_the_project_from_favorites": "Couldn't remove the project from favorites. Please try again.",
|
||||
"add_to_favorites": "Add to favorites",
|
||||
"remove_from_favorites": "Remove from favorites",
|
||||
"publish_project": "Publish project",
|
||||
"publish_settings": "Publish settings",
|
||||
"publish": "Publish",
|
||||
"copy_link": "Copy link",
|
||||
"leave_project": "Leave project",
|
||||
@@ -197,12 +197,12 @@
|
||||
"work_management": "Work management",
|
||||
"projects_and_issues": "Projects and work items",
|
||||
"projects_and_issues_description": "Toggle these on or off this project.",
|
||||
"cycles_description": "Timebox work per project and adjust the time period as needed. One cycle can be 2 weeks, the next 1 week.",
|
||||
"modules_description": "Organize work into sub-projects with dedicated leads and assignees.",
|
||||
"views_description": "Save custom sorts, filters, and display options or share them with your team.",
|
||||
"pages_description": "Create and edit free-form content; notes, docs, anything.",
|
||||
"intake_description": "Let non-members share bugs, feedback, and suggestions; without disrupting your workflow.",
|
||||
"time_tracking_description": "Log time spent on work items and projects.",
|
||||
"cycles_description": "Timebox work as you see fit per project and change frequency from one period to the next.",
|
||||
"modules_description": "Group work into sub-project-like set-ups with their own leads and assignees.",
|
||||
"views_description": "Save sorts, filters, and display options for later or share them.",
|
||||
"pages_description": "Write anything like you write anything.",
|
||||
"intake_description": "Stay in the loop on Work items you are subscribed to. Enable this to get notified.",
|
||||
"time_tracking_description": "Track time spent on work items and projects.",
|
||||
"work_management_description": "Manage your work and projects with ease.",
|
||||
"documentation": "Documentation",
|
||||
"message_support": "Message support",
|
||||
@@ -334,6 +334,7 @@
|
||||
"new_password_must_be_different_from_old_password": "New password must be different from old password",
|
||||
"edited": "edited",
|
||||
"bot": "Bot",
|
||||
|
||||
"project_view": {
|
||||
"sort_by": {
|
||||
"created_at": "Created at",
|
||||
@@ -341,10 +342,12 @@
|
||||
"name": "Name"
|
||||
}
|
||||
},
|
||||
|
||||
"toast": {
|
||||
"success": "Success!",
|
||||
"error": "Error!"
|
||||
},
|
||||
|
||||
"links": {
|
||||
"toasts": {
|
||||
"created": {
|
||||
@@ -373,6 +376,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"home": {
|
||||
"empty": {
|
||||
"quickstart_guide": "Your quickstart guide",
|
||||
@@ -440,6 +444,7 @@
|
||||
"title": "Home",
|
||||
"star_us_on_github": "Star us on GitHub"
|
||||
},
|
||||
|
||||
"link": {
|
||||
"modal": {
|
||||
"url": {
|
||||
@@ -453,6 +458,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"common": {
|
||||
"all": "All",
|
||||
"states": "States",
|
||||
@@ -697,21 +703,22 @@
|
||||
"pending": "Pending",
|
||||
"invite": "Invite",
|
||||
"view": "View",
|
||||
"deactivated_user": "Deactivated user",
|
||||
"apply": "Apply",
|
||||
"applying": "Applying"
|
||||
"deactivated_user": "Deactivated user"
|
||||
},
|
||||
|
||||
"chart": {
|
||||
"x_axis": "X-axis",
|
||||
"y_axis": "Y-axis",
|
||||
"metric": "Metric"
|
||||
},
|
||||
|
||||
"form": {
|
||||
"title": {
|
||||
"required": "Title is required",
|
||||
"max_length": "Title should be less than {length} characters"
|
||||
}
|
||||
},
|
||||
|
||||
"entity": {
|
||||
"grouping_title": "{entity} Grouping",
|
||||
"priority": "{entity} Priority",
|
||||
@@ -735,6 +742,7 @@
|
||||
"failed": "Error adding {entity}"
|
||||
}
|
||||
},
|
||||
|
||||
"epic": {
|
||||
"all": "All Epics",
|
||||
"label": "{count, plural, one {Epic} other {Epics}}",
|
||||
@@ -752,6 +760,7 @@
|
||||
"required": "Epic title is required."
|
||||
}
|
||||
},
|
||||
|
||||
"issue": {
|
||||
"label": "{count, plural, one {Work item} other {Work items}}",
|
||||
"all": "All Work items",
|
||||
@@ -918,6 +927,7 @@
|
||||
},
|
||||
"open_in_full_screen": "Open work item in full screen"
|
||||
},
|
||||
|
||||
"attachment": {
|
||||
"error": "File could not be attached. Try uploading again.",
|
||||
"only_one_file_allowed": "Only one file can be uploaded at a time.",
|
||||
@@ -925,6 +935,7 @@
|
||||
"drag_and_drop": "Drag and drop anywhere to upload",
|
||||
"delete": "Delete attachment"
|
||||
},
|
||||
|
||||
"label": {
|
||||
"select": "Select label",
|
||||
"create": {
|
||||
@@ -934,6 +945,7 @@
|
||||
"type": "Type to add a new label"
|
||||
}
|
||||
},
|
||||
|
||||
"sub_work_item": {
|
||||
"update": {
|
||||
"success": "Sub-work item updated successfully",
|
||||
@@ -944,6 +956,7 @@
|
||||
"error": "Error removing sub-work item"
|
||||
}
|
||||
},
|
||||
|
||||
"view": {
|
||||
"label": "{count, plural, one {View} other {Views}}",
|
||||
"create": {
|
||||
@@ -953,6 +966,7 @@
|
||||
"label": "Update View"
|
||||
}
|
||||
},
|
||||
|
||||
"inbox_issue": {
|
||||
"status": {
|
||||
"pending": {
|
||||
@@ -1038,6 +1052,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"workspace_creation": {
|
||||
"heading": "Create your workspace",
|
||||
"subheading": "To start using Plane, you need to create or join a workspace.",
|
||||
@@ -1089,6 +1104,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"workspace_dashboard": {
|
||||
"empty_state": {
|
||||
"general": {
|
||||
@@ -1104,6 +1120,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"workspace_analytics": {
|
||||
"label": "Analytics",
|
||||
"page_label": "{workspace} - Analytics",
|
||||
@@ -1148,6 +1165,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"workspace_projects": {
|
||||
"label": "{count, plural, one {Project} other {Projects}}",
|
||||
"create": {
|
||||
@@ -1222,6 +1240,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"workspace_views": {
|
||||
"add_view": "Add view",
|
||||
"empty_state": {
|
||||
@@ -1256,6 +1275,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"workspace_settings": {
|
||||
"label": "Workspace settings",
|
||||
"page_label": "{workspace} - General settings",
|
||||
@@ -1437,6 +1457,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"profile": {
|
||||
"label": "Profile",
|
||||
"page_label": "Your work",
|
||||
@@ -1499,6 +1520,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"project_settings": {
|
||||
"general": {
|
||||
"enter_project_id": "Enter project ID",
|
||||
@@ -1644,6 +1666,7 @@
|
||||
"auto_close_status": "Auto-close status"
|
||||
}
|
||||
},
|
||||
|
||||
"empty_state": {
|
||||
"labels": {
|
||||
"title": "No labels yet",
|
||||
@@ -1656,6 +1679,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"project_cycles": {
|
||||
"add_cycle": "Add cycle",
|
||||
"more_details": "More details",
|
||||
@@ -1781,6 +1805,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"project_issues": {
|
||||
"empty_state": {
|
||||
"no_issues": {
|
||||
@@ -1809,6 +1834,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"project_module": {
|
||||
"add_module": "Add Module",
|
||||
"update_module": "Update Module",
|
||||
@@ -1862,6 +1888,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"project_views": {
|
||||
"empty_state": {
|
||||
"general": {
|
||||
@@ -1881,6 +1908,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"project_page": {
|
||||
"empty_state": {
|
||||
"general": {
|
||||
@@ -1910,6 +1938,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"command_k": {
|
||||
"empty_state": {
|
||||
"search": {
|
||||
@@ -1917,6 +1946,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"issue_relation": {
|
||||
"empty_state": {
|
||||
"search": {
|
||||
@@ -1927,6 +1957,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"issue_comment": {
|
||||
"empty_state": {
|
||||
"general": {
|
||||
@@ -1935,6 +1966,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"notification": {
|
||||
"label": "Inbox",
|
||||
"page_label": "{workspace} - Inbox",
|
||||
@@ -1991,6 +2023,7 @@
|
||||
"custom": "Custom"
|
||||
}
|
||||
},
|
||||
|
||||
"active_cycle": {
|
||||
"empty_state": {
|
||||
"progress": {
|
||||
@@ -2010,6 +2043,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"disabled_project": {
|
||||
"empty_state": {
|
||||
"inbox": {
|
||||
@@ -2072,6 +2106,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"stickies": {
|
||||
"title": "Your stickies",
|
||||
"placeholder": "click to type here",
|
||||
@@ -2129,6 +2164,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"role_details": {
|
||||
"guest": {
|
||||
"title": "Guest",
|
||||
@@ -2143,6 +2179,7 @@
|
||||
"description": "All permissions set to true within the workspace."
|
||||
}
|
||||
},
|
||||
|
||||
"user_roles": {
|
||||
"product_or_project_manager": "Product / Project Manager",
|
||||
"development_or_engineering": "Development / Engineering",
|
||||
@@ -2155,6 +2192,7 @@
|
||||
"human_resources": "Human / Resources",
|
||||
"other": "Other"
|
||||
},
|
||||
|
||||
"importer": {
|
||||
"github": {
|
||||
"title": "Github",
|
||||
@@ -2165,6 +2203,7 @@
|
||||
"description": "Import work items and epics from Jira projects and epics."
|
||||
}
|
||||
},
|
||||
|
||||
"exporter": {
|
||||
"csv": {
|
||||
"title": "CSV",
|
||||
@@ -2193,6 +2232,7 @@
|
||||
"created": "Created",
|
||||
"subscribed": "Subscribed"
|
||||
},
|
||||
|
||||
"themes": {
|
||||
"theme_options": {
|
||||
"system_preference": {
|
||||
@@ -2238,17 +2278,20 @@
|
||||
"manual": "Manual"
|
||||
}
|
||||
},
|
||||
|
||||
"cycle": {
|
||||
"label": "{count, plural, one {Cycle} other {Cycles}}",
|
||||
"no_cycle": "No cycle"
|
||||
},
|
||||
|
||||
"module": {
|
||||
"label": "{count, plural, one {Module} other {Modules}}",
|
||||
"no_module": "No module"
|
||||
},
|
||||
|
||||
"description_versions": {
|
||||
"last_edited_by": "Last edited by",
|
||||
"previously_edited_by": "Previously edited by",
|
||||
"edited_by": "Edited by"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user