[rt-users] Validation of workflow
Rick Russell
rickr at rice.edu
Mon Apr 3 21:49:27 EDT 2006
Eric Horne wrote:
> We've found that there are times when the owner says the work has
> reached the milestone, but have not completely filled in all the
> required custom fields.
You could check the state of those custom fields before you commit
anything. Doesn't RT->Logger have the ability to post messages that the
user can see at the top of the page? Like
$RT::Logger->error("Fill in the Building field, dingus!");
I've never actually used that, but I suppose I could.
> The owner indicates the milestone as a yes/no custom field on
> transactions. There is a Scrip that fires if there is a transaction
> custom field is set to "yes" and that creates the new ticket in the
> other queue.
Remember you can have two different bits of commit code: the "prep" code
that has to return true, and the "commit" code that has to return true.
So you could perform these checks in the prep code, and fail to commit
if the prep code doesn't check out.
> 1)If the custom field was conditionally available on the WebRT form
> based on some generic condition (like the build location is not null),
Gack, no idea.
> 2) There is an opportunity to feedback to the user that the milestone
> change is not valid prior to committing the transaction (in other words,
> the transaction is conditionally allowed to proceed). If the transaction
> fails to meet some criteria (generic condition code), it provides
> immediate feedback to the owner about why.
Yeah, look into $RT->Logger.
Rick R.
More information about the rt-users
mailing list