Forums

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

Validating that time spent field before closing

Sema YILDIRIM July 19, 2022

When turning off Sub-Task, make it mandatory if time spent has not been entered before, and you can leave it blank if it is. I want to edit in the form of half, would you be ok?

 

1 answer

0 votes
Ekaterina Smykova
Contributor
July 28, 2022

Hello @Sema YILDIRIM , 

I might not understand the exact point. 

If end user will know that anyway field can be left empty, no one will fill in time :) 

Sema YILDIRIM
Contributor
September 6, 2022

Hello @Ekaterina Smykova  ,

Thank you. My goal is to close the "issue" if "time spent" is not entered before, make it mandatory and allow the transition when I enter it on the screen that appears. Currently, if there is no time spent, it is mandatory, but when I enter it on the screen, it still says mandatory.

 

if (issue.timeSpent == 0 )
{    
throw new InvalidInputException("worklog_timeLogged",
"Time Spent is required ")
}else
{  
return true
}

Suggest an answer

Log in or Sign up to answer