Modify

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#12499 closed defect (fixed)

Add `bug` prefix

Reported by: Ryan J Ollos Owned by: lucid
Priority: normal Component: PageTicketsMacro
Severity: normal Keywords:
Cc: Trac Release:

Description

Macro looks very useful! bug:#1 is a valid ticket reference (TracLinks): trac:browser:tags/trac-1.0.8/trac/ticket/api.py@:456#L453. Would you mind adding it to your tickets_re2?

Attachments (0)

Change History (4)

comment:1 Changed 9 years ago by lucid

Sure.

I suppose there's not some existing reusable regex (or API function) in Trac core one can use for this? The closest I could find is trac:browser:tags/trac-1.0.8/tracopt/ticket/commit_updater.py@:141#L141 but it's not quite possible to use as is here.

Slightly adapted I could maybe use:

tickets_re = re.compile('(?:#|(?:ticket:|bug:))(\d+)')

What do you think?

Last edited 9 years ago by Ryan J Ollos (previous) (diff)

comment:2 Changed 9 years ago by Ryan J Ollos

Yeah, that looks good. Looking forward, it might be useful to move the ticket_reference attribute to the TicketSystem class, though I'm unsure whether it could be used in the IWikiSyntaxProvider implementation.

It's also strange that issue:NNN is allowed as a ticket reference in CommitTicketUpdater, but not as a general wiki syntax, issue:1.

Last edited 9 years ago by Ryan J Ollos (previous) (diff)

comment:3 Changed 9 years ago by lucid

Resolution: fixed
Status: newclosed

In 14893:

PageTicketsMacro: Support bug: synonym for ticket:.
(fix #12499)

comment:4 in reply to:  2 Changed 9 years ago by Ryan J Ollos

Replying to rjollos:

It's also strange that issue:NNN is allowed as a ticket reference in CommitTicketUpdater, but not as a general wiki syntax, issue:1.

I opened trac:#12192 to discuss this.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain lucid.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.