IMPORTANT NOTICE:  As of 21 February, anything posted in this community WILL NOT BE MIGRATED to our new community site.   We have pulled all user information and data from this site and are now in an approximately week long process of importing users, roles, and data to our new site.  We are leaving this site open and active so you can post and hopefully get a response until the migration is complete.   Once complete, the URL  that currently takes you to this site will take you to our new site so your bookmarks will work as always.  Please read the information on a New Login Process

Using ViewEvent to see who modified a view

Hi,


I've been fiddling with ViewEvent to try see who modifies a view. The viewChanged() method within is triggering, but I'm not sure how to ascertain *who* made the change (perhaps later, I'd be interested in what they changed, but I won't dwell on that for this occasion).


The best I could come up with so far was something like this:

    public void viewChanged(ViewEvent e)
    {
        String desc = "CHANGED VIEW: \"" + e.getView().getName() + "\" - " +
                 e.getView().getCreatedBy().getDisplayName(); + "\n" +

                "Description: " + e.getView().getDescription() + "\n";

That's ok, but it's just telling me the name of the person that 'created' the view, and not the person that recently 'modified' it. Any tips on how to go about this?

Cheers,

Gurce

  • PS. Also, to clarify, this is the sort of change I'm trying to catch.

    Eg: User goes to "View >> Properties", changes the view's "Description" field, and then presses the "OK" button.

    Such a change will trigger the viewChanged() method, just not sure how to learn which user did the change.

  • In reply to gurce:

    hi gurce,

    views are not versioned objects.

    the server does not track revisions of views, nor who modified them.

    you should raise an enhancement request for the server

  • In reply to Anil Peres-da-Silva:

    Hi Anil,

    Ok, I'll chase up for an enhancement request.

    If it's less work for the developers (compared to keeping a complete version history of view-property changes), I'd be content with simply the ViewEvent capturing the person's name at the time of the event, and pass it across to the listener (Ie, the listener can decide what to do with it, instead of the server worrying about storing it).

    My manager that asked me about this facility wasn't too bothered by it not existing, more of an "oh well" reaction. But anyway, I'll chase it up a bit.

    Cheers,

    Gurce

  • In reply to gurce:

    Hi Gurce,

                     I have made an email reply pertaining to your request. You can make a suggestion in the suggestion box if this is not critical. Here is the link: borland.uservoice.com/.../143611-starteam-feature-requests.

    Cheers,

    Kah Yong Seow

  • In reply to sky:

    Hi Kah Yong Seow,

    Ok then, I've added the request to the suggestion list.

    The only issue I have with grouping this idea with those in the suggestions-list is that the suggestion-list seems to focus on points raised by users for the cpc/client and how they would like it enhanced. The existing points tend to be big/ambitious ideas for future directions and facilities with the cpc.

    In my case, I am using the sdk directly, and in this case, narrowing my focus on the ViewEvent - viewChanged() method and what it could potentially provide my application in future.

    So it isn't client-related, it is more server + sdk related, and it feels smaller in magnitude compared to the grander ideas in the suggestion list.

    But anyway, let's see how it goes.

    Regards,

    Gurce

  • In reply to gurce:

    Hi Gurce,

                    don't worry about it. The team will assess your request no matter how big or small the suggestion is. And being specific and focused here helps a lot as well.

    If it is okay with you, we can close this incident?

    Regards,

    Kah Yong Seow

  • In reply to sky:

    Hi Kah Yong Seow,

    Yep sure, that's fine.

    Regards,

    Gurce

  • In reply to gurce:

    There are totally three have admin access and we will provide access rights to users to the projects and their views. Is there any ways to track these changes done to access rights on particular project?