Timetracking, substitute columns

As has been discussed previously in this forum, there is no ability to add timetracking info as a mutation with the API.

I was told from support this morning that this is not even on the radar for adding/implementing any time soon as it isn’t a part of any roadmap.

Is anyone substituting this column in a way to circumvent the issue? I was considering whether anyone had tried to stringify JSON values into a long text column, or updates, something similar etc.

Hi @Adurm,

Happy to relay this as feedback for our team!

For now, I think a Long Text column would definitely work. One thing to keep in mind is that these values in the Time Tracking column will now be stored in accordance with ISO8601, so this may affect the length of text.

Keeping this up for the other amazing members of our community to weight in on.

Just to clarify if anyone is looking for a substitute due to the serious inadequacy of the time tracking and API - I have implemented my own version via serialising/parsing a time tracking schema into the “updates” for board items.

It’s a messy approach if people are relying on the updates with the Monday interface for anything else, but in my case it will suffice as the updates aren’t being used much elsewhere and I am filtering them into my own app by searching for a keyword that is built into the schema.

1 Like

Hey @Adurm

Thanks so much for your feedback on this, and I’m glad you were able to find a somewhat messy, but working solution. I definitely realize it would be great to see improvements in this area moving forward, and I’ve passed your comments on this to our product team directly.

I’m sure other users would appreciate if you shared your solution as well :slight_smile: Thanks so much for participating in our community.

-Alex

//model
import * as moment from "moment";
import * as _ from 'underscore';

export class TimeEntry {
    id: string;
    user: string;
    date: string;
    duration: number;
    item: string;
    editing: boolean=false;
    isNew:boolean = false;

    object() {
        return { user: this.user, date: this.date, duration: this.duration, item: this.item, type: 'TimeEntry' }
    }

    static parse(id, stringified) {
        let result = new TimeEntry();

        result.id = id;
        console.log(stringified);
        Object.assign(result, JSON.parse(stringified));
        return result;
    }
    
    constructor() {
        
    }
}

//services (angular/rxjs)

TimeTracking$(ids: string[]): Observable<any> {

    let query = `items(ids:[${ids.join(' ')}]){

      id

      updates {

        id

        text_body

      }

    }`

    return this.Query$(query).pipe(

      map((result:any) => result && result.items ? result.items : []),

      map((items) => _.map(items, i => i.updates)),

      map((updates) => _.flatten(updates)),

      map((updates) => _.filter(updates, u => u.text_body.indexOf('TimeEntry') > -1)),

      map((updates) => _.map(updates, u => TimeEntry.parse(u.id, u.text_body))),

      take(1)

      )

  }

  UpdateTimeEntry$(entry: TimeEntry) {

    return this.DeleteTimeEntry$(entry).pipe(

      switchMap(id => this.CreateTimeEntry$(entry)),

      take(1)

    )

  }

  DeleteTimeEntry$(entry: TimeEntry) {

    let m = `delete_update (id: ${entry.id}) {

      id

      }`;

    return this.Mutate$(m).pipe(take(1));

  }

  CreateTimeEntry$(entry: TimeEntry) {

    let m = `create_update (item_id: ${entry.item}, body:${JSON.stringify(

      JSON.stringify(entry.object())

    )}) {

      id

      }`

    return this.Mutate$(m).pipe(take(1));

  }

Hi @Adurm,

I also want to add that while you’re unable to add Time Tracking information using the API (i.e. add in past time tracking data), you can start and stop time tracking using the API.

To start a time tracking session, send {"running" : "true"} as an argument in the change_column_value() mutation. To stop a time tracking session, send {"running" : "false"}.

Thanks,
Helen

Yes. i find this a particularly unuseful feature for my team.

Same issue here - we needed to set time tracking column values via the API but I can see that it’s impossible.
Is this feature still absent from Monday’s roadmap?

Could you please link the API documentation page describing mutations for the Time Tracking column? I can’t seem to find any mention of that column type in API docs column type reference.
Thanks!

1 Like

How is this column still completely unsupported as a mutation throught the API?!? It has beed really long time from what I read in the forums here, when this was first brought up and yet no option to do anything. The proposed solution from Helen (from 21 May 2021) is STILL not working… Are you joking?

No documentation, no actual guidence. I finnaly manipilate the query to a point that the API actually processed it correctly and not just had a 500 fit and then get an error saying that the time_tracking column type is not supported yet… When will it be supported?? Will it be?

For anyone else on this long journey:

mutation { 
    change_column_value (
        board_id: xxx,
        item_id: yyy,
        column_id: "time_tracking",
        value: "{ \"running\": true }"
    ) { id } 
}
{
    "error_code": "ColumnValueException",
    "status_code": 200,
    "error_message": "This column type is not supported yet in the api",
    "error_data": {
        "column_type": "DurationColumn"
    }
}
2 Likes

Can you provide an example of a working mutation call for this?

Seems others have, and myself, and it doesnt work.

We get around it by flipping a status and having an automation follow that, but its kludgy and just adds yet another trigger that the platform has to process.

Is this still not supported? is there any workaround?

Hello @gary,

If what you are trying to do is update the time tracking column via API, it can not be done as of today and we do not have an ETA on when that could change.

Let me know if you have any other questions!

Cheers,
Matias