Modify

Opened 9 months ago

Closed 7 months ago

Last modified 7 months ago

#11374 closed enhancement (fixed)

"Add keywords" section in newticket template

Reported by: ipm Owned by: rjollos
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 9 months ago by anonymous

  • Trac Release set to 1.0

comment:2 Changed 9 months 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
Last edited 7 months ago by rjollos (previous) (diff)

comment:3 Changed 7 months ago by rjollos

  • Status changed from new to assigned

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

comment:4 Changed 7 months ago by rjollos

  • Resolution set to fixed
  • Status changed from assigned to closed

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 7 months ago by rjollos

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.

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from rjollos. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.