Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.
 

[UI Script] Change text input to timespan picker input


#1

I am hoping to be able to change the time elapsed in test case result dialog to a timespan picker,

see Duration Example @ http://jonthornton.github.io/jquery-timepicker/ for an example

I have attempted to implement this code in the UI script as follows:

js: $(document).ready( function() { $.subscribe('result_dialog.loaded', 'uiscript_require_comment' { $('#addResultElapsed').timepicker({ 'minTime': '8:00am', 'maxTime': '11:30pm', 'showDuration': true }); });

but does not seem to be working - any thoughts? Thanks


#2

Hello Gavin,

Thanks for your posting. It wouldn’t be supported to add this control to the Elapsed field. The Elapsed field is a time span field and expects values such as “1 hour”, “2 minutes and 30 seconds” or just “2m 30s”. I believe the control you would like to integrate is for selecting a time value instead and wouldn’t use the expected format of TestRail.

You can learn more about the Estimate and Elapsed fields here:

http://docs.gurock.com/testrail-userguide/userguide-tips#scheduling_and_forecasting

I hope this helps!

Regards,
Tobias


#3

Thanks for the feedback, never knew about the timer :slight_smile: This should work for us. Thanks again


#4

Thanks for the update and great to hear that this works for you. :slight_smile:

Regards,
Tobias