I'm using Trac 0.11.6 and I have quite a few custom fields. I use
MasterTickets plugin which adds blockedby (Depends on) and blocking
(Required for).
I like to have Depends On to the left of Required For since there is a
visual clue that the left column is tickets are before this one and
the right is tickets after. But I can't figure out how to do this
both at the top of the ticket (where current values are displayed) and
at the bottom (where values can be entered/changed).
At the top, the fixed, core fields that are displayed in the table
are: Reporter, Owner, Priority, Milestone, Component, Version, and CC
(7 fields).
At the bottom, the fixed, core fields that are displayed in the table
are: Type, Priority, Milestone, Component, Version, and CC (6 fields).
To put Depends On to the left of Required For at the top, Depends On
would have to be an even field number (0, 2, 4, etc. are on the left)
but to align them at the bottom, it'd have to be an odd field number.
Am I missing something that will help me line up my fields?
Christopher Nelson wrote:
> Alas it appears to be for 0.12 (the source tree I checked out has
> 0.12/trunk) and I'm in 0.11.6 (I see errors).
...
> cannot import name add_script_data")
Yes, that add_script_data() is a new API function of 0.12. A porting-back-to-0.11 discussion is running at #10240 (though for another plugin). There are already hints what is to do; if you provided a patch, the benefit would be doubled.
> Yes, that add_script_data() is a new API function of 0.12. A porting-back-to-0.11 discussion is running at #10240 (though for another plugin). There are already hints what is to do; if you provided a patch, the benefit would be doubled.
On Thu, Sep 27, 2012 at 8:45 AM, Brettschneider Falk
<fbrettschnei...@baumer.com> wrote:
> Christopher Nelson wrote:
>> Alas it appears to be for 0.12 (the source tree I checked out has
>> 0.12/trunk) and I'm in 0.11.6 (I see errors).
> ...
>> cannot import name add_script_data")
> Yes, that add_script_data() is a new API function of 0.12. A porting-back-to-0.11 discussion is running at #10240 (though for another plugin). There are already hints what is to do; if you provided a patch, the benefit would be doubled.
I put a patch in http://trac-hacks.org/ticket/10240#comment:7. It
seems a straight-forward addition. With that in place on top of
0.11.6, GroupTicketFields plugin loads without error and I get no JS
run time errors. My ticket includes the configured fieldset:
On Tuesday, October 9, 2012 11:58:55 AM UTC-7, Chris Nelson wrote:
> Any clues I can pursue would be welcome.
Assuming what I posted in [1] is the rest of the story, I tend to think Jun's solution is better, because IIRC, it can be implemented entirely in the py file using the ITemplateStreamFilter interface.
On Tue, Oct 9, 2012 at 7:05 PM, RjOllos <ry...@physiosonics.com> wrote:
> On Tuesday, October 9, 2012 11:58:55 AM UTC-7, Chris Nelson wrote:
>> Any clues I can pursue would be welcome.
> Assuming what I posted in [1] is the rest of the story, I tend to think
> Jun's solution is better, because IIRC, it can be implemented entirely in
> the py file using the ITemplateStreamFilter interface.
I suppose it is for certain definitions of "better". I prefer the
spot fixes of adding functionality rather than slicing and dicing the
plugin to change how it implements the addition of its script data to
the HTML.
On Tuesday, October 9, 2012 5:49:33 PM UTC-7, Chris Nelson wrote: > I suppose it is for certain definitions of "better".
I was thinking mainly of time-to-solution and simplicity. Though if you eventually get to the bottom of this, it would make for a useful recipe, and we could capture it under the forthcoming PluginDev page hierarchy, on a page such as CompatibilityRecipes.