#11090 closed enhancement (fixed)
"Leave" workflow action should have a hint about the current owner
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | 1.0.2 |
Component: | ticket system | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: |
Add a hint about the current owner to the leave action in the workflow Action box if |
||
API Changes: | |||
Internal Changes: |
Description (last modified by )
I often find myself wanting to know who is the current owner of a ticket when I am choosing to "leave" a ticket in its current state.
The UI makes this somewhat difficult, because the "Owner" field is not listed in the "Change Properties" box that appears directly above the workflow "Action" box.
In order to double-check who currently owns the ticket, I have to either:
- scroll back up to the top of the page to review the ticket's current properties
- wait for the preview to be rendered at the bottom of the page and review the ticket's new properties
- look at the OTHER workflow actions, like "Reassign", and read through its hint ("The owner will be changed from ethan to …") to see who currently owns the ticket
The last of these methods is the most "efficient" but also seems to be the least intuitive — at least, it never actually occurred to me until I was writing this ticket. :-) As a user I've developed a habit of either scrolling to the top or waiting for the preview in order to check the ticket's current owner whenever I'm "leaving" a ticket in its current state.
Adding 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:
-
trac/ticket/default_workflow.py
diff --git a/trac/ticket/default_workflow.py b/trac/ticket/default_workflow.py index 6b087ab..631a604 100644
a b Read TracWorkflow for more information (don't forget to 'wiki upgrade' as well) 323 323 control.append(_('as %(status)s ', 324 324 status= ticket._old.get('status', 325 325 ticket['status']))) 326 hints.append(_("The owner will remain %(current_owner)s", 327 current_owner=current_owner)) 326 328 else: 327 329 if status != '*': 328 330 hints.append(_("Next status will be '%(name)s'", name=status))
Attachments (0)
Change History (7)
follow-up: 2 comment:1 by , 12 years ago
Description: | modified (diff) |
---|---|
Milestone: | → 1.0.2 |
Owner: | set to |
Status: | new → assigned |
follow-up: 3 comment:2 by , 12 years ago
Replying to cboos:
Not 100% sure about the grammar though (or "with no owner"?).
I guess "The ticket will remain unowned" would be more grammatical. But personally I prefer your version even though it's a little stilted — I think it's useful to leave the word "owner" in the hint so that it's easier to understand what's referred to while scanning the page quickly. In that sense I think "with no owner" is best, because the phrase "no owner" is so easy to spot.
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.
I was a little worried about that. I think it's less unclear with those other actions, because they have some hint that says what will change, so it's reasonable to infer that everything unmentioned will be unchanged.
follow-up: 4 comment:3 by , 12 years ago
Replying to ethan.jucovy@…:
I think it's less unclear with those other actions, because they have some hint that says what will change, so it's reasonable to infer that everything unmentioned will be unchanged.
…which made me realize that my patch is completely broken if you customize your workflow at all, e.g.
leave = * -> * leave.default = 1 leave.operations = leave_status, set_owner
With my patch, this will result in a nonsensical hint like "The owner will be changed from ethan to the selected user. The owner will remain ethan."
Here's a new patch which should avoid that problem, by only appending the new hint if "leave_status" is the ONLY active operation:
-
trac/ticket/default_workflow.py
diff --git a/trac/ticket/default_workflow.py b/trac/ticket/default_workflow.py index 6b087ab..7ad8e97 100644
a b Read TracWorkflow for more information (don't forget to 'wiki upgrade' as well) 226 226 this_action = self.actions[action] 227 227 status = this_action['newstate'] 228 228 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)' 230 231 if not (Chrome(self.env).show_email_addresses 231 232 or 'EMAIL_VIEW' in req.perm(ticket.resource)): 232 233 format_user = obfuscate_email_address … … Read TracWorkflow for more information (don't forget to 'wiki upgrade' as well) 323 324 control.append(_('as %(status)s ', 324 325 status= ticket._old.get('status', 325 326 ticket['status']))) 327 if len(operations) == 1: 328 hints.append(_("The owner will remain %(current_owner)s", 329 current_owner=current_owner) 330 if current_owner_or_empty else 331 _("The ticket will remain with no owner")) 326 332 else: 327 333 if status != '*': 328 334 hints.append(_("Next status will be '%(name)s'", name=status))
comment:4 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Replying to ethan.jucovy@…:
Thanks, applied in r11778.
comment:5 by , 12 years ago
Owner: | changed from | to
---|
comment:6 by , 12 years ago
Release Notes: | modified (diff) |
---|
comment:7 by , 12 years ago
Release Notes: | modified (diff) |
---|
Good idea!
Suggesting the following improvement:
default_workflow.py
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.