Modify

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#11374 closed enhancement (fixed)

"Add keywords" section in newticket template

Reported by: ipm Owned by: Ryan J Ollos
Priority: normal Component: TracKeywordsPlugin
Severity: normal Keywords: newticket
Cc: Trac Release: 1.0

Description

How can I use the "add keywords" section in the newticket template?

Now I only see it in change ticket.

Thanks for all. Regards.

Attachments (0)

Change History (5)

comment:1 Changed 10 years ago by anonymous

Trac Release: 1.0

comment:2 Changed 10 years ago by ipm@…

I've modified the code to do this:

In web_ui.py:

    def filter_stream(self, req, method, filename, stream, data):
        if filename in 'ticket.html':
            ticket = data.get('ticket')
            if self.keywords and ticket and ticket.exists and \
               'TICKET_CHGPROP' in req.perm(ticket.resource):
                filter = Transformer('//fieldset[@id="properties"]')
                stream |= filter.after(self._render_template(req))
+           else:
+              filter = Transformer('//fieldset[@id="properties"]')
+               stream |= filter.after(self._render_template(req))
        elif filename == 'newticket.html':
            filter = Transformer('//fieldset[@id="properties"]')
            stream |= filter.after(self._render_template(req))
        elif filename == 'wiki_edit.html' and self.tagsplugin_enabled:
            filter = Transformer('//fieldset[@id="changeinfo"]')
            stream |= filter.after(self._render_template(req))

        return stream
Version 1, edited 10 years ago by Ryan J Ollos (previous) (next) (diff)

comment:3 Changed 10 years ago by Ryan J Ollos

Status: newassigned

Thank you for the patch, and sorry for the delay in reviewing it. I'll push the changes now.

comment:4 Changed 10 years ago by Ryan J Ollos

Resolution: fixed
Status: assignedclosed

In 13475:

0.3dev: Show keywords on the NewTicket page. Fixes #11374.

Slightly modified version of patch by ipm. Tested with Trac 1.1.2dev-r12327. Lightly tested; please report any related issues to ticket #11374.

comment:5 Changed 10 years ago by Ryan J Ollos

Since I modified the patch slightly and didn't have much time to test it out, I appreciate if you have a chance to report back after you've tested the latest changes.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
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.