Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Hi, I Failed To Update The "Started At" And The "Completed At" Attributes In The "Info" Tab. I Tried To Do So By The Following Steps:

Hi,
I failed to update the "STARTED AT" and the "COMPLETED AT" attributes in the "INFO" tab. I tried to do so by the following steps:
Get the task_data dictionary by using the task.export() function. Change the matching values in the dictionary (DateTime values).  Update the task dictionary by using the task.import() functions.Also, I couldn't change the task status from draft to complete (using task.completed() function). If there anybody can help with those issues, I will be glad.

  
  
Posted 4 years ago
Votes Newest

Answers 11


Hi SpotlessFish46

In order to mark task as completed, it should start first, can you try:

task = Task.create(project_name="projectX", task_name='YYY') task.mark_started() task.completed()?

  
  
Posted 4 years ago

I couldn't change the task status from draft to complete

Task.completed(ignore_errors=True)

  
  
Posted 4 years ago

Task.completed(ignore_errors=False)
What are you getting?

  
  
Posted 4 years ago

I failed to update the "STARTED AT" and the "COMPLETED AT" attributes in the "INFO" tab.

I'm not sure this can actually be overridden...

  
  
Posted 4 years ago

Hi SpotlessFish46 ,

can you send a code example? I want to try reproduce it on my side

  
  
Posted 4 years ago

Task.completed(ignore_errors=True)

I tried to use it, but the status still unchanged.

  
  
Posted 4 years ago

After the running, I checked in the web UI if the status changed, and it didn't —the running finishing without any errors or replies.

  
  
Posted 4 years ago

Great! now it's working. The status changed to completed.
Thanks TimelyPenguin76 !

  
  
Posted 4 years ago

Hi TimelyPenguin76 ,
the code example is:
task = Task.create(project_name="projectX", task_name='Y') task.completed(ignore_errors=False)

  
  
Posted 4 years ago

what's the error/reply ?

  
  
Posted 4 years ago

I got the following Error:
2020-10-27 19:26:57,222 - trains.Task - ERROR - Action failed <500/0: tasks.completed/v2.2 (unsupported operand type(s) for -: 'NoneType' and 'datetime.datetime')> (force=False, task=9bbd60866e5646c8aacad418ae7fc86f, status_reason=completed)

  
  
Posted 4 years ago
975 Views
11 Answers
4 years ago
one year ago
Tags