Track your application changes/updates

A while back I created a little tool for my own use, to keep track of my Notes templates and their version numbers. I also developed a tracking database where we track not only changes to Notes applications, but also other changes to our environment. Things like modifications to Domino Directory and Active Directory, as well as other meta data changes, configuration changes, etc.

I decided to merge those two applications, and create one focused on tracking changes in Notes templates/applications. I thought perhaps other developers could use this application, so feel free to download the template. This is what the application looks like:

Change Tracker - Application

After you download the template, use it to create a new Database. In the new database, open the Applications Settings document and enter the application name (should be “Change Tracking”). Also modify the list of systems, this is where the dropdown box in the actual form get its categories from. The only required is one called “System (IBM/Lotus)”, but I also suggest to create one called “System (your company name)”. You can see an example of the configuration document below.

Change Tracker Settings

You can now go ahead and load the list of local Notes templates. This is done in the System/Tools section as well.

The next step is to open all templates not containing a version field and update them. Go to the section called “No Version”  and open the view, then open each template and select the correct system and enter the application name. Then create the version field using the Template action menu, where you find the action ‘Create VersionField’. Enter your initial version number (major, minor, release and build), then save the template document.

Now when you have all your templates updated with version numbers, you can start tracking changes using the “Add New Entry” button. Hopefully the application is fairly self-explanatory.

The template is using ODS 51, so you need Notes 8.5 or higher to open it.

There is also one known issue that I haven’t had time to fix yet. If you have the setting “Auto-increase build when adding entry” to “Yes”, you have to close and reopen the template document to see the new entry. If it is set to “No”, it shows up immediately. If anyone fixes this, let me know and I will update the template on my side too.

Update: I have fixed the issue. It was as easy as removing the line  uidoc.EditMode = False  in the ‘Add New Entry’ action on the ‘Template’ form. The download has been updated.

 Update 2: I have also modified the template to use DateTime fields in a few places where I used regular text fields. Thanks Kenneth for pointing that out!

This Post Has 6 Comments

    1. Karl-Henry Martinsson

      It is working, but only when I don’t put the current document into edit mode and update a couple of fields. Then the reload of the document later does not realize that a new entry have been added, and the rich text is not being rebuilt.
      Here is the code:

      Set uidoc = ws.CurrentDocument
      If settings.GetItemValue(“AutoUpdateBuild”)(0) = “Yes” Then
      uidoc.EditMode = True
      build = Cint(uidoc.FieldGetText(“VersionBuild”))+1
      Call uidoc.FieldSetText(“VersionBuild”,Format$(build,”0000″))
      Print “Updating version data in template…”
      Call WriteVersionData()
      Call uidoc.Refresh()
      Call uidoc.Save()
      uidoc.EditMode = False
      End If
      Set entry = New NotesDocument(db)
      Call entry.ReplaceItemValue(“Form”,”Entry”)
      Call entry.ReplaceItemValue(“ParentUNID”, uidoc.FieldgetText(“ParentUNID”))
      Call entry.ReplaceItemValue(“VersionMajor”,uidoc.FieldgetText(“VersionMajor”))
      Call entry.ReplaceItemValue(“VersionMinor”,uidoc.FieldgetText(“VersionMinor”))
      Call entry.ReplaceItemValue(“VersionRelease”,uidoc.FieldgetText(“VersionRelease”))
      Call entry.ReplaceItemValue(“VersionBuild”,uidoc.FieldgetText(“VersionBuild”))
      Call entry.ReplaceItemValue(“Creator”, session.CommonUserName)
      Call entry.ReplaceItemValue(“Created”, Cstr(Now()))
      Call ws.EditDocument(True, entry)

      If the IF-clause is executed, it dioes not work. If it is not executed, it works.
      In the QueryOpen event of the entry document, I am recording both doc and uidoc of where the entry is opened from (i.e. the handle to the template/main document). In the Terminate event of the entry document, I close the uidoc and the reopens it using the doc reference.
      In the QueryOpen of the template/main document, I rebuild the table in the rich textfield.

      I am using the techique I am describing here:
      http://blog.texasswede.com/dynamic-tables-in-classic-notes/

      I have a few ideas where the problem is, so i will play around with that later today.

      1. Karl-Henry Martinsson

        It was as simple as removing the line uidoc.EditMode = False…
        The template linked above has been updated.

        1. Kenneth Axi

          Nicely done! I love this simple but elegant tool. I love the dynamic tables in classic notes trick to simply create elegant looking tables/formatted text.

          But the only thing I don’t like is that You are saving dates as string, and that can become a problem when moving/installing this db in an organization that spans over two or more countries that have different dateformats… but generally not a big deal. Maybe one should be able to have the current used datetime format in a config document instead of hardcoded format$() in the code. Now I have to go through all code to find all places that deals with dateformatting and replacing it with swedish ISO-standard format (yyyy-mm-dd) instead.

          1. Karl-Henry Martinsson

            Makes sense. This was originally a quick solution I built for my own use. Probably should revisit the date fields, good catch!

          2. Karl-Henry Martinsson

            I have updated the code in the template to use “Short Date”, this will return the date formatted per your local settings. Also changed a couple of fields containing dates to be DateTime. The change requires existing documents to be resaved, as I also modified a couple of views. I would recommend cleaning out any database using this template and start over.

Leave a Reply