Mercurial > p > roundup > code
changeset 8232:d0460348bf9a
fix: issue2550924. clean up schema for devel/responsive templates.
both templates have the same schema.
Changes patches class to patch in devel schema. Change bug.issue.html
to account for patches -> patch rename. Sort property list for a
permission.
Add patch class for responsive template.
From both remove incorrect comment.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sat, 21 Dec 2024 16:35:11 -0500 |
| parents | 984bc9f94ec6 |
| children | fdb692f43d08 |
| files | share/roundup/templates/devel/html/bug.item.html share/roundup/templates/devel/schema.py share/roundup/templates/responsive/schema.py |
| diffstat | 3 files changed, 11 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/share/roundup/templates/devel/html/bug.item.html Sat Dec 21 15:23:12 2024 -0500 +++ b/share/roundup/templates/devel/html/bug.item.html Sat Dec 21 16:35:11 2024 -0500 @@ -176,21 +176,21 @@ <tr tal:condition="context/is_edit_ok"> <th><tal:block i18n:translate="">Patch</tal:block>:</th> <td colspan="3"> - <input type="hidden" name="@link@patches" value="patches-1"/> - <input type="file" name="patches-1@content" size="35"/> + <input type="hidden" name="@link@patches" value="patch-1"/> + <input type="file" name="patch-1@content" size="35"/> </td> </tr> <tr tal:condition="context/is_edit_ok"> <th><tal:block i18n:translate="">Patch Description</tal:block>:</th> - <td colspan=3><input type="edit" name="patches-1@description" size="40"></td> + <td colspan=3><input type="edit" name="patch-1@description" size="40"></td> </tr> <tr tal:condition="context/is_edit_ok"> <th><tal:block i18n:translate="">Repository</tal:block>:</th> - <td colspan=3><input type="edit" name="patches-1@repository" size="40"></td> + <td colspan=3><input type="edit" name="patch-1@repository" size="40"></td> </tr> <tr tal:condition="context/is_edit_ok"> <th><tal:block i18n:translate="">Repo. Revision</tal:block>:</th> - <td colspan=3><input type="edit" name="patches-1@revision" size="40"></td> + <td colspan=3><input type="edit" name="patch-1@revision" size="40"></td> </tr> --> </table>
--- a/share/roundup/templates/devel/schema.py Sat Dec 21 15:23:12 2024 -0500 +++ b/share/roundup/templates/devel/schema.py Sat Dec 21 16:35:11 2024 -0500 @@ -127,7 +127,7 @@ description=String(indexme='yes')) # Patch -patches = FileClass(db, "patches", +patch = FileClass(db, "patch", name=String(), description=String(indexme='yes'), repository=String(), @@ -144,7 +144,6 @@ # title = String() # messages = Multilink("msg") # files = Multilink("file") -# patches = Multilink("patches") # nosy = Multilink("user") # superseder = Multilink("issue") bug = IssueClass(db, "bug", @@ -159,7 +158,7 @@ resolution=Link('resolution'), superseder=Link('bug'), keywords=Multilink('keyword'), - patches=Multilink('patches')) + patches=Multilink('patch')) # Task Type task_type = Class(db, 'task_type', @@ -209,6 +208,7 @@ db.security.addPermissionToRole(r, 'Rest Access') db.security.addPermissionToRole(r, 'Xmlrpc Access') + ########################## # User permissions ########################## @@ -299,7 +299,7 @@ # if you don't want them to p = db.security.addPermission(name='View', klass='user', properties=('id', 'organisation', 'phone', 'realname', 'timezone', - 'vcs_name', 'username')) + 'username', 'vcs_name')) db.security.addPermissionToRole('User', p) db.security.addPermissionToRole('Developer', p)
--- a/share/roundup/templates/responsive/schema.py Sat Dec 21 15:23:12 2024 -0500 +++ b/share/roundup/templates/responsive/schema.py Sat Dec 21 16:35:11 2024 -0500 @@ -144,7 +144,6 @@ # title = String() # messages = Multilink("msg") # files = Multilink("file") -# patches = Multilink("patches") # nosy = Multilink("user") # superseder = Multilink("issue") bug = IssueClass(db, "bug", @@ -158,7 +157,8 @@ status=Link('status'), resolution=Link('resolution'), superseder=Link('bug'), - keywords=Multilink('keyword')) + keywords=Multilink('keyword'), + patches=Multilink('patch')) # Task Type task_type = Class(db, 'task_type',
