udfs looses value after a exeption is thrown by a script

Discuss problems installing or using TrackStudio.

udfs looses value after a exeption is thrown by a script

Postby Die-Planer » Thu Oct 01, 2009 12:04 pm

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: Select all
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?
Die-Planer
 
Posts: 16
Joined: Mon Oct 13, 2008 10:38 am

Re: udfs looses value after a exeption is thrown by a script

Postby admin » Thu Oct 01, 2009 12:53 pm

Which TrackStudio version do you use now ?
Maxim Kramarenko (mailto: maximkr@trackstudio.com)
TrackStudio - Hierarchical Bug & Issue Tracking Software
http://www.trackstudio.com
admin
Site Admin
 
Posts: 7305
Joined: Thu Jan 01, 1970 3:00 am
Location: Smolensk, Russia

Postby Die-Planer » Fri Oct 09, 2009 3:50 pm

We're using TrackStudio v3.5.49
Die-Planer
 
Posts: 16
Joined: Mon Oct 13, 2008 10:38 am

Postby admin » Fri Oct 09, 2009 7:44 pm

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


Please check this topic:
http://www.trackstudio.com/documentatio ... ggers.html
Maxim Kramarenko (mailto: maximkr@trackstudio.com)
TrackStudio - Hierarchical Bug & Issue Tracking Software
http://www.trackstudio.com
admin
Site Admin
 
Posts: 7305
Joined: Thu Jan 01, 1970 3:00 am
Location: Smolensk, Russia

Postby Die-Planer » Mon Oct 12, 2009 12:31 pm

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/documentatio ... ggers.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.
Die-Planer
 
Posts: 16
Joined: Mon Oct 13, 2008 10:38 am

Postby admin » Mon Oct 12, 2009 1:39 pm

ok, we'll check this.
Maxim Kramarenko (mailto: maximkr@trackstudio.com)
TrackStudio - Hierarchical Bug & Issue Tracking Software
http://www.trackstudio.com
admin
Site Admin
 
Posts: 7305
Joined: Thu Jan 01, 1970 3:00 am
Location: Smolensk, Russia

Postby admin » Wed Oct 14, 2009 12:40 am

Maxim Kramarenko (mailto: maximkr@trackstudio.com)
TrackStudio - Hierarchical Bug & Issue Tracking Software
http://www.trackstudio.com
admin
Site Admin
 
Posts: 7305
Joined: Thu Jan 01, 1970 3:00 am
Location: Smolensk, Russia

Postby Die-Planer » Wed Oct 28, 2009 7:19 pm

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/T ... o.avi.html
MD5: 51FCE31E28089E97ECF505F36D4801DE
(It can only be downloaded 10 times, so I hope it's still there when you get to it.)
Die-Planer
 
Posts: 16
Joined: Mon Oct 13, 2008 10:38 am

Postby admin » Fri Oct 30, 2009 2:52 pm

Maxim Kramarenko (mailto: maximkr@trackstudio.com)
TrackStudio - Hierarchical Bug & Issue Tracking Software
http://www.trackstudio.com
admin
Site Admin
 
Posts: 7305
Joined: Thu Jan 01, 1970 3:00 am
Location: Smolensk, Russia

Postby Die-Planer » Wed Nov 04, 2009 11:17 am

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.
Die-Planer
 
Posts: 16
Joined: Mon Oct 13, 2008 10:38 am

Next

Return to TrackStudio Support

Who is online

Users browsing this forum: No registered users and 2 guests

cron