exceedone / exment

Exment is open source software for managing information assets on the Web. / Exmentは、情報資産をWeb上で管理するための、オープンソースソフトウェアです。
https://exment.net/docs/#
GNU General Public License v3.0
261 stars 63 forks source link

ワークフローのステータスを対象とした集計ビューにてSQLエラー発生 #1471

Open okegawaatclink opened 1 month ago

okegawaatclink commented 1 month ago

Describe the bug / バグの説明

A clear and concise description of what the bug is. / バグの内容のかんたんな説明を記載してください。

Workflowのステータスを対象とした集計ビューにて、 操作欄の集計データの明細を表示するを選択した際に、 次の画面でSQLエラーが発生し、画面が表示されなくなる。

To Reproduce / 再現手順

Please describe the reproduction procedure in as much detail as possible. / 再現手順を、可能な限り詳細に記載してください。

(ビューを作成) ※対象のデータにワークフローが紐づいてること ビュー種類:集計ビュー 既定:NO ビューの情報ボックスを使用する:NO グループ列選択:現在のステータス 集計列選択:ID,件数 データ表示条件:なし

(ビューを表示) 1.プルダウンより集計ビューを表示 2.操作列より任意の行を選択 3.画面遷移するー>下記SQLエラーが表示される

Version / 発生バージョン

Please describe version. / ご利用のバージョンを記載してください。

v6.0.0

Error log / エラーログ

If possible, paste error log. Log's path is "storage/logs/laravel.log". / 可能であれば、ログを貼り付けてください。ログのパスは"storage/logs/laravel.log"です。

SQLSTATE[42000]: Syntax error or access violation: 1066 Not unique table/alias: 'workflow_values' (Connection: mariadb, SQL: select count(*) as aggregate from XXX inner join (select xxxx from xxxx left join workflow_values on xxxxx) as workflow_values on xxxx.id = workflow_values.morph_id inner join (select xxxx from xxxx left join workflow_values on xxxxx) as workflow_values on xxxx.id = workflow_values.morph_id where xxxxx;

Screenshots / スクリーンショット

If possible, paste the screenshot. / 可能であれば、スクリーンショットを貼り付けてください。

Additional context / その他

Add any other context about the problem here. / その他に記載すべき内容がありましたら、ご記載ください。

元のデータはExmentv4.0.0 で作成していたもので、 のちにv6.0.0にバージョンアップして利用していました。

okegawaatclink commented 1 month ago

https://exment.net/archives/1207 こちらのデモサイトでも再現しました。 v5.0.3です。