Obtaining GroupShare file histories

We've recently had a few projects where a freelancer has notified us that they have checked-in their completed files in a GroupShare 2015-hosted project, but when we open the project from GroupShare we can't see the freelancer's work.

Furthermore, right-clicking on a file and choosing "Get specific version" shows no trace of the freelancer having checked-in anything. However, the translations are in the TM.

I realise that the TM can contain the translations once a segment has been committed, with or without the file having been checked-in, which is why I've looked into the database to see if the user features in the file history... and this is where the water gets more muddied.

Can anyone offer a GroupShare database query which shows the file history for a given project? I'm quite willing to show what I currently have if I thought that there was anyone willing to look at this who would be able to help.

Parents Reply Children
  • Hi Jesse,

    Here's one approach for obtaining the file history (by user):

    SELECT
        fo.FileOperationTypeId,
        a.[TimeStamp],
        pf.OriginalName,
        fo.Comment
    FROM
        proj.FileOperationLanguageFile folf
        JOIN proj.LanguageFile lf ON folf.LanguageFileId = lf.LanguageFileId
        JOIN proj.Activity a ON folf.FileOperationId = a.ResourceId
        JOIN proj.ProjectFile pf ON lf.ProjectFileId = pf.ProjectFileId
        JOIN proj.FileOperation fo ON folf.FileOperationId = fo.FileOperationId
    WHERE
        lf.LanguageFileUniqueId = @language_file_id
    AND
        a.ActivityTypeId IN (10, 11, 12)
    AND
        a.[User] = @username
    ORDER BY
        a.[TimeStamp] ASC;

    I also have this...

    SELECT
        @project_id AS id,
        [resource].resourceName AS [name],
        projectFile.OriginalName AS [name],
        languageFile.LanguageFileUniqueId AS id,
        languageFile.SettingsBundleId AS [settingsBundleId],
        --[statistics].*,
        --projectFile.*,
        activity.*,
        [language].TargetLanguageCode
    FROM
        SDLSystem.sts.[Resource] [resource]
        JOIN proj.ProjectFile projectFile ON [resource].resourceId = projectFile.ProjectId
        JOIN proj.LanguageFile languageFile ON projectFile.ProjectFileId = languageFile.ProjectFileId
        JOIN proj.LanguageDirection [language] ON languageFile.LanguageDirectionId = [language].LanguageDirectionId
        --JOIN proj.AnalysisStatistics [statistics] ON languageFile.LanguageFileUniqueId = [statistics].LanguageFileUniqueId
        LEFT JOIN proj.Activity activity ON languageFile.FileOperationId = activity.ResourceId AND activity.ActivityTypeId IN (10, 11, 12)
    WHERE
        [resource].resourceGuid = @project_id
    AND
        languageFile.LanguageDirectionId IS NOT NULL
    FOR XML AUTO;

    I'm interested to hear what you think of the results which these will yield.