[Refactor/Chore] Normalize dataset query created_by_role values #21477

Closed
opened 2026-02-21 20:12:45 -05:00 by yindo · 1 comment
Owner

Originally created by @laipz8200 on GitHub (Jan 6, 2026).

Originally assigned to: @laipz8200 on GitHub.

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for refactors or chores; if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Description

Dataset query history writes created_by_role from multiple paths (app retrieval, tool callbacks, hit testing) with inconsistent role value formats. This results in mixed role strings in the dataset query table and complicates downstream filtering or analytics.

Motivation

Consistent role values are required for reliable dataset query history analysis and user-facing filtering.

Additional Context

Clarify the source-of-truth enum/value format for dataset query created_by_role and normalize all write paths to the same representation.

Originally created by @laipz8200 on GitHub (Jan 6, 2026). Originally assigned to: @laipz8200 on GitHub. ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] This is only for refactors or chores; if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Description Dataset query history writes `created_by_role` from multiple paths (app retrieval, tool callbacks, hit testing) with inconsistent role value formats. This results in mixed role strings in the dataset query table and complicates downstream filtering or analytics. ### Motivation Consistent role values are required for reliable dataset query history analysis and user-facing filtering. ### Additional Context Clarify the source-of-truth enum/value format for dataset query `created_by_role` and normalize all write paths to the same representation.
yindo closed this issue 2026-02-21 20:12:45 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Feb 6, 2026):

Hi, @laipz8200. I'm Dosu, and I'm helping the Dify team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported inconsistent created_by_role values in dataset query history.
  • This inconsistency complicates filtering and analytics.
  • You proposed normalizing these values to a single source-of-truth format.
  • You suggested updating all write paths accordingly.
  • There has been no further activity or comments on this issue.

What's Next:

  • Please let me know if this issue is still relevant with the latest version of Dify by commenting here.
  • Otherwise, I will automatically close this issue in 15 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Feb 6, 2026): Hi, @laipz8200. I'm [Dosu](https://dosu.dev), and I'm helping the Dify team manage their backlog and am marking this issue as stale. **Issue Summary:** - You reported inconsistent `created_by_role` values in dataset query history. - This inconsistency complicates filtering and analytics. - You proposed normalizing these values to a single source-of-truth format. - You suggested updating all write paths accordingly. - There has been no further activity or comments on this issue. **What's Next:** - Please let me know if this issue is still relevant with the latest version of Dify by commenting here. - Otherwise, I will automatically close this issue in 15 days. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#21477