Customized Scripting: How do I get customized fields to appear based on a defect value?
I need to be able to display additional fields based on a defect type. For instance, if a defect is considered "User Interface", then I need to add fields for OS Version, browser type and version, etc.
I'm just a long term manual QA tester that wound up getting to manage the ALM... I know the theory, just no clue how to do it or how to get to where I need to be to do it.
Instructions, hints, tips, even general observations are all welcome. This is trial by fire for me!
Mod Message: This topic was moved from General Suggestions Board to Quality Center / ALM Practitioners forum.
For what solution or product is this inquiry? This discussion board is meant for feedback or suggestions about the operation of the Hewlett Packard Enterprise Community itself. Product, solution, and similar queries should be entered into the appropriate discussion boards, as the experts visit the product forums every day, but do not generally come here very often.
Warren_Admin, Hewlett Packard Enterprise Community Manager
Any personal opinions expressed are mine, and should not be interpreted as official statements on behalf of Hewlett Packard Enterprise
I understood your query.
If BG_Status.Value = "Open"
Bug_Fields.Field("BG_USER_01").Value = "xx"
Bug_Fields.Field("BG_USER_01").Visible = True
Give your User field Order & Replace you values with the "xx" & make the field visible depending upon the Status value.
This should help
(Posts and opinions made here are my own and do not reflect the opinions of my employer)
Hi Cupcake. You can create a sub for each of the two defect layouts - one for the User Interface type & another for everything else using SetFieldApp. Then you can trigger the different layouts based on users changing your defect type field (I'm assuming that you have a project list for defect type) using FieldCanChange. If you need more details let me know.
Thank you! Let me say that first.
I figured it would look something like that. Now, where do I put there and how do I get there?
I am a long time user but relatively new to the management and customization part of ALM. I've figured out how to do most stuff, but nary a clue about this scripting aspect. I will just need a little hand holding to get through this.
Thanks so much!
You're welcome. For example, create Sub Bug_StandardLayout & Sub Bug_UILayout. Within each sub list your defect fields using SetFieldApp shown below. To call this sub you would do something like this: SetFieldApp "<FIELD NAME>", True, True, 0, 5 (this means that the specified field is visible, required, on the first page which is 0, & field # 5 in the field order). You would call your layout subs in Bug_FieldChange using the name of your defect type field as FieldName. There are examples in the ALM admin manual for Bug_FieldChange & SetFieldApp.
Sub SetFieldApp(FieldName, Vis, Req, PNo, VOrder)
On Error Resume Next
.IsVisible = Vis
.IsRequired = Req
.PageNo = PNo
.ViewOrder = VOrder
On Error GoTo 0