Permalink
Browse files

make project task update msg less ambiguous

  • Loading branch information...
1 parent 0b5c147 commit 7a53e44e06a47381e8af9ccf872f3862f195226a @bymerej committed May 24, 2012
Showing with 4 additions and 5 deletions.
  1. +4 −5 modules/eden/project.py
@@ -2613,17 +2613,16 @@ def task_update_onaccept(form):
if not represent:
represent = lambda o: o
if rvar:
- changed[var] = "%s changed from %s to %s" % \
+ changed[var] = "%s changed from %r to %r" % \
(table[var].label, represent(rvar), represent(vvar))
else:
- changed[var] = "%s changed to %s" % \
+ changed[var] = "%s changed to %r" % \
(table[var].label, represent(vvar))
if changed:
table = s3db.project_comment
- text = s3_auth_user_represent(current.auth.user.id)
- for var in changed:
- text = "%s\n%s" % (text, changed[var])
+ user = s3_auth_user_represent(current.auth.user.id)
+ text = "%s changed:\n<ul>\n%s\n</ul>" % (user, '\n'.join("<li>%s</li>" % v for v in changed.values()))
table.insert(task_id=id,
body=text)

1 comment on commit 7a53e44

@flavour

Thanks for the prettier UI & identifying the markup issue.
Can you fix the markup issue through s3mgr.represent instead?

Many thanks!

Please sign in to comment.