Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
Hello
I can get date value from CLI like below
command > tm results --caseID=1111 --fields="Modified Date"
output > Sep 25, 2019 11:53:47 AM
outputs can be several.
question1 : in case of several outputs, how can I select latest date output?
question2 : how can I put date output to integrity field(date type)
Thank you very much
Solved! Go to Solution.
First of all, I appreciate your reply
I will use this solution in java script that will be started when test case result modified(modified time criteria is still unclear. it's next problem)
but I finally found best solution
The solution is computation function "lastResultDate()"
this function can resolve my request at once.
Thank you very much
PS. Can I get a document file about computation function list?
that will be very helpful for me.
I'm not sure you can get just one result from the tm results command, but you can sort descending by the modified Date. That way the first result returned would be the newest one. To sort, add the following options to your command: --sortField=modifiedDate --nosortAscending
For more information on the options for tm results, see the CLI documentation:
As for adding the information to a date type field: how are you doing this? I mean, is this a CLI Script (shell, batch) or API program? Is the date field on the case ID or some other item?
If this is in a script, then you'll need to read in the output from the tm results command, and save the first value, then you can edit an issue and set the date using the CLI:
im editissue --field="date field"="Date" [item ID]
Whether to include the time depends on how the date field is configured. For more information on editissue command:
First of all, I appreciate your reply
I will use this solution in java script that will be started when test case result modified(modified time criteria is still unclear. it's next problem)
but I finally found best solution
The solution is computation function "lastResultDate()"
this function can resolve my request at once.
Thank you very much
PS. Can I get a document file about computation function list?
that will be very helpful for me.
sorry, already posted link to the functions.
Thank you for your endless concern 🙂