Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
Absent Member.. Pete Townsend Absent Member..
Absent Member..
1201 views

Set Default Defect Grid View

Jump to solution
QC 9.2
Hi,
This regards a previous post: "Setting a default grid view for all users in Defect Manager".

I used the code presented and it doesn't default the grid view for all users unless the user selects the favorite item from the list. Then it will persist on further logins. The ideal would be for any user to receive the favorite view automatically when they log into the defect module of this particular project.

Any ideas what might have gone wrong since it appeared to work for the person who posted?

Thanks,
pete
----------------------

Function CanLogin(DomainName, ProjectName, UserName)
On Error Resume Next
Set oComSettings = TDConnection.CommonSettings
Set oUserSettings = TDConnection.UserSettings
oComSettings.Open "BugViews"
oUserSettings.Open "BugViews"
oUserSettings.Value("__default__")=oComSettings.Value("DefaultEReportingView")

If oUserSettings.Value("__default__") = "" Then
oUserSettings.Value("__default__") = oComSettings.Value("DefaultEReportingView")
End If

oComSettings.Close
oUserSettings.Post
oUserSettings.Close
Set oUserSettings = Nothing
Set oComSettings = Nothing

CanLogin = DefaultRes
On Error GoTo 0
End Function
0 Likes
1 Solution

Accepted Solutions
Acclaimed Contributor.. Jan Czajkowski Acclaimed Contributor..
Acclaimed Contributor..

Re: Set Default Defect Grid View

Jump to solution
I am the one who created the original code. I checked it out, and the same code no longer works in QC 9.2. The reason is, the way of referring to the default settings changed. In previous versions you would use for example

MsgBox oUserSettings.Value("__default__")

In 9.2 you use an empty string for setting name. So you should write

MsgBox oUserSettings.Value("")
Jan Czajkowski

[Please do not contact me off line for receiving support. Use the forum!]
6 Replies
Acclaimed Contributor.. Jan Czajkowski Acclaimed Contributor..
Acclaimed Contributor..

Re: Set Default Defect Grid View

Jump to solution
I am the one who created the original code. I checked it out, and the same code no longer works in QC 9.2. The reason is, the way of referring to the default settings changed. In previous versions you would use for example

MsgBox oUserSettings.Value("__default__")

In 9.2 you use an empty string for setting name. So you should write

MsgBox oUserSettings.Value("")
Jan Czajkowski

[Please do not contact me off line for receiving support. Use the forum!]
Absent Member.. Pete Townsend Absent Member..
Absent Member..

Re: Set Default Defect Grid View

Jump to solution
Thanks. This works perfectly. Hopefully, this will work in QC 10 when we move to it.

I am closing this thread.
0 Likes
Absent Member.. Pete Townsend Absent Member..
Absent Member..

Re: Set Default Defect Grid View

Jump to solution
closed
0 Likes
Highlighted
Regular Contributor.. justmike23 Regular Contributor..
Regular Contributor..

Re: Set Default Defect Grid View

Jump to solution

hello,

can this be used also to check if user is currently in grid view (req. or test) or use other function?

0 Likes
Acclaimed Contributor.. Jan Czajkowski Acclaimed Contributor..
Acclaimed Contributor..

Re: Set Default Defect Grid View

Jump to solution

No, it can't. And by the way the code suggested no longer works because of changes in the database setup.

But if you want to find out which view a user is currentlyl in, you can do it by testing on the Checked property of the Action workflow object. Read more in the workflow reference.

Jan Czajkowski

[Please do not contact me off line for receiving support. Use the forum!]
0 Likes
Honored Contributor.. arichtman Honored Contributor..
Honored Contributor..

Re: Set Default Defect Grid View

Jump to solution

Holy thread revival - 10 years!

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.