[bug]: Agent create fails with "Invalid PQL syntax" when PQL filter is abandoned and switched back to Basic
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 55/100
调研方向
Start by tracing the agent creation form’s Filters toggle and the payload sent to POST /api/workspaces/<slug>/agent-create/, then follow backend validation for the trigger filter config and PQL parsing. Reproduce by entering an incomplete PQL filter, switching to Basic, and submitting. Done when abandoned PQL text is discarded or the form reports a clear filter error before submission.
由索引模型根据 Issue 内容生成。
描述
Is there an existing issue for this?
- I have searched the existing issues
Current behavior
In the agent creation form, a trigger's Filters section has a Basic | PQL toggle. If you type a PQL statement, then switch back to Basic without clearing the PQL text, the form still creates the agent but submits a malformed PQL string built from the Basic filter plus the leftover PQL. The request fails with a generic toast:
Couldn't create the agent
Try again. If it keeps happening, contact support.
The API returns 400:
{"triggers": [{"index": 0, "errors": {"config": {"config": "Invalid PQL syntax."}}}]}
and the server logs:
PQL syntax error for query 'project IN ("<project-uuid>" ) AND': Unexpected token Token('$END', '') at line 1, column 54.
Invalid PQL syntax in event trigger filter config
The filter ends in a dangling AND with nothing after it, so the parser rejects it. The Basic view shows only a valid-looking Projects is any of ... chip, so nothing on screen indicates the problem, and the error toast does not mention the filter.
What I expect: switching back to Basic should either discard the abandoned PQL text or the form should validate the filter before submit. At minimum, the error should say the trigger filter is invalid.
Steps to reproduce
- Go to Agents → create a new agent.
- Add the trigger Work item created.
- In Filters, switch to PQL and type a partial statement (e.g.
project IN (...) AND) without deleting it. - Switch back to Basic and add a
Projects is any of ...condition. - Click create.
- See
Couldn't create the agentand a400fromPOST /api/workspaces/<slug>/agent-create/.
Clearing the PQL text before switching back to Basic avoids the error.
Environment
Production
Browser
Other (Plane desktop app 3.0.4, Electron)
Edition
Commercial
Version
Backend backend-commercial:v4.0.1, desktop app 3.0.4
- 主要语言
- TypeScript
- 星标
- 63k
- 派生
- 6.5k
- 平均合并
- 2 天 16 小时
- 30 天内合并 PR
- 70
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
makeplane/plane 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
[bug]: Comment external_id is deduplicated per project instead of per work item可能已有人在做 @MishraTanishq619 于 21 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 74/100
makeplane/plane#10195 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
Missing optional chaining on actor_details and reaction_items in apps/space reactions and votes可能已有人在做 @ghazy2001 于 29 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
makeplane/plane#10111 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
makeplane/plane#10082 · 1 条评论 ·
维护者通常 1 天内回复
相似的 Issue
-
good first issue help wanted
难度 2/5 1 小时以内 新手友好度 86/100
Intelligenza-Umana/intelligenza-umana-web#16 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
open-webui/open-webui#35184 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
danielmiessler/LifeOS#3001 ·
维护者通常 5 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复