Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

When does the value in Time Spent get added to the "Sigma Time Spent" field?

Ryan McBryde July 25, 2019

I have created a transition from In Progress to Closed and I want to insure that some time has been spent on this issue before it is closed.  I have created a transition screen for the transition from In Progress to Closed and I have attached a Validator to the transition. I am using the JSU Field Required validator and I am checking the value of the "Sigma Time Spent" field to make sure that it has a value. If it doesn't then I prevent the transition from succeeding. I have added the Time Spent field to the Transition screen and the expectation is that if the validator finds no value in the "Sigma Time Spent" field then the user can enter a value in the Time Spent field, which should get added to the "Sigma Time Spent" field and allow the close to go through.  However I am finding that it does not and complains that there is no value in the "Sigma Time Spent" field. Does anyone know when the value that I enter into the Time Spent field gets added to the "Sigma Time Spent" field?  Is it before or after the validator runs?  It appears to be after.   I tried to just use the Time Spent field on the validator and that only works if I enter a value into the field when closing, but it does not recognize that there was already time spent logged earlier, which is why I am trying to use the "Sigma Time Spent" field.  Support says "that field doesn't store actual data as it calculates" but I have found that if I have logged time against this issue previously that it recognizes it and permits the transition.  As I said above, I want to insure that some time has been logged against this issue before it is allowed to be closed.  That time does not have to be logged as the record is closed, previously logged time should count.

1 answer

0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 25, 2019

I am really struggling to read that "stream of consciousness", I think a lot of us would appreciate some paragraphs.

That aside, there is a short answer - time spent gets added to an issue when it is logged.  Specifically, when the logger puts in a time, hits "commit" and it passes all validation and gets added to the issue.

The "Sigma time spent" field calculates from the issue and its sub-task issues when either are updated.

Ryan McBryde July 25, 2019

Thanks nic and my apologies.  I copied and pasted it in without giving a thought to readability.  I will make sure to do so going forward.

And thank you for confirming what I thought,  The validation has to pass before the value in Time Spent gets added to Sigma Time Spent and so if I am checking the contents of Sigma Time Spent in the validator, the value that I entered on the transition screen has not been added yet.  Catch-22.

Any thoughts on how to force the Sigma Time Spent to be populated prior to close?  I had thought simply to put the same validator on a previous status, maybe Done, but the same problem still presents.

I had tried to give the validator a choice; that if either the Time Spent field or the Sigma Time Spent field had a value, then to permit the transition, but that does not appear to be possible.

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 27, 2019

Ok, great, that makes sense.  Your validator should look at "current sigma + entered data" rather than trying to look at "current sigma" alone because the entered data will not be added until after the validator executes.

You can't force the time to update before the data is being committed, that is asking the system to guess the future!

Ryan McBryde July 29, 2019

Thanks nic,

I will try but I don't know if the validator can assess the value of concatenated fields.  It would solve the problem if it can because then it's looking to see if either field is populated, kind of an "OR" condition, and allowing the transition if one or the other has a value.

I can't be the first one to address this use case.  Any idea how others have done it?

Suggest an answer

Log in or Sign up to answer