Reopen a completed project on Active Collab - activecollab

How can I run the reopen project that is found on completed projects in active collab (the URL, and or data I need to post)?
I already have new project, complete project, and a slew of other commands implemented, so I have the API up and running.
I also tested this in PUT and POST to no avail:
/projects/ID DATA-> "is_completed": false

In order to open a completed project, you'd need to hit dedicated API endpoint for that which is
api/v1/open/project/{projectId} => where you'll replace {projectId} with your projectId ID.
Keep in mind that the method is PUT.

Related

EWS - OnNotificationEvent => which fields were modified?

I'm getting streaming notifications from folder: 'Calendar' by using the EWS Managed API.
I have subscribed to EventTypes: Created, Moved, Modified, and Deleted.
When I get a notification where the EventType = Modified, I can read values like ItemId and ChangeKey.
My question: Is it possible to find out which fields were modified?
Or can I somehow get the previous version of the calendar item (before modified)?
Any suggestions appreciated.
No its expected in the instance that you are synchronizing changes that you would have a local version to compare any changes against. On Exchange under the recoverableItems Non_IPM_Subtree folder there is Calendar Logging folder that does store information about changes made to the calendar items but this is meant for Calendar repair/diagnostics rather then synchronization.

How to reload gmail add-on through background process using app-script

May i get some help on the below points where i am using app-script to develop a gmail add-on:
How can we refresh gmail add-on with back ground process?
=> Here is my case, I need to display card with multiple sections which is the process of hitting multiple apis to fetch data and to display the card. For this initially we will show a card with minimal information to the user once i get information from api, i need to update the basic cards with complete information.
How can we trigger a function on every mail thread open?
=> Currently it works once for a mail, here as explained above point need to refresh a card once we fetch the data. If not, user will be seeing same basic information card every time he opens the mail.
From above mentioned issues for point one we are trying to get solution where we can hit service for certain interval of time to check data availability and if data exists then fetch data and update cards, i mean to say need a setTimeout function kind of thing, unfortunately we did'nt found this in app script and We found sleep/waitLock functions in app-script, but my services may take little time to fetch data as it connects though multiple services so we cant make the user to wait until the whole process is to be completed. So that we will show a card with basic information required then after need to auto refresh the cards once we fetch the data. we tried of keeping refresh button for the user to click and fetch the updated data but here we are losing user experience, trying for auto refresh with out user interference to get updated information.
Need a process / solution where we can auto refresh the card with out user interference after the data available at our end instead of making user to wait until the process to be completed.
Earliest reply will be more helpful for us.
Thanks.
If a data status on a third-party backend changes as the result of a user interaction with your add-on UI, it is recommended that the add-on set a 'state changed' bit to true so that any existing client side cache is cleared. See the ActionResponseBuilder.setStateChanged() method description for additional details.
The card-based interface in Gmail Addons is an Apps Script Service.
You can interlink it with other Apps Script services as well as implement API calls - everything within the same Apps Script file.
Gmail Addons contents automatically update every time the user opens a different e-mail or refreshes his browser.
Within your Apps Script code you can install time-driven triggers to run the data availability check with a customized frequency.
Consider to install for your users an Auto Refresh extension if you do not want them to refresh the card themselves.

ActiveCollab API - return only open tickets

Currently I see only this option in the documentation
projects/:project_id/tasks
This command lists all open and completed non-archived Tasks from a
Project.
Is there a filter or parameter (or another API call) I can pass to get back only the open tasks which are not completed ?
Thank you.
ActiveCollab 4 works the way you described. If you need only open tasks, you sould filter the result when your app receives it.
In ActiveCollab 5, there are separate API resources for open and completed tasks, so upgrade is one possible path to behavior that you want.

Drive push messages - spammed by notifications

I am currently developing system synchronizing files between Google Drive and external storage. I am trying to process push notifications. I was already able to register for them and receive them. After receiving each notification, I acquire list of changes using proper endpoint and try to get a new version of file if necessary, so the flow is like that:
Subscribe to notifications using changes.watch
Receive some push message with url to changes
Use API with provided query to get changes on changes.list endpoint
Filter items that changed after particular moment
Get content of file and transfer it to another service
It seems that after initial notify message, Google starts spamming a new one, always after getting file. I suspect that the action of getting file content is changing some timestamp on file and therefore - its content is changed.
Is it possible not to modify file in any way when getting its content?
EDIT:
It seems that this behaviour concerns files.export endpoint as well - Exporting Google Doc as PDF leads to notifications spam too. Commenting out export part in a code stops them from coming.
You're getting spammed since Changes: watch listens more to changes made by a user, not the file itself.
What you need to use in this scenario is Files: watch. It subscribes you to listen to changes to the file itself.

Google Url fetch service sudenly start to fail

I've been using the google code Url fetch service in a script attached to docs spreadsheet, and it had been working for more than a year. But suddenly, upon migration of docs to google drive, the service start to fail.
This is the format:
var url='xyz.com?command=xxx'
var response = UrlFetchApp.fetch(url);
The failure report keeps saying..."unexpected error", while nothing has changed in the code 4 more than a year.
Pls What should I do to put things in order?
Hurray!
I got it!
Google was the problem.
I've been using the url starting with the API server IP, and it worked fine. Now, the fetch service stopped fetching using IP address. When I attempted to use the domain name in place of the IP address, it worked fine again.
Alhamdulillah!
But it would be good if someone here knows google guys and could inform them of this anomaly. This problem started to me around the same time I was migrated to the "DRIVE" service, away from the old "DOCS".
Thanks all, and have a blessed day.