Google Task API "update" property time does not change when modifying details or date/time - google-api

When changing the "details" field ("notes" in the API response) or Date/time field ("due" in the API response) of a task in the UI at https://mail.google.com/tasks/canvas does not change the "updated" time of the task and by extension the "updated" time of the tasklist.
Is there a way to change this behaviour to updating the update time no matter what change is made to a task?
Could this be a bug? Seems odd to me that changing those fields would not count as an update to the task.
Modyfying a task in any other way results in the update time to be registered as expected. From my experience it appears that only those two fields don't behave as expected

Related

Power Automate Get Planner Task Assignee Names

I'm working on a Power Automate flow where the flow is supposed to connect to Planner, get the tasks which are due tomorrow and send a message to an MS Teams Channel.
I got the entire flow working except of one thing - getting the names of the person(s) whom the task is assigned.
Here's my current flow:
Getting the list of Tasks from Planner,
Filter those which have a Due Date set,
Filter the ones which have the Due Date tomorrow,
Get the Name of the Task Creator using Get User Profile,
Send the data into an MS Teams Channel.
This all works perfectly fine. However I also need to get the names of the Assigned users. I understand that they come as an array. And when I try to add it to the same Get User Profile it's getting wrapped into an unnecessary "Apply to Each" which breaks everything.
Does anyone have a clue how this can be solved? Basically I need only 1 Assignee as we are not going to assign the same task to more than 1 person.
Any help would be much appreciated!
In order to avoid the loop (which is also a valid approach, long story) then you can use an expression to get the first (in case there are multiple) assigned user.
This is an example where you don't need to loop ...
... you can see I've initialised a (string) variable at the top which will hold the user ID GUID.
... then further down in the Set Assigned To operation, this is the expression I use ...
item()?['_assignments'][0]['userid']
That gets the first user and then the associated userid property. You can then pass that into the Get user profile (V2) task ...
Obviously, you need to adapt that to your flow but I hope that makes sense.

Select Business Process Flow Stage onChange of a Field Value

I am trying to update a business process flow stage using Workflow or JavaScript.
First I tried with JavaScript using below method,
Xrm.Page.data.process.moveNext(onSetActiveStage);
But the problem with this method is if the active stage is greater than the required selected stage then moveNext logic will not work.
I know I can use movePrevious as well but it will be another overhead as sometime the active stage will be before the required stage and sometime it will be after.
The other option for me was on some field change I can use a workflow to activate or select a stage on business process flow.
For that I created a workflow and selected my BPF as my entity and selected a field on Process Change.
And inside my Set Properties, I set Active stage as the required stage which I want to mark as active.
The above logic is not working for me on change of the field.
I am new to BPF, please bear with me if I am making some basic mistake.
If you are following this blogpost, the comments below the post says - it's not working/triggering for custom BPF and you have to refresh the form to see the changes. Make sure if this is what affecting you.
Also you can un-check the "Workflow Job Retention" checkbox for troubleshooting to see if its triggering or not.
Btw, your design seems to be little confusing, required stage before/after active stage does not makes sense. You may need to add the different branch and "Data step" to make it required in different scenarios.
If this is not feasible, then try to use scripting to set the active stage or plugin/custom action to set the stage on your trigger.

Maximo: Use script to update work order when a related table is updated

I have an automation script in Maximo 7.6.1.1 that updates custom fields in the WORKORDER table.
I want to execute the automation script when the LatitudeY and LongitudeX fields (in the WOSERVICEADDRESS table) are edited by users.
What kind of launch point do I need to do this?
Edit:
For anyone who's learning automation scripting in Maximo, I strongly recommend Bruno Portaluri's Automation Scripts Quick Reference PDF. It doesn't have information about launch points, but it's still an incredibly valuable resource.
I wish I'd known about it when I was learning automation scripting...it would have made my life so much easier.
You can create an attribute action launch point on the latitudeY field and another on the longitudeX field. These will trigger whenever each field is modified, so it will fire once when the latitudeY field was changed, again if the longitudeX field is changed, again if the longitudeX field is changed again, and so on. This is also all before the data is saved, so the user may choose to cancel their changes, but the scripts will still have fired.
You could also make an "on save" object launch point for WOSERVICEADDRESS (if that's what is actually being updated via the map). This will run any time data in the object is saved, so you would have to do the extra checks of seeing if either of those fields have changed and then do your logic, but at least it would run once and only if the user commits to their changes.
Related:
Populates WORKORDER.WOSAX and WORKORDER.WOSAY (custom fields) from the values in WOSERVICEADDRESS.LONGITUDEX and WOSERVICEADDRESS.LATITUDEY.
woMbo=mbo.getOwner()
longitudex=mbo.getString('longitudex')
latitudey=mbo.getString('latitudey')
if woMbo is not None:
wosax=woMbo.getString('WOSAX');
wosay=woMbo.getString('WOSAY');
if longitudex!=wosax:
woMbo.setValue('WOSAX',longitudex)
if latitudey!=wosay:
woMbo.setValue('WOSAY',latitudey)
The launch points are Attribute Launch Points, not Object Launch Points.

What is the difference between startDate and a filter on "published" in the Okta Events API?

I've written a .NET app using the Okta.Core.Client 0.2.9 SDK to pull events from our organization's syslog for import into another system. We've got it running every 5 minutes, pulling events published since the last event received in the previous run.
We're seeing delays on some events showing up. If I do a manual run at the top of the hour for the previous hour's data, it'll include more rows than the 5-minute runs. While trying to figure out why I remembered the startDate param, mutually-exclusive with the filter one I've been using.
The docs don't mention much about it - just that it "Specifies the timestamp to list events after". Does it work the same as published gt "some-date"? We're capturing data for chunks of time, so I needed to include a "less than" filter and ignored startDate. But the delayed events have me looking for a workaround.
Are you facing delayed results using startDate or filter?
Yes published gt "some-date" and startDate work the same way. The following two API calls.
/api/v1/events?limit=100&startDate=2016-07-06T00:00:00.000Z
and
/api/v1/events?limit=100&filter=published gt "2016-07-06T00:00:00.000Z"
returns the same result. Since, they are mutually exclusive filter might come in handy in creating more specific queries including the other query parameters in your query using filter.

Google Calendar API : event update with the Ruby gem

I'm using https://github.com/google/google-api-ruby-client to connect to different google API in particular the Google Calendar one.
Creating an event, updating it and deleting it works most of the time with what one can usually find around.
The issue appears when one tries to update an event details after a previous update of the dates of the event.
In that case, the id provided is not enough and the request fails with an error :
SmhwCalendar::GoogleServiceException: Invalid sequence value. 400
Yet the documentation does not mention such things : https://developers.google.com/google-apps/calendar/v3/reference/calendars/update
The event documentation does describe the sequence attribute without saying much : https://developers.google.com/google-apps/calendar/v3/reference/events/update
What's needed to update an event ?
Is there specific attributes to keep track of when creating, updating events besides the event id ?
how is the ruby google api client handling those ?
I think my answer from Cannot Decrease the Sequence Number of an Event applies here too.
Sequence number must not decrease (and if you don't supply it, it's the same as if you supplied 0) + some operations (such as time changes) will bump the sequence number. Make sure to always work on the most recent copy of the event (the one that was provided in the response).
#luc answer is pretty correct yet here are some details.
Google API documentation is unclear about this (https://developers.google.com/google-apps/calendar/v3/reference/events/update).
You should consider that the first response contains a sequence number of 0.
The first update should contain that sequence number (alongside the title, and description etc ). The response to that request will contain an increment sequence number (1 in this case) that you should store and reuse on the next update.
While the first update would imply a sequence number of 0 (and work) if you don't pass any the second might still pass but the third will probably not (because it's expecting 1 as sequence).
So that attribute might appear optional but it is actually not at all optional.

Resources