Is there any way to handle native send of outlook appointment from add-in through Office.js? - office365api

To get Item Id in appointment compose mode i am using "saveAsync" in add-in the problem is with out user intervention the appointment item is saving to the MS Exchange.After discarding the opened appointment (by using office cancel "X" button) still the changes which i made while "saveAsync" execution are presented, it's not regaining the previous state.
I need to know is there any way to bring back the previous state of appointment if user click on discard ?
(OR)
Any way to handle the native send of outlook appointment from add-in through the office.js after "saveAsync" got applied ?
(OR)
Is there any other way of getting the Item Id of appointment in compose mode through the Office.js ?
Please,answer if you know how to handle any of these cases.

EDIT: Looks like at this time, it is not possible to revert to last saved version via the add-in, nor is there any way to get the itemId without saveAsync
Old Answer
If you are modifying an existing appointment, you can get the ItemID by calling Office.context.mailbox.item.itemId, however if you are creating a new appointment, you must call saveAsync in order for your appointment to be registered, and thereby given an ItemId.

Related

Office.Js best method for notifying and syncing end user of updates from another system

Office.JS is presenting some challenges that seem to end in the same you can't do that loop.
We have a system that's used to create appointments and tasks based on certain variables. What we're struggling with is the best method to sync those events/appointments to the end user.
We've landed with sending the user letting them know there is pending items, but is there a way to embed office.js into the email to open the task pane to sync the two systems?
I know event-based exists, but forcing a sync when composing any email seems crazy. https://learn.microsoft.com/en-us/office/dev/add-ins/outlook/autolaunch
Is there a better way?
There is no way to open a task pane programmatically from Outlook web add-ins.
A task pane can be displayed by using the following mechanisms that require end user actions as well:
A ribbon button can be assigned to open a task pane.
A notification message can be configured programmatically at runtime to open a task pane.
If you need to synchronize items in Outlook I'd suggest handling onSend event (or smart alerts) where you can read all the data of an item being sent and sync it with your back end server. Also you may consider using Graph API for syncing all items, not only the current one.
Outlook web-based add-ins are designed to work for a particular (currently selected) item only. And they are still very limited, comparing to VSTO add-ins, in customizing the Outlook UI.

Filtering by date email added to mailbox, not actual email received date

I am able to successfully receive a list of emails received after a particular date, by adding
&filter=receivedDateTime ge 2019-12-15T21:01:15Z
to the messages url.
The problem is if I drag an old email from a different mailbox to this processing mailbox, the received date will be the original received date.
As I am attempting to only process emails in the mailbox that have arrived since the last time I've processed, this "new" email will not be included. I need it to be.
Is there another filter I can apply that will allow me to capture all emails added to the mailbox, since a particular date and time? Something like
&filter=mailboxReceivedDateTime ge 2019-12-15T21:01:15Z
I would try the createdDateTime this property doesn't represent the time the Message was created but the time the item was added to a Folder collection. Because of the way moves are handled in Exchange this property should get updated when you move an Item between folders (like the ItemId does). eg try a simple query like this in the Graph Explorer and move an old message back and forth between two mailbox folders. You should see the old message pop to the top of the returned items when you move it back to the Inbox
https://graph.microsoft.com/v1.0/me/mailfolders/inbox/messages?$orderby=createdDateTime desc
Use the lastModifiedDateTime field.
receivedDateTime and createdDateTime don't change when dragging a message between folders according to my tests with Office365 account on Graph API.
Remember this can be triggered by other changes too, so you should use a mechanism to prevent duplicate entries.

Jira , How to check if a ticket has been created from email or manually

I am using a jira mail handler to automatically create tickets whenever email comes to a particular mail id. However many of the users who are sending mails are part of jira users and jira will create the issue with creator as their name. Later looking at the tickets is there any way to identify whether the ticket was created from email or the user manually created it. Thanks in advance
I think, it is not possible automatically. What about using a extra customfield? this way you can fill that new field, with the value you want: one for manually opened tickets, and another for email opened tickets. You can show or hide this field, and this would allow you to look for manually opened using jql (even it is not your first need :) )
For making it more visual, then you can use a bit of proggramatic magic and represent the values with icons or wahtever.
Let me know if it is not clear or if you need help for adding the new field or whatever.
Edit: the easiest way for doing this could be add to every issues opened by mail, at the begining of the summary something like "from mail:" and then the real summary. Anyway probably better if you customize the handler or create new one
Regards

How do I request that a work item owner add more details to the work item and keep the history?

In TFS, how do I request more information from the owner of a work item and have my request appear in the work item history?
So for example a user submits a bug, then I would like to use TFS to request more information and I would like my request to be within or attached to the bug. Then would like the user to update the bug in a way that I can see the progression.
Similarly is there a way to notify the user that I have updated the bug (without explicitly sending them a manual email)?
So I would like this to be outside the context of a daily standup meeting and a more automated process.
You could add a new state or reason, with a piece of workflow that assigns the work item back to the creator automatically and have a email alert on assigned to changes to [me]. However I normally just manually assign it to someone and ask for more details in the history.

Using TFS Power Tool to send email to Any person who get assigned a new Work Item

I can use TFS Power Tools to send emails to a specific user every-time a new work item created but instead i want to send the person who is assigned the new work item!
any one has any idea how to do that ?
This should be easy to achieve using the AlertsExplorer:
The bad thing about this, is that you need one rule for each distinct user that gets this enabled.
If you want people to get notified when a Work Item assigned to them is created/changed you have to ask them to register the "My Work Items are changed by others" alert from Visual Studio (no need to use the Power Tools).
You can't register a generic alert that will send an alert to an email address that depends on the user which get the work item assigned to. (if that's your question, but I'm not sure).

Resources