Ticket #5856 (new enhancement)
Opened 5 years ago
Last modified 4 years ago
Enterprise workflow enhancements for request info
| Reported by: | kirean@… | Owned by: | ecarter |
|---|---|---|---|
| Priority: | normal | Milestone: | next-major-0.1X |
| Component: | general | Version: | devel |
| Severity: | minor | Keywords: | workflow |
| Cc: | gt4329b@… | ||
| Release Notes: | |||
| API Changes: | |||
Description
I'm trying to use the enterprise workflow and I stumbled upon some obstacles.
For example:
A new ticket is created and assigned to a user.
The user finds he needs more information so he presses request info.
The ticket gets state infoneeded_new and the only actions available is provide_info and leave.
Suggestion:
- Make it possible to assign a user when requesting more information. If in the infoneeded_new state I would like it to be automatically assigned to the reporter
- It should alse be able to reassign a ticket in infoneeded_new state.
- Can be fixed by adding the following to the workflow:
reassign_infoneeded_new = infoneeded_new -> infoneeded_new reassign_infoneeded_new.name = reassign reassign_infoneeded_new.operations = set_owner reassign_infoneeded_new.permissions = TICKET_MODIFY
- Looked easy but I found something unwanted in default_workflow.py. Apparently set_owner adds a "to" between the name and the assignee.
If I modify requestinfo_new to:
requestinfo_new = new -> infoneeded_new requestinfo_new.name = request info from requestinfo_new.operations = set_owner requestinfo_new.permissions = TICKET_MODIFY
Then the output will be:
request info from to
Isn't it better to remove the "to" from default_workflow.py and let the user configure the whole string in trac.ini instead?
Cheers / Erik
Attachments
Change History
comment:1 Changed 5 years ago by kirean@…
comment:2 Changed 5 years ago by ecarter
- Owner changed from jonas to ecarter
comment:3 Changed 4 years ago by Morris
- Cc gt4329b@… added
+1 to removing "to" from the source and putting it in the workflow .ini -- I ran into this exact thing today.
comment:4 Changed 4 years ago by cboos
- Keywords workflow added
- Milestone set to 0.12
- Severity changed from normal to minor
comment:5 Changed 4 years ago by ecarter
Relevant to this ticket: wiki:AdvancedTicketWorkflowPlugin now provides set_owner_to_reporter and set_owner_to_previous operations.



I did some changes locally:
Index: default_workflow.py =================================================================== --- default_workflow.py (revision 5898) +++ default_workflow.py (working copy) @@ -214,18 +214,20 @@ if owners == None: owner = req.args.get(id, req.authname) - control.append(tag(['to ', tag.input(type='text', id=id, + control.append(tag([' ', tag.input(type='text', id=id, name=id, value=owner)])) hints.append(_("The owner will change")) elif len(owners) == 1: - control.append(tag('to %s' % owners[0])) + control.append(tag(' %s' % owners[0])) hints.append(_("The owner will change to %s") % owners[0]) else: - control.append(tag([_("to "), tag.select( + control.append(tag([_(" "), tag.select( [tag.option(x, selected=(x == selected_owner or None)) for x in owners], id=id, name=id)])) hints.append(_("The owner will change")) + if 'set_owner_to_reporter' in operations: + hints.append(_("The owner will change to %s") % ticket['reporter']) if 'set_owner_to_self' in operations: hints.append(_("The owner will change to %s") % req.authname) if 'set_resolution' in operations:And then I did change the workflow entries in trac.ini:
*.name = reassign -> *.name = reassign to
Cheers / Erik