Opened 10 years ago
Closed 10 years ago
#11960 closed defect (fixed)
Ticket clone warns: The action "None" is not available.
Reported by: | anonymous | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Milestone: | 1.1.4 |
Component: | ticket system | Version: | 1.1dev |
Severity: | normal | Keywords: | ticketclone |
Cc: | Branch: | ||
Release Notes: |
Fixed warning The action "None" is not available when cloning a ticket. |
||
API Changes: | |||
Internal Changes: |
Description
Enabling TicketClone adds the +# Clone button to pre-fill the new ticket form. Now clicking the button shows a warning "The action "None" is not available".
Attachments (2)
Change History (6)
comment:1 by , 10 years ago
Milestone: | → 1.1.4 |
---|---|
Owner: | set to |
Status: | new → assigned |
by , 10 years ago
Attachment: | NewTicketPage.png added |
---|
comment:3 by , 10 years ago
Issue can also be reproduced by navigating directly to /newticket?summary=thesummary&preview=
(omitting summary
results in a traceback).
Proposed change is to select the first action as the default action, rather than using None
as the default action:
-
trac/ticket/web_ui.py
diff --git a/trac/ticket/web_ui.py b/trac/ticket/web_ui.py index 9335244..b482ab3 100644
a b class TicketModule(Component): 488 488 489 489 preview = 'preview' in req.args 490 490 if preview or req.method == 'POST': 491 action = req.args.get('action') 491 actions = TicketSystem(self.env) \ 492 .get_available_actions(req, ticket) 493 default_action = actions[0] if len(actions) > 0 else None 494 action = req.args.get('action', default_action) 492 495 valid = True 493 496 # Do any action on the ticket? 494 actions = \495 TicketSystem(self.env).get_available_actions(req, ticket)496 497 if action not in actions: 497 498 valid = False 498 499 add_warning(req, _('The action "%(name)s" is not available.',
by , 10 years ago
Attachment: | t11960.diff added |
---|
comment:4 by , 10 years ago
Release Notes: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Fixed in [13768].