Hi Paolo,
Below are things which I use, based on various answers from the mailing
list. Have a look at these excerpts and put them in the appropriate places
via Admin/Tickets/Edit or View
Basically, I changed the edit and view ticket pages to add/show blockers.
As said above, it's just for informative purposes, so e.g. you will be able
to close ticket with unclosed blockers. But I use it and still find it
handy. BTW, in the view page I use colors to clearly show ticket status,
without proper support from fossil I don't think you can show that a ticket
is blocked by others.
Hope it helps,
Jacek
----- Edit ticket page -----
<th1>
if {![info exists mutype]} {set mutype Wiki}
if {![info exists icomment]} {set icomment {}}
if {![info exists username]} {set username $login}
if {[info exists submit]} {
if {$mutype eq "Wiki"} {
set mimetype text/x-fossil-wiki
} elseif {$mutype eq "HTML"} {
set mimetype text/html
} elseif {$mutype eq {[links only]}} {
set mimetype text/x-fossil-plain
} else {
set mimetype text/plain
}
# Set blockers according to the buffered new_blockers list
set blockers $new_blockers
submit_ticket
set preview 1
}
</th1>
...
<tr><td class="tktDspLabel">Version Found In:</td><td>
<input type="text" name="foundin" size="50" value="$<foundin>" />
</td></tr>
<tr>
<td class='tktDspLabel'>Blockers:</td>
<th1>
if {! [info exists new_blockers]} {
set new_blockers $blockers
}
if {[info exists addblckrbtn]} {
if {[info exists new_blocker]} {
# Check whether the added blocker is already in the list
set add_new_blocker 1
for {set b 0} {$b < [llength $new_blockers]} {set b [expr {$b + 1}]} {
set to_check [lindex $new_blockers $b]
if {![string compare $new_blocker $to_check]} {
set add_new_blocker 0
break
}
}
if {$add_new_blocker} {
set new_blockers "$new_blockers $new_blocker"
}
}
} elseif {[info exists delblckrbtn]} {
if {[info exists blocker_list]} {
# Generate a list of blockers that is clear from the deleted blocker
set cleared_blockers ""
for {set b 0} {$b < [llength $new_blockers]} {set b [expr {$b + 1}]} {
set to_check [lindex $new_blockers $b]
if {[string compare $blocker_list $to_check]} {
set cleared_blockers "$cleared_blockers $to_check"
}
}
set new_blockers $cleared_blockers
}
}
html "<input type='hidden' name='new_blockers' value='$new_blockers' />"
if {[llength $new_blockers] == 0} {
enable_output 0
}
</th1>
<td><th1>combobox blocker_list "$new_blockers" 3</th1>
<input type="submit" name="delblckrbtn" value="Del blocker" /></td>
</tr>
<tr>
<td></td>
<th1>enable_output 1</th1>
<td><input type="text" name="new_blocker" size="20" />
<input type="submit" name="addblckrbtn" value="Add blocker" /></td>
</tr>
<tr><td colspan="2">
Append Remark with format
...
----- End of Edit Ticket page -----
----- View Ticket page -----
...
<tr>
<td class="tktDspLabel">Title:</td>
<td class="tktDspValue" colspan="3">$<title></td>
</tr>
<tr>
<td class="tktDspLabel">Status:</td>
<th1>
if {![string compare $status "Verified"] ||
![string compare $status "Open"]} {
set color "#ffcccc"
} elseif {![string compare $status "Review"]} {
set color "#e8e8e8"
} elseif {![string compare $status "Fixed"]} {
set color "#cfffbd"
} elseif {![string compare $status "Tested"]} {
set color "#bdffd6"
} elseif {![string compare $status "Deferred"]} {
set color "#aabaff"
} else {
set color "#b8b8b8"
}
html "<td class='tktDspValue' style='background: $color'>$status</td>"
</th1>
<td class="tktDspLabel">Type:</td>
...
<tr>
<td class="tktDspLabel">Version Found In:</td>
<td valign="top" class="tktDspValue">$<foundin></td>
<td class="tktDspLabel">Assigned to:</td>
<td class="tktDspValue">$<assigned_to></td>
</tr>
<tr>
<td class="tktDspLabel">Blockers:</td>
<td colspan="3" valign="top" class="tktDspValue">
<th1>
# Thanks to Brian Theado
#
http://www.mail-archive.com/[email protected]/msg00852.html
# Loop through the ticket uuids
for {set x 0} {$x < [llength $blockers]} {set x [expr {$x + 1}]} {
# Add braces so wiki formatter will make links. Backslashes
# hide those braces from interpretation by th1
wiki \[[lindex $blockers $x]\]
}
</th1>
</td>
</tr>
<th1>
if {[info exists comment] && [string length $comment]>10} {
html {
<tr><td class="tktDspLabel">Description:</td></tr>
<tr><td colspan="5" class="tktDspValue">
}
...
----- End of View Ticket page ----
2014-09-30 20:17 GMT+01:00 Ron W <[email protected]>:
> On Tue, Sep 30, 2014 at 2:17 PM, Stephan Beal <[email protected]>
> wrote:
>
>> On Tue, Sep 30, 2014 at 6:43 PM, Paolo Bolzoni <
>> [email protected]> wrote:
>>
>>> I am using fossil for bug tracking in a project where (not my
>>> decision) we use git for revision control. I was wondering if
>>> there is a way to explicitly mark a ticket as children of
>>> another. So it is clear that the root one must worked on before
>>> the child one.
>>>
>>> It is possible do something like that?
>>>
>>
>> There's nothing at the infrastructure-level which directly supports that,
>> but you could add a custom field which holds a list of other ticket IDs.
>> Fossil would apply no special logic to it, though, e.g. "can't do a release
>> so long as this blocker ticket is opened."
>>
>
> Using TH1, it is possible to encode various ticket handling steps. A few
> years ago, I shared the custom TH1 code I wrote for my team. We don't use
> it anymore. If I can find a copy, I'll post it, again. Or it should be
> somewhere in the archive of this mailing list (I haven't posted a ton of
> messages so it shouldn't be very hard to find.)
>
>
> _______________________________________________
> fossil-users mailing list
> [email protected]
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
>
>
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users