REQUEST A DEMO

Watching cases in Clarify / Dovetail

I’ve had a couple of recent business trips to Europe and back, so the long flights gave me some time to tinker with a few ideas. This is my latest experiment: watching cases.

It’s not uncommon that we want to keep up with what’s going on with certain cases – specifically cases that are being worked by others.

For example, a high priority case for a new customer may have been recently created, and even though its being worked by someone else, I still want to keep abreast of what’s happening with it. Or perhaps the customer I’m going to visit next week has a case open that I want to stay in the loop on. Or I want to follow how one of my guys is dealing with a difficult customer.

The concept is that we can “watch” a case. This means we can indicate that we want to stay in the loop with what’s happening on these watched cases.

This concept is pretty common, and is available in other applications as well.

  • GitHub allows you to watch repositories and follow users to generate activity streams. Our activity streams show you everything important that’s happening with anyone or anything on GitHub.
  • In Bugzilla, you can say that you want to "watch" another user. Then, you will get every email that users gets from Bugzilla, as though that user was you. This is particularly useful when one developer goes on vacation and another needs to handle that developer’s bugs while the other developer is on vacation.
  • In eBay, if you see an item you want to keep track of, you can add it to your Watch List.

So lets see how we can do something similar in Clarify / Dovetail.

The run down

We’ll add a Watch button to the case form, which will allow a user to “watch” a case.

If the case is already being watched, we’ll show an Unwatch button.

We’ll provide an easy way to get at your watched cases (such as via Search)

We’ll send the user a daily email with the recent activity on their watched cases. Imagine that you come into work every morning, and you have an email waiting for you that summarizes the recent activity of the cases that you’re watching. Pretty sweet.

Lets see it in more detail.

The UI: watch / unwatch

We’ll provide a way for users to watch (and unwatch) a case.

Dovetail Agent

A new Watch link on the case page:

case_watch

Once we click Watch, the star gets filled in, the Unwatch link becomes available, and we show a little notification at the top of the page (that will fade away in a few seconds).

unwatch_case

Clarify Classic Client

Similar functionality in the Clarify Client – using a button rather than a link. And I’ve included a label to make it clear when you’re watching a case.

clarify_watch

clarify_unwatch

Cases I’m watching

We can use the search capabilities within Dovetail Agent to create and save a favorite search that shows the cases I’m watching:

cases_im_watching

We can see that I have a favorite search named “Cases I’m watching”, and that yields all of the cases I’m watching (in this case, 3 of them).

Email – watched cases report

The search result is nice, but that means I would need to remember to go into the app every day and review my watched cases.

Instead, lets simply send the user an email that rolls up all of the recent activity on their watched cases.

watched_cases_email 

The email shows me each of my watched cases that have recent activity, along with a case summary (customer info, owner, title, condition, and status).

The case number is a hyperlink that launches you directly to that case, so you can easily get to the full case, if so desired.

So, imaging that every morning, in my inbox, is an email rolling up all of the recent activity on my watched cases.

Technical Details

Schema

I added a new table and a couple of relations to keep track of a user’s watched cases. I used the concept of a label (similar to labels in GMail). Specifically, when I want to watch a case, I add a new label named “watch”, and relate that label to the user and to the case. The label table is a new table that I added. Pretty simple.

I also added a new view that joins label, user, case, and act_entry, which will make it easy for me to find activities on watched cases within a certain time period.

Here’s what the schema looks like in BOLT:

bolt_label_table

Watch/Unwatch button

Dovetail Agent

Within Dovetail Agent, we’ll add a link that toggles from Watch to Unwatch. Clicking that link will make an AJAX request to the watch_case page. This will either add a new label of “watch’ for that case for the current user, or delete the label, if it exists.

Clarify Classic Client

Within the Clarify Classic Client, a new button and a bit of ClearBasic code on the edit case form (420 or 776) will ei
ther watch or unwatch the case.

Web Service

Since we already have a web service for building case histories (freely available in the Dovetail bootstrap project), Kevin whipped me up a new service that returns the history items for multiple objects. In addition, it takes a SINCE parameter, which allows us to just get history items since a certain date.

The web service can return JSON or HTML. In my scenario, I’m using the JSON result. But you can also use the HTML, or just provide a link to the web page directly, which looks like this:

html_report

Powershell script

Now, I just needed a script to pull it all together.  The main part of the script explains it:

GetWatchers | GetWatchedCases  | GetCaseHistories | ParseJSONIntoHTML | SendEmail;

Get the list of users who are watching cases (that have been modified recently), then get the list of watched cases for each user, then get the recent case history items for these cases (using the web service), turn that JSON result into some nice looking HTML, and then send that as an email.

Scheduled Task

Finally, we’ll setup a scheduled task to run our powershell script daily.

task_scheduler

Now, every morning, the script will run an email a report of recent activity on the watched cases out to the users.

Show me the codez

I’ve shared all of my code on Github: https://github.com/gsherman/case_watcher

Future Ideas

As I mentioned, this was one of those in-flight experiments. So, where do we go from here?

Nothing definitive yet, but here’s a few things I have in mind.

  • This could make its way into baseline functionality of Dovetail Agent at some point.
  • It could be expanded to watch for activity on other items (CRs, Part Requests, Opportunities, etc.)
  • The PowerShell script might become a C# executable.
  • Does it make sense to provide information on watched items that don’t have any recent activity after a while? Not sure yet.
  • Expand on the “label” idea – allowing users to add any label to an item.
  • Simplify the searching of watched/labeled items

Your thoughts?

This was just one of those ideas that I wanted to try, and I like where it’s headed.

What do you think? Is this worthwhile? Should we continue to pursue it? Would something like this be useful to your organization?

I’d love to hear what you think.

Leave a comment here, drop me an email, or contact me to discuss in more detail.