Edgewall Software

Changes between Initial Version and Version 1 of Ticket #11090


Ignore:
Timestamp:
Feb 28, 2013, 7:43:13 PM (11 years ago)
Author:
Christian Boos
Comment:

Good idea!

Suggesting the following improvement:

  • default_workflow.py

     
    226226        this_action = self.actions[action]
    227227        status = this_action['newstate']
    228228        operations = this_action['operations']
    229         current_owner = ticket._old.get('owner', ticket['owner'] or '(none)')
     229        current_owner_or_empty = ticket._old.get('owner', ticket['owner'])
     230        current_owner = current_owner_or_empty or '(none)'
    230231        if not (Chrome(self.env).show_email_addresses
    231232                or 'EMAIL_VIEW' in req.perm(ticket.resource)):
    232233            format_user = obfuscate_email_address
     
    323324            control.append(_('as %(status)s ',
    324325                             status= ticket._old.get('status',
    325326                                                     ticket['status'])))
     327            hints.append(_("The owner will remain %(current_owner)s",
     328                           current_owner=current_owner)
     329                         if current_owner_or_empty else
     330                         _("The ticket will remain without an owner"))
    326331        else:
    327332            if status != '*':
    328333                hints.append(_("Next status will be '%(name)s'", name=status))

Not 100% sure about the grammar though (or "with no owner"?).

Also, I hope this will not introduce doubts about what happens with the owner for the other actions where the owner won't change (e.g. assign / unassign / resolve). I don't want to add the "remains" hint for all of them, sounds too verbose. So unless someone has a better idea, I'm fine with the proposed change.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #11090

    • Property Owner set to Christian Boos
    • Property Status newassigned
    • Property Milestone1.0.2
  • Ticket #11090 – Description

    initial v1  
    1313Adding a hint to the "leave" action would be an easy solution.  If the "leave" action had a hint like "The owner will remain ethan", then I would be able to see the current owner at a glance without needing to think too hard about it:
    1414
    15 {{{
     15{{{#!diff
    1616diff --git a/trac/ticket/default_workflow.py b/trac/ticket/default_workflow.py
    1717index 6b087ab..631a604 100644