Results matching “2006/07/12/another_not_quite_right_solution” from Contentment

Phew! This is getting nuts. I am more busy on web development at home than I am at work. Frankly, with this flurry of stuff going on at home, I'm starting to get a bit bored with work. Well, I do want to talk about something I did at work yesterday because it was pretty cool. I've put together a knowledge base and issue tracking system using Drupal and RT. It was pretty easy and I think others might benefit from at least some aspect of the solution.

We've been using Trac to keep track of our knowledge base, issues, milestones, and source browser surrounding the web development project. For the internal IT stuff, we've been using Microsoft SharePoint. Both have had limited success. Trac worked perfect until we needed a way for web site visitors to send in support requests via email. Trac's support for this is total crud. It's still being worked upon, but after having used RT in CIS, I'm pretty hard to please when it comes to support tracker email integration. Sharepoint has worked about as well as it ever does: good enough, but it's a bit tiresome to use. If we were using the beta of the new version, it would probably be fine, but that's not trivial upgrade to perform without causing massive alterations to lots of other services we run.

Okay, so I've started to put together something that could potentially replace both of these with flying colors. It's still a work in progress, but I think I've already got something better after only a couple days of working on the problem.

First, I installed RT 3.4. After installing it and getting Sendmail configured on our hosted server, I got RT configured. I leave learning how to do this as punishment for the reader.

Then, I went in and installed Drupal 4.7 and started configuring it. First thing to do is to install all the modules. I've installed the following:

  • Category. This is one of my new favorites. It is a drop in replacement for the Taxonomy module that makes every vocabulary and every term into a node. You can even use arbitrary content types as vocabularies and terms and can have vocabularies within vocabularies. It's very nice. Oh, and you can set the default item depth of a category so that it automatically aggregates children to a certain depth. Also very nice.
  • Interwiki. This is kind of the best available for the functionality I'm looking for, but it needs a bit of work to get it right. Basically, you can register prefixes with it that will then be translated into URLs using a wiki-like syntax. For example, it comes configured with the prefix "w" automatically linking to Wikipedia articles. Thus, you can insert Nichols Hall and it would link off to Nichols Hall at Wikipedia. You can add other prefixes to other sites or use no prefix, i.e., foo or //drupal.org/project/pathauto">Pathauto. This ought to be a standard Drupal module. It generates paths for a node according to settings you set. I use it heavily on this site now and it's what allows us to have nice wiki-like articles on the new knowledge base.
  • TinyMCE. This is a must have if you have non-technical or semi-technical staff helping you write articles. We have a content editor, Doug who understands but doesn't really converse in HTML on a regular basis. There's no need to make him when TinyMCE exists and is so easy to install and use.

That's it. I installed all of those and then went through the tedious process of setting up access controls, updating settings, etc. Now, I can create a page on the site titled "You are a foo foo" and then create another article and link to it by adding the text [:You are a foo foo
. I can use TinyMCE to format the text without worrying about learning the Wiki-syntax-flavor-of-the-month and so I won't be too afraid to show someone completely non-technical how to enter knowledge base information later on.

I added new custom interwiki prefixes for getting at RT and Trac tickets and the old Trac knowledge base articles as well for the transition period. Now, I can link to our old standards document via BoomerStandards
or to a ticket in the old system via 435
or to a ticket in the new system via 219
. I added a number of other shortcuts as well and this is really the only wiki-syntax anyone needs to know about and this is a pretty easy one to remember.

The knowledge base is now in place. Let's go back to RT. To RT, I've now added a callback to the system for the ShowMessageStanza ticket element in the RT system. That is, I created a file named "Callbacks/boomer/Ticket/Elements/ShowMessageStanza/Default" in the local hacks directory for RT. You may wish to see CustomizingWithCallbacks for more information on creating customizations using the RT callback system. Anyway, the contents of this callback is as follows:

<%perl>
$$content =~ s{(?<!&)\#(\d+)}
{<a href="${RT::WebURL}Ticket/Display.html?id=$1">#$1</a>}gx;

my %config = (
tracwiki => 'http://trac.example.com/trac/foo/wiki/$1',
trac => 'http://trac.example.com/trac/foo/ticket/$1',
rt => $RT::WebURL.'Ticket/Display.html?id=$1',
http => 'http:$1',
https => 'https:$1',
'' => 'http://supportkb.example.com/$1',
);

$$content =~
s{
(!|\\)? # stop now if there's a ! in front
(
\\
\|]*): # match a prefix like abc:, remember the prefix
(([^\
]+))? # match a pretty name like "Blah Blah is cool."
\] # match closing ]
)
}{
my ($escape, $match, $prefix, $link, $title)
= ($1, $2, $3, $4, $5);

if (defined $escape) {
qq($match);
}
elsif (defined $config{$prefix}) {
my $url = $config{$prefix};

my $term1 = $link;
$term1 =~ s/\ /_/gx;

my $term2 = $link;
$term2 =~ s/\ /\+/gx;

my $term3 = $link;
$term3 =~ s/\ /%20/gx;

my $term4 = $link;
$term4 =~ s/\ /-/gx;

$url =~ s/\$1/$term1/gx;
$url =~ s/\$2/$term2/gx;
$url =~ s/\$3/$term3/gx;
$url =~ s/\$4/$term4/gx;

$title = defined $title ? $title
: $link =~ /^ "$prefix:$link";

qq(<a href="$url">$title</a>);
}

else {
qq($match);
}
}gex;


</%perl>

<%args>
$content
</%args>

If you're unfamiliar with Perl and Mason, you may have a migraine by now. You might have one anyway, unless you're a JAPH like me.

Anyway, this replicates part of the functionality of interwiki within RT messages by converting the [rt:123
sequences into links. This also features the ability to create links between tickets using a #123 syntax as well, which I'd like to add to the knowledge base eventually as well because I find the Trac-style linking of #123 (tickets), @123 and r123 (revisions), and [123] (changesets) to be very easy to remember and very handy.

That gets me much of the way to an integrated Drupal/RT knoweldge base/issue tracker system. I still need more though, but I haven't gotten there yet. Stuff I'd like to add in:

  • Organic Groups. This would allow us to have a subsite for each knowledge base: one for internal IT, one for web development. Later, we could add one for sales information, one for content style guides, or whatever.
  • Fix/replace interwiki. The interwiki module is nice, but isn't quite nice enough. It would be nice to have additional formats available. With very little effort, I should be able to create a custom filter to either extend this functionality or outright replace it just for our needs.
  • Single Sign-on. I have some experience with this lately. If I can get it so that I only sign in once to Drupal and or RT and then I'm in both, that would be great. If I could implement it using an independent LDAP server, all the better.
  • Configuring RT. Configuring the interwiki-ish filter for RT is done in code. This isn't ideal. With whatever solution I work on for Drupal, it would be nice if the RT filter could load it's configuration from the same place, or at least get it from a config file and not in the code itself.

Will I get all this done? Probably not, but I'll get some of it done and if I think it's interesting, I'll try to share it with you.

Cheers.

For part of today, I moved our internal IT support from a Trac-based system to a Sharepoint site. I'm making the move because we're starting to use Sharepoint to help improve internal communications and this seemed like a more logical place since our IT doesn't involve any need for Subversion---code repository integration is where Trac really shines, IMO.

Fortunately, we'd only been using Trac for IT support since I started in February, so there really wasn't much in there yet. We'd organized the Wiki into a few categories of information to describe computers, software, printers, network devices, policies, etc. There were really only about a dozen documents and about 20 tickets in the system, so I did all the work by hand rather than trying to script the maneuver.

For those who don't know, Sharepoint is a portal system that allows any user of the system to create lists of custom records very nicely. It's kind of like a dumbed down version of Microsoft Access for the web with some extra connective tissue and less up-front flexibility---it's just as flexible, but that requires doing a lot of extra footwork. We've used Sharepoint as a document management system up to this point, but are now expanding our use to help us in publication tracking and general project management and collaboration---the kinds of things that Microsoft itself uses Sharepoint for.

Now, in order to get this transition to work properly, I had to create some custom lists because Sharepoint 2 provides nothing close to Wiki functionality unless you want to use Word documents (yuck!) without any help linking items together. Since most of our records were concerned with computers, printers, and software, I created custom lists (i.e., tables with the CRUD forms you need) for each of these and then copied the data over (and filled in a bit more than we had before while I was at it). I then customized the prefab "Issue" list template to connect it with these lists. I copied the tickets over and added the extra comments and then created our one actual How-To document to a Word file and stuck it into a document library. After spending the afternoon putting it together, it does the job, but it's just not quite right.

What I really needed was another Wiki, but Microsoft doesn't provide one in 2.0 (the current version, though I understand 3.0 may offer such a thing out of the box) and there's really no simple way to emulate anything close without cracking open Visual Studio. There are some pay for Wiki add-ons, but while the price isn't out of reach, it's not really worth the price if I can just use a Wiki as a separate piece. There are other small annoyances in Sharepoint such as the lack of configurability or that what is configurable is really the wrong kind of configurable. I don't really care that much if I can set the width of the panels in the portal, but it sure would be nice to have an easy way of adding menus to the sidebar or topbar of static pages: sorry, no easy way to do, seƱor. Bah. Oh, and don't get me started on the lack of RSS/Atom syndication support in a Portal! (Though, techincally, I can write an XSL stylesheet and import the RSS as an XML panel, in this case. There's no non-programmatic way to do the export, to my knowledge, though.)

This pretty much confirms my experience with most Microsoft products. They work great so long as you conform your way of doing things to The-Microsoft-Way. When I worked to develop an Microsoft Access call database a few years back, it seemed that I spent most of my time trying to make my VB code weave through a field of "Not-The-Microsoft-Way" mines. I've faced the same issues when working with creating styles in Word or formulas in Excel or trying to configure the front page of Outlook. My favorite language is Perl simply for the fact that there's no conformance on any level. You can imagine that I don't handle this way of doing things very well.

The other issue Microsoft has is due to their hugeness. It takes a very long time to release product updates. Microsoft hasn't made a major feature release to Sharepoint since 2003. Wikis have started taking off in the corporate environment since then. Three years is a long, long, long time in the Internet Age. Sharepoint is an obvious delivery platform for a Wiki, but since Microsoft hasn't really added any features to it in three years, one can hardly expect it to have any groundbreaking functionality.

These two problems combined with my long-standing distrust of any software for which I can't find the source of a bug by reading the source are the reasons why I dislike Microsoft-based solutions. I don't really care for their business practices, but I don't really expect anything different from such a large bureaucracy.

Microsoft has a problem with agility. Their software solutions are sluggishly developed and new features are static in nature. I assume the highly structured nature of things is due to the massive testing and documentation infrastructure they've built to ensure quality (fifty or more people might be involved with adding a new method to a library), but I think this has ended up creating software solutions that feel stiff and are so often delayed months or years in delivery.

Open Source software can suffer for the opposite reason. The bigger projects seem to do alright because their is such a massive amount of contribution guaranteeing quality. The smaller projects, however, can suffer from a lack of quality because the authors don't put enough emphasis on design and testing and just hack some code together (which works for the smartest developers, but not the average folks like me).

I think Microsoft could definitely benefit by trying to streamline their process and reduce the amount of overhead required to get a new feature. Until they start putting out solutions that are a little more flexible and a little more timely I'm going to have a strong dislike for Microsoft products. Until they open the source (hah!), I'm going to distrust Microsoft products because I know I won't always be able to find the original source of bugs. That's all I have to say about that.

Cheers.

Find recent content on the main index or look in the archives to find all content.