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

udfs looses value after a exeption is thrown by a script
Goto page 1, 2  Next
 
Post new topicReply to topic    TrackStudio Forum Forum Index -> TrackStudio Support
View previous topic :: View next topic  
Author Message
Die-Planer



Joined: 13 Oct 2008
Posts: 15

PostPosted: Thu Oct 01, 2009 12:04 pm    Post subject: udfs looses value after a exeption is thrown by a script Reply with quote

Hello,

we have some trouble with our user definded fields.
When someone creates a message we're checking the data with scripts. For example

Code:
if (message.getHrs().doubleValue() < 0.0001)
        throw new Exception("'Actual Time' muss einen Eintrag haben!");
   
   return message;


The type of script in this case is "Trigger / Add Message / BEFORE Trigger".

Now, when a execption is thown, we have the problem that we lost all data in our udf. That means, for example, that the text in a memo field is empty, or a value, choosen i a list, is reset to "choose" after getting the exception.

When the user now fill in the actual time a saves the message again we loose the data in our udfs.

Do you have an idea what is our mistake?
Back to top
View user's profile Send private message
admin
Site Admin


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

PostPosted: Thu Oct 01, 2009 12:53 pm    Post subject: Re: udfs looses value after a exeption is thrown by a script Reply with quote

Which TrackStudio version do you use now ?
_________________
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
Die-Planer



Joined: 13 Oct 2008
Posts: 15

PostPosted: Fri Oct 09, 2009 3:50 pm    Post subject: Reply with quote

We're using TrackStudio v3.5.49
Back to top
View user's profile Send private message
admin
Site Admin


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

PostPosted: Fri Oct 09, 2009 7:44 pm    Post subject: Reply with quote

Die-Planer wrote:
We're using TrackStudio v3.5.49


Please check this topic:
http://www.trackstudio.com/documentation/35/html/Implementing_Triggers.html
_________________
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
Die-Planer



Joined: 13 Oct 2008
Posts: 15

PostPosted: Mon Oct 12, 2009 12:31 pm    Post subject: Reply with quote

We are aware of this topic and designed our scripts accordingly.
I realized that we sometimes used Exception instead of UserMessageException but that had no influence on our problem.

I will try to state our problem more clearly:
- We have several user-defined fields, some can only be edited in the task, some can be changed via a message
- We use "Add Message / BEFORE Trigger" to hook up our validation scripts
- When the user submits a message and the script throws an exception all user-defined fields are beeing reset to their default values

For example, we have a memo udf "Internal Information".
It already has some content and the user adds info to it, writes a message text and submits. He forgets to enter the actual time, so our validation script throws an exception.
Now all text in the memo udf is lost.
If the user realizes this, he can restore the old content from the task data below and hopefully can remember what he added.
If the user fails to realize the lost info, he only enters the actual time, submits and the data in the udf-memo is lost completely.

To ensure that the problem is not caused by our validation script, we used one of the example scripts you provided in your documentation.
(from here: http://www.trackstudio.com/documentation/35/html/Implementing_Triggers.html)
The problem still occured.

I fail to see a configuration misstake on our side, yet if it is indeed a mistake on our behalf I'd appreciate your help in correcting it.
I am sure you can imagine how frustrating such a problem can be.

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


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

PostPosted: Mon Oct 12, 2009 1:39 pm    Post subject: Reply with quote

ok, we'll check this.
_________________
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
admin
Site Admin


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

PostPosted: Wed Oct 14, 2009 12:40 am    Post subject: Reply with quote

Please try this version

SA + JRE for Windows: http://www.trackstudio.com/tse-35/TrackStudio_3558_windows_with_jre.exe
SA + JRE for Linux: http://www.trackstudio.com/tse-35/TrackStudio_3558_unix_with_jre.tar.gz
SA for Windows: http://www.trackstudio.com/tse-35/TrackStudio_3558_windows.exe
SA for UNIX: http://www.trackstudio.com/tse-35/TrackStudio_3558_unix.tar.gz
WAR: http://www.trackstudio.com/tse-35/TrackStudio_3558.zip
_________________
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
Die-Planer



Joined: 13 Oct 2008
Posts: 15

PostPosted: Wed Oct 28, 2009 7:19 pm    Post subject: Reply with quote

admin wrote:
Please try this version


The problem still occurs.
It seems simple drop-down lists work now, but textboxes, listboxes and memos still loose their values with 3.5.58.

To illustrate the behaviour I prepared a little clip for you. It's an 24.5 MB, 1:18 minutes *.avi-File:
http://rapidshare.com/files/299145759/TrackStudio.avi.html
MD5: 51FCE31E28089E97ECF505F36D4801DE
(It can only be downloaded 10 times, so I hope it's still there when you get to it.)
Back to top
View user's profile Send private message
admin
Site Admin


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

PostPosted: Fri Oct 30, 2009 2:52 pm    Post subject: Reply with quote

Please try this one
SA + JRE for Windows: http://www.trackstudio.com/tse-35/TrackStudio_3562_windows_with_jre.exe
SA + JRE for Linux: http://www.trackstudio.com/tse-35/TrackStudio_3562_unix_with_jre.tar.gz
SA for Windows: http://www.trackstudio.com/tse-35/TrackStudio_3562_windows.exe
SA for UNIX: http://www.trackstudio.com/tse-35/TrackStudio_3562_unix.tar.gz
WAR: http://www.trackstudio.com/tse-35/TrackStudio_3562.zip
_________________
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
Die-Planer



Joined: 13 Oct 2008
Posts: 15

PostPosted: Wed Nov 04, 2009 11:17 am    Post subject: Reply with quote

admin wrote:
Please try this one


Thanks.
We are going to try this next week and inform you if the problem is solved as soon as we get to it.
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
Goto page 1, 2  Next
Page 1 of 2

 
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