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.