From 954218b9f8222386a19e62e1bcbd9b3edfd104ab Mon Sep 17 00:00:00 2001 From: John Rouillard Date: Sun, 5 Nov 2023 22:31:40 -0500 Subject: [PATCH] fix: make task index not crash. It looks like the task.index.html page was a copy of bug.index.html. However some fields are missing from a task that is in a bug. This causes a crash when looking at all tasks if you don't explicitly select the fields to be displayed. The task links from the sidebar do explicitly select @columns fields, so the crash is not normally seen. --- CHANGES.txt | 2 ++ doc/upgrading.txt | 18 ++++++++++++++++++ .../templates/devel/html/task.index.html | 15 +++------------ 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index a2e3c3fcd..d711a8435 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -74,6 +74,8 @@ Fixed: - fix repeated password id with user.item.html in all templates except jinja2. (John Rouillard) - fix unclosed file when saving index in indexer_dbm.py. (John Rouillard) +- fix task index in devel tracker so it doesn't cause a crash if all + fields are selected. (John Rouillard) Features: diff --git a/doc/upgrading.txt b/doc/upgrading.txt index d4e0b128d..4258fd32e 100644 --- a/doc/upgrading.txt +++ b/doc/upgrading.txt @@ -135,6 +135,24 @@ to:: This will change the id to ``confirm_password``. +Merge changes from devel template task.index.html (optional) +------------------------------------------------------------ + +The devel template's ``task.index.html`` has some fields that are not +defined in the schema. It looks like it was originally copied from the +``bug.index.html``. If the task index is requested without specifying +the columns/fields, the template will crash trying to display +``severity`` and other fields that don't exist in the task schema. + +In normal use, the left hand menu for tasks always specifies valid +columns so you may not see this issue. However if you remove the +``@columns`` query parameter, you can see the error. + +The removed columns are: severity, versions, keywords, dependencies. + +It is also missing the ``solves`` field which is added to match the +schema. + Bad Login Rate Limiting and Locking (info) ------------------------------------------ diff --git a/share/roundup/templates/devel/html/task.index.html b/share/roundup/templates/devel/html/task.index.html index 742a18d67..e035d2ffd 100644 --- a/share/roundup/templates/devel/html/task.index.html +++ b/share/roundup/templates/devel/html/task.index.html @@ -23,20 +23,17 @@ - - - - + @@ -50,8 +47,6 @@ - @@ -65,8 +60,6 @@ - - - +
Severity ID Creation Activity Actor Title ComponentsVersions Status Resolution Creator Assigned ToKeywordsDepends OnSolves Type