Modify

Opened 4 years ago

Last modified 4 years ago

#7177 new enhancement

[PATCH] Allow tweaking of the "author" field

Reported by: matthijs Owned by: obs
Priority: normal Component: BlackMagicTicketTweaksPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

When anonymous users create a new ticket, they must fill in their name / email address in a field called "author". However, unlike the normal fields, this field uses just "author" as the field name and id, without the "field-" prefix the other fields use.

The author field is also used when an anonymous user adds a comment or edits a ticket.

The attached patch adds a special case to the ticket.html stream editor that leaves out the "field-" prefix for the "author" field. Changes are not required anywhere else, since the author field is mapped onto the "reporter" field of the ticket.

Attachments (4)

allow-author.patch (51 bytes) - added by matthijs 4 years ago.
allow-more-fields.patch (5.0 KB) - added by matthijs 4 years ago.
Patch against r8017 to allow more fields to be edited
thorough-label-replace.patch (1.3 KB) - added by matthijs 4 years ago.
Patch against r8017 to replace tags in labels as well
change-fieldset-legend.patch (983 bytes) - added by matthijs 4 years ago.
Patch against r8017 to replace the legend of a fieldset as well

Download all attachments as: .zip

Change History (5)

Changed 4 years ago by matthijs

Changed 4 years ago by matthijs

Patch against r8017 to allow more fields to be edited

Changed 4 years ago by matthijs

Patch against r8017 to replace tags in labels as well

Changed 4 years ago by matthijs

Patch against r8017 to replace the legend of a fieldset as well

comment:1 Changed 4 years ago by matthijs

I've just updated this patch and added a few more. The original patch was renamed to allow-more-fields.patch (feel free to delete the now-empty allow-author.patch). The new patch allows tweaking not just the "author" field, but also the "comment" field, the "properties" and "action" fieldsets and each "action" option.

I've added two subsequent patches. thorough-label-replace.patch makes the label replacement a bit more thorough. Previously, all the text nodes below the label node were replaced with the new label. When replacing the "comment" label (which includes a link, so has a text node, followed by an <a> node, followed by another text node), the label would be messed up. This patch first removes all children (both text and normal nodes) and then appends an new text child with the new label.

The final patch, change-fieldset-legend.patch, allows replacing the "label" of a fieldset ("properties" or "actions") as well, by replacing the contents of the legend node instead of the label node.

Add Comment

Modify Ticket

Action
as new .
Author


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

 
Note: See TracTickets for help on using tickets.