public inbox for gnats-devel@sourceware.org
 help / color / mirror / Atom feed
* Conditional "on-change" does not work for "require-change-reason"
@ 2005-02-06  7:49 Alexander Mueller
  2005-02-17 21:31 ` Mel Hatzis
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Mueller @ 2005-02-06  7:49 UTC (permalink / raw)
  To: help-gnats

Hi,

I'm using gnats 4.01 and have encountered a strange problem
concerning the "on-change" section. Using a query expression
to make the execution of the actions contained in an "on-change"
section conditional works just fine, except for the "require-
change-reason" action. No matter whether the query expression
is true or false the "require-change-reason" action is always
executed, while for other actions contained in the same "on-
change" section the result of the evaluation of the query
expression is correctly taken into account.

Here's an example:

     on-change "State[type]!=\"closed\"" {

         require-change-reason     <---- always executed

         set-field "Foo" {         <---- executed if query
             "Bar"                       expression is true
         }
     }

I've already skimmed the relevant parts of the sources
but couldn't find any particular reason for my problem.
Any advice? Please be benignant because I'm new to
gnats ;-)

Cheers,

Alexander Mueller



_______________________________________________
Help-gnats mailing list
Help-gnats@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnats

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Conditional "on-change" does not work for "require-change-reason"
  2005-02-06  7:49 Conditional "on-change" does not work for "require-change-reason" Alexander Mueller
@ 2005-02-17 21:31 ` Mel Hatzis
  0 siblings, 0 replies; 2+ messages in thread
From: Mel Hatzis @ 2005-02-17 21:31 UTC (permalink / raw)
  To: Alexander Mueller; +Cc: help-gnats

Alexander Mueller wrote:
> Hi,
> 
> I'm using gnats 4.01 and have encountered a strange problem
> concerning the "on-change" section. Using a query expression
> to make the execution of the actions contained in an "on-change"
> section conditional works just fine, except for the "require-
> change-reason" action. No matter whether the query expression
> is true or false the "require-change-reason" action is always
> executed, while for other actions contained in the same "on-
> change" section the result of the evaluation of the query
> expression is correctly taken into account.
> 
> Here's an example:
> 
>     on-change "State[type]!=\"closed\"" {
> 
>         require-change-reason     <---- always executed
> 
>         set-field "Foo" {         <---- executed if query
>             "Bar"                       expression is true
>         }
>     }
> 
> I've already skimmed the relevant parts of the sources
> but couldn't find any particular reason for my problem.
> Any advice? Please be benignant because I'm new to
> gnats ;-)

Sorry to be the bearer of bad news, but you've uncovered
a GNATS bug. The condition is ignored for the require-change-reason
flag, resulting in an error if you haven't supplied a change
reason when the field changes, irrespective of the on-change
condition.

The good news is that it doesn't appear to be too difficult
to remedy. Hopefully, we'll have a fix for this in the next
release. In the meantime, perhaps someone can file this as a
bug so it doesn't get dropped.

--
Mel Hatzis

> 
> Cheers,
> 
> Alexander Mueller
> 
> 
> 
> _______________________________________________
> Help-gnats mailing list
> Help-gnats@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnats



_______________________________________________
Help-gnats mailing list
Help-gnats@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnats

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-02-17 21:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-06  7:49 Conditional "on-change" does not work for "require-change-reason" Alexander Mueller
2005-02-17 21:31 ` Mel Hatzis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).