EnglishRussianUkrainianChinese
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Can we do conditional transition of states?

 
Post new topicReply to topic    TrackStudio Forum Forum Index -> TrackStudio Support
View previous topic :: View next topic  
Author Message
fcai



Joined: 24 Jun 2009
Posts: 44

PostPosted: Thu Jul 02, 2009 12:40 am    Post subject: Can we do conditional transition of states? Reply with quote

one-to-many states case
A->B
A->C
A->D

Transition of state is based on execute script/trigger on a custom field value.
It is kind of dynamically transition from one state to one of other states based on certain custom field value.

Currently ,It looks like I can only relate transition to a given message which does not allow me to do dynamic transition of state.

Can we do that?


Thanks
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 01 Jan 1970
Posts: 6122
Location: Smolensk, Russia

PostPosted: Thu Jul 02, 2009 4:48 pm    Post subject: Re: Can we do conditional transition of states? Reply with quote

Which TS version do you use ?
_________________
Maxim Kramarenko (mailto: maximkr@trackstudio.com)
TrackStudio - Hierarchical Bug & Issue Tracking Software
http://www.trackstudio.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
fcai



Joined: 24 Jun 2009
Posts: 44

PostPosted: Thu Jul 02, 2009 7:34 pm    Post subject: 3.5.51 Reply with quote

3.5.51
I did some investigation and it seems like transition of state has be bound to the message creation which I could not do state transition on fly.
Back to top
View user's profile Send private message
Tr1aL
TrackStudio Support


Joined: 15 Apr 2008
Posts: 60
Location: Smolensk

PostPosted: Mon Jul 06, 2009 4:57 pm    Post subject: Reply with quote

For example, before add message trigger
Code:

String udfValue = message.getUdfValue("Name of Custom Field");
if (udfValue.equals("value 1"))
    message.setMstatus("Name of state B");
else if (udfValue.equals("value 2"))
    message.setMstatus("Name of state C");
else if (udfValue.equals("value 3"))
    message.setMstatus("Name of state D");
return message;
Back to top
View user's profile Send private message
fcai



Joined: 24 Jun 2009
Posts: 44

PostPosted: Mon Jul 06, 2009 7:32 pm    Post subject: But how to define the transition in this case? Reply with quote

Thanks, Tr1aL.

Should I do multiple Starting State like this and how?

A->B
A->C
A->D
Back to top
View user's profile Send private message
Tr1aL
TrackStudio Support


Joined: 15 Apr 2008
Posts: 60
Location: Smolensk

PostPosted: Mon Jul 06, 2009 8:49 pm    Post subject: Reply with quote

Yes
Back to top
View user's profile Send private message
fcai



Joined: 24 Jun 2009
Posts: 44

PostPosted: Mon Jul 06, 2009 9:06 pm    Post subject: Still not understand Reply with quote

In order to do A->B,A->C, A->D, It looks like I need create at least 3 types of messages associated with it.

Is anyway I can do this dynamic transition in one message creation?
Back to top
View user's profile Send private message
fcai



Joined: 24 Jun 2009
Posts: 44

PostPosted: Tue Jul 07, 2009 12:26 am    Post subject: Here is what I tried based on your suggestion: Reply with quote

1. create before add message trigger (or after add message trigger)
CT(conditional transition) with the following script code:

String udfValue = message.getUdfValue("Cost");
if (udfValue.equals("100"))
message.setMstatus("B");
else if (udfValue.equals("200"))
message.setMstatus("C");
else if (udfValue.equals("300"))
message.setMstatus("D");
return message;

2. create workflow "Conditional Transition Flow" with state 'A', 'B', 'C', 'D'.

3. create a message type 'note' with transition from 'A'->' A'
and using predefined trigger 'CT'. (can not do 'A' to 'B', 'A' to 'C' or 'A' to 'D' in same message type note)


4 create custom field 'Cost' in "Conditional Transition Flow' with type Integer(Also tried String type too and not working neither).

Set value=200

5. Then I create Category 'Purchase' using 'Conditional Transition flow'

6. create a project from category above.

7. create message 'note' in project and project state still in 'A', it does not jump to 'B'.



Have I done something wrong here or missed something?


Thanks,

Fred
Back to top
View user's profile Send private message
Tr1aL
TrackStudio Support


Joined: 15 Apr 2008
Posts: 60
Location: Smolensk

PostPosted: Wed Jul 08, 2009 12:27 am    Post subject: Reply with quote

Sorry, I don't understand you in last message.
Trackstudio save history of state transactions, on it you should create transactions for all state changes.
Create:
Note B (A->B)
Note C (A->C)
Note D (A->D)
After that you can use them in triggers.
Back to top
View user's profile Send private message
fcai



Joined: 24 Jun 2009
Posts: 44

PostPosted: Wed Jul 08, 2009 1:11 am    Post subject: does this mean I can not do dynamic state transition? Reply with quote

Tr1aL wrote:
Sorry, I don't understand you in last message.
Trackstudio save history of state transactions, on it you should create transactions for all state changes.
Create:
Note B (A->B)
Note C (A->C)
Note D (A->D)
After that you can use them in triggers.



Thanks a lot, Tr1aL.

So basically I could not do state transition on fly based on value of a custom field in one state transaction (create a message for project), correct?

I think it will be very nice if you can provide this feature in your future release.

Fred
Back to top
View user's profile Send private message
Display posts from previous:   
TrackStudio Forum Forum Index -> TrackStudio Support All times are GMT + 3 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Copyright © 2002-2009,   TrackStudio, Ltd.
Contact Us