Skip navigation

Jive Release Blog

1 Post authored by: scott.hirdes

One very important feature of the Supportal that can sometimes be overlooked is the ability to make a case public.  A public case is just a case that shows as a discussion thread in a community that can be viewed by anyone.

 

The Supportal makes it easy to change a case from just being a normal case in your secure account space into a public case that can benefit the whole Clearspace user base.  Let's take a look at how this is done:

A private case

Let's suppose that you've already created a case in your secure account space.  As a customer, when you view the case, the case fields will look like this:

blogpost_privatecase.png

Notice the "public" check box is not checked.  Also, notice that the breadcrumbs at the top show that the case thread is in the secure account space as expected.

 

A public case

Being a good citizen of the broader Clearspace user community, you see that this question or issue that you had in this case is something that others may encounter as well.  Making this case public would help others out because if they are searching for an answer to the same question, this case thread will then show in their search results and they can find that answer quickly.  Who knows, maybe they will then return the favor by making a case they have public as well which could benefit you later on down the road .

 

Ok, so you look at the content of the case thread and ensure that there is nothing there that is sensitive information, and you decide to make the case public.  How is this done?  With just two easy steps:

  1. Click the "public" check box to indicate you want the case publicly viewable.
  2. After clicking the check box, you'll see a combo box showing the possible communities that you can put the public case in.  Choose whatever community makes most sense for the content of the case thread.

 

Now, click the "Update Case" button.  Looks like nothing changed right?

blogpost_publiccase.png

 

Take a look at the breadcrumbs.  Notice that this discussion thread is now listed as being in the public community that you selected above.

blogpost_publicbreadcrumb.png

Also, notice that the case now has a box that says "This is a public case which is tied to your support account.  Your community is located here:"  The "Account Community" link takes you back to the homepage for your secure account space.

 

But wait.  You still want this to show as a case in your list of cases in your secure account space so you can easily reference it for yourself later right?  No problem.

blogpost_community.png

blogpost_casestab.png

The case appears as expected in the list of cases in your secure account space, but it actually resides in a public community now.  You can manage the case as you would any other private case, but the content of that case is now benefiting the whole community!

 

The code

Making the case a publicly viewable case was easy enough right?  Surely, the code behind the scenes must be complicated!

 

Not at all!

 

When the "Public" check box is checked, some Javascript on the page fires to show the communities that the case thread can be moved to:

function changeVisibility()
{
    if (document.getElementById('publicCase').checked==true) {
        document.getElementById('publicCommunityTag1').style.display="table-row";
    }
    else {
        document.getElementById('publicCommunityTag1').style.display="none";
    }
}

The list of community options that are show in the community drop down is populated in the action class with this code:

public List<Community> getPublicCommunityOptions() {
    List<Community> availCommunities = new ArrayList<Community>();
    Community root = communityManager.getRootCommunity();
    for (Community c : communityManager.getRecursiveCommunities(root)) {
        if (!accountManager.isAccountContainer(c)) {
            availCommunities.add(c);
        }
    }
    return availCommunities;
}

The call to accountManager.isAccountContainer(c) calls a custom class in the Supportal that basically just checks to see if the community has an extended property set that marks it as a secure account space or not.  If the community is not an account space, it is eligible for putting public cases into.

 

Here is the code from the method responsible for doing the move:

private void moveCaseThread(ForumThread caseThread, long targetContainerID) {
     try {
          Community publicCommunity = communityManager.getCommunity(targetContainerID);
          forumManager.moveThread(caseThread, publicCommunity);
      }

The first line gets the Community object for the community that the discussion thread is going to be moved to (the one that was selected in our example above).  The second line is what causes the move of the discussion thread to occur.

 

What about the code responsible for having the public case still show in the open cases widget?

 

We store the account that the case was created in originally as an extended property on the ForumThread object.  So, to get all the threads associated with a private account community, we use this SQL:

SELECT threadID FROM jiveThreadProp WHERE name='caseAccountID' AND propValue=<PRIVATE_ACCOUNT_ID> ORDER BY threadID DESC

This gives us a list of the thread ids for all threads that are associated with <PRIVATE_ACCOUNT_ID> no matter what community that thread actually lives in.

 

That's really pretty much all there is to it.

 

 

So the next time you open a new case with Jive Software Support, ask yourself, "Would the broader Clearspace user community benefit from the question and answer I just had?"  If the answer is "yes," (and really, when is the answer not "yes?" ), make it public!

Filter Blog

By date: By tag: