[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: faking an append-only field
From: |
Dirk Bergstrom |
Subject: |
Re: faking an append-only field |
Date: |
Thu, 01 Aug 2002 11:54:00 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.0) Gecko/20020530 |
On 8/1/2002 11:27 AM, Mike Hoolehan expounded at length upon:
> With the gnats 4 beta, I'm attempting to mimic the audit trail behavior I'm
> used to in bugzilla (basically an append-only field). Here's my attempt,
> that works mostly:
> field "Add-To-Audit-Trail" {
[snip]
> }
> Then I just made the original Audit-Trail field 'read-only'.
man, that's pretty slick!
> This strategy works correctly except after the PR has just been created
> and the PR is edited the first time. Even if the user doesn't change the
> "Add-To-Audit-Trail" field on the gnatsweb interface, the on-change
> stuff is being run. I've experimented with conditional 'on-change' using
> regexes, but nothing seemed to help.
i'm pretty sure that the problem arises because add-to-audit-trail is
not actually in the PR after it's created (ie. it's not an initial-entry
field). this means that after the first edit, the value in the field
has "changed", because it's gone from the empty string to a single
newline (or something like that).
you might be able to fix this by setting a default value of " " for the
field, or whatever value gnatsweb seems to be sticking in there. adding
it to the initial-entry list might also solve the problem, but that's an
ugly fix.
hope this helps.
--
Dirk Bergstrom address@hidden
Computer Geek v: 707.433.0564
Juniper Networks Inc. f: 707.433.0769
"it *looks* like a nail; lemme grab my hammer..."