Is this a bug or am I doing something wrong? I'm pretty sure it's a bug,
but wanted to see if anyone has any insight or has seen this before.

Here's a simplified version of the situation:

I've got a Case form with a 'Status' that can be set to "Draft", "Open", or
"Closed".

Users can't change the 'Status' directly, but through some action (e.g. a
button), workflow sends a "signal" to the Case to perform the appropriate
status change.

If a Case is "Closed", it can be "re-opened".  This means that when the
"re-open" signal is sent to the Case, the 'Status' will be set back to
"Open" if the Case had previously been Open.  Otherwise if it had never
been previously opened, it will be set to "Draft".

This is (supposed to be) accomplished through a filter with the following
Run If qual:

('Status' = "Closed") AND ('Status History.Open.TIME' = $NULL$)

If this is true, then the filter sets the 'Status' to "Draft", otherwise it
sets it "Open".

The problem I'm having is that it's always going down the "true" path and
setting it to "Draft", even though the Case had definitely been open.

The bug, I think, is that the 'Status History.Open.TIME' is not correctly
getting any value.

I've verified that 'Status History.Open.TIME' *should *have a value a few
ways. First, I've cycled this Case through the various value several times
now and am positive it's been Open. Second, I've visually verified (using
the native Status History mechanism) that the Open TIME has a value. Third,
I inserted a Set Fields to pull the value into another temp field and do
see it correctly populating.

A few more notes...

I tried using the 'Status History.Open.USER' value also, but it's also not
getting a value: ('Status' = "Closed") AND ('Status History.Open.TIME' =
$NULL$) AND ('Status History.Open.USER' = $NULL$)

I ran a SQL log and don't see it pulling the Status History values from the
database before it performs the Run If test.

After I added the Set Fields I mention above, I do then see it pulling the
values after the Run If test.

Aside: I discovered what might be another minor efficiency bug while
testing this: to fulfill this Set Fields which pulls both the $Status
History.Open.USER$ and $Status History.Open.TIME$ values from the Status
History, the server is actually running this SQL twice sequentially:

SELECT entryId,T0,U0,T1,U1,T2,U2 FROM H492 WHERE entryId =
N'LEDCASE-0000026'.

Clearly it's pulling ALL of the values it needs in a single run of the
query, but for some reason it's doing it twice.  For fun I also added
pulling $Status History.Draft.USER$ and $Status History.Draft.TIME$ and the
server correspondingly is running the SQL four times sequentially.

I can certainly think of strategies to work around this, but wanted to see
if anyone knows anything about it.

Thanks,
Charlie

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
"Where the Answers Are, and have been for 20 years"

Reply via email to