Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

#3440 closed defect (duplicate)

[PATCH] When adding custom ticket fields, two fullrow fields may appear on the same row in presentation.

Reported by: anonymous Owned by: Jonas Borgström
Priority: normal Milestone:
Component: ticket system Version: 0.9.6
Severity: minor Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Matthew Good)

If an empty ticket filed have to be added in the presentation subsequent fullrow fileds may render on the same row in the HTML.

This patch (for the 0.9-stable branch) will fix the problem:

  • templates/ticket.cs

     
    181181  /each ?><?cs set:idx = 0 ?><?cs
    182182   each:field = ticket.fields ?><?cs
    183183    if:!field.skip ?><?cs set:fullrow = field.type == 'textarea' ?><?cs
    184      if:fullrow && idx % 2 ?><?cs set:idx = idx + 1 ?><th class="col2"></th><td></td></tr><tr><?cs /if ?>
     184     if:fullrow && idx % 2 ?><?cs set:idx = idx + 1 ?>
     185     <?cs set:num_fields = num_fields + 1 ?>
     186     <th class="col2"></th><td></td></tr><tr><?cs /if ?>
    185187     <th class="col<?cs var:idx % 2 + 1 ?>"><?cs
    186188       if:field.type != 'radio' ?><label for="<?cs var:name(field) ?>"><?cs
    187189       /if ?><?cs alt:field.label ?><?cs var:field.name ?><?cs /alt ?>:<?cs

Attachments (0)

Change History (7)

comment:1 by Matthew Good, 18 years ago

Description: modified (diff)

fix description formatting

comment:2 by sid, 18 years ago

Summary: When adding custom ticket fields, two fullrow fields may appear on the same row in presentation.[PATCH] When adding custom ticket fields, two fullrow fields may appear on the same row in presentation.

comment:3 by Emmanuel Blot, 18 years ago

Owner: changed from Jonas Borgström to anonymous

I think it would be better to add 'patch' to the keyword list if you want to track patches rather than to change the ticket summary…

in reply to:  1 comment:4 by Emmanuel Blot, 18 years ago

Owner: changed from anonymous to Jonas Borgström

(I don't know why the owner has been changed with my last comment)

comment:5 by sid, 18 years ago

I was following the instructions from this page: TracDev/SubmittingPatches

comment:6 by Christian Boos, 18 years ago

Component: generalticket system
Milestone: 0.10.1

About the [PATCH] in the summary: I think it's good to indicate this when a ticket is created for the purpose of submitting a patch (as it's the case here). When a patch is added afterwards to an existing ticket, possibly by another author, then I think it's preferable to use the patch keyword than to modify the summary.

As for this specific bug/fix, one should check if that is still relevant for 0.10.

comment:7 by sid, 18 years ago

Milestone: 0.10.1
Resolution: duplicate
Status: newclosed

This is a duplicate of #3109, and I submitted a more thorough patch (IMO) for that ticket that works for both newticket.cs and ticket.cs. I tried this patch on my system and still had alignment problems (and yep, still happens in 0.10).

Marking as a duplicate.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.