How to discard independent set for CF in some YouTrack project and start using common set of values? - youtrack

As an administrator of YouTrack I need sometimes create and discard independent set of values of custom fields. Creation of independent set is trivial: just use appropriate button, but what if I want to discard existing independent set and use common set of custom field values? Is it possible to do it in some easy way (through UI, API or command)?
For now, I have to add new custom field each time I need discard independent set. It happens not so often, fortunately.

Go to Settings -> Custom Fields -> Fields in projects -> your project, 2. Expand it,
Select the field,
Delete unnecessary values by clicking on crosses,
Click "Copy values from.." button and select desired set of values in the dropdown.
Hope it helps.
A screenshot of field settings

Related

Holding parameter values when report is refreshed due to custom buttons used for expand/collapse groups

This may be as simple as it can't be done, but I have to ask. :) I am building a report using Report Builder 3.0. The report contains a table which also has Grouping established. I wanted to give the user an easy way to expand/collapse all rows of the table, so I used the method of creating a parameter with two values (0 for collapse, 1 for expand), tied the visibility of the group to the parameter using an expression in the Hidden Property for the group. Then I created two text boxes for Expand and Collapse and added the respective parameter/value in the Action in the text box properties.
At this point, everything works as intended. Here is where I run into the issue. I added another parameter, lets just call it "Location". The parameter is a text data type that allows multiple values and gets it available values from dataset/query in the same report. This is where I am guessing what I want may not be possible. When I select my Location(s), then run the report it all looks good. However, when I click on one of the Expand/Collapse text boxes, it clears out the values that I selected for the location(s). I am guessing this is due to the fact that the available values for the Location parameter is set via a query at run time. Is there any way to maintain the values for the Location parameter when triggering the expand/collapse buttons?
Thanks in advance!

Is there a way to insert a parameter or reorder parameters in ADO test cases?

I have created a test cases with several different parameters, and realized that I skipped one while writing it. I don't see an obvious way to insert a new parameter or reorder the columns. I would like to keep them in order without deleting every row below it and redoing everything.
Are you referring to the situation shown below? If so, then we can't insert or reorder parameters here.
If you want to insert the parameter , you need to click Convert to shared parameters.
On the Shared Parameter page, you can insert parameters by right clicking and selecting Insert row. Inserting column by clicking "+" button. After the modification, you can add the parameter set to the test case by clicking Add a shared parameter set.
If you want to insert parameter column,in addition to doing it on the Shared Parameter page. You can also reorder it in Steps use "#"+ parameters name and move it use the arrow.

How to click on a link in a specific row of dynamically loaded table

I have a table similar to below in a WPF application.
We are using Silk Test 17.5 using VB.NET.
Table is dynamically loaded based on latest data.
I need to click on 'Default' ( Link) for specific row.
e.g. I need to click on 'Default' link for Trump1 , Trump2 row.
How should I do it? All locators of default links are same and I cannot differentiate between them.
Is there any I can append First Name locator to Default to figure out which locator to click?
Tokci
SilkTest has a framework for supporting such custom controls and a nice tutorial here
Theoretically you would have to:
List all the methods on the control
From the previous listing (or by talking with the developers) look up the method to access the rows inside the control
Filter your rows and get the one which is interesting for you
From the row you can get the cell by following the same pattern(find out the method which gives acces to it, get it, filter)
Click on the Link
Of course as the tutorial tells you, if you do not want to always do these iterations you should create some higher level utilities where you can just get the Cell at once. Example: GetGridViewRowCell(gridView, cellRow, cellColumn) where cellRows can be a more sophisticated filter object where you describe which cell must have which value in order to identify the proper row
Assuming the table has a hierarchical structure similar to HTML, you should be able to do the following:
Locate a cell in the row you are looking for that is easy to find, e.g. //WPFDataGridCell[#text='Obama'].
From that cell, move up the hierarchy one step using ...
Now you're in the correct WPFDataGridRow, search down again for the row's "Default" link with //WPFHyperLink[#caption='Default'].
Putting it all together, you'll get a locator like //WPFDataGridCell[#text='Obama']/..//WPFHyperLink[#caption='Default'].
Of course this is only an example based on the information you provided, so if you try it, make sure to pick the attributes with Silk Test's locator spy to make sure you get the correct values.

How to update the Dataset to reflect an added column in the data source without deleting the adapter?

I've made a dataset using the dataset designer, and I'm trying to add a column to reflect changes made to the database (added a column, nothing fancy). Is there a way to 'refresh' the dataset schema from the datasource without deleting my adapter (and all the methods and queries I've created)?
I know its been a while since you posted but as I was having the same problem and figured out how to do this I reckoned I'll post the solution that worked for me.
Right click on the dataset object you want to update (on the strip at the bottom of your viewpane)
Select "Edit in Dataset Designer"
in the dataset designer, right click on the header of the table you want to add a column to
select configure... this will bring up the sql statement that is used to draw values into the dataset for this table
Edit the sql to include the column you want to include in your dataset's table and click finish i.e. in the select statement, include your columns name in the list
close the dataset designer then go to any controls (in my case its a datagridview), click on the tasks arrow (top right hand corner next to the handle) and select add column
select the newly created column from the list of databound columns and click "add"
select "edit columns" from the task menu
move the column to the correct position (it will always be placed as the last column in your grid and you may not want it to be the last column)
voila, I know its hardly snappy but it beats the hell out of deleting the dataset and then fixing up all the coding errors that come up... also after doing it a few times it'll be like second nature (I hope)
regards
p.s. am working in VS2010
Had to just delete the adapter and the table. It's rather annoying but I guess there really isn't a way around it. Maybe in VS2010 or later versions of .net.

Copy a value based on criteria Salesforce

On a Salesforce.com opportunity I have a number of custom fields that are potential options that the end client will eventually select.
Option 1 (Desc Field) Option 1 (Value)
Option 2 (Desc Field) Option 2 (Value)
Option 3 (Desc Field) Option 3 (Value)
At a future point the user will ultimately choose one of the options as the preferred option. What I want is then the value for the chosen option to be stored in another field without the user having to enter it again. A “nice to have” would also be that all 3 option descriptions, values and selected value are locked once this is done.
Any ideas?
Two things come to mind:
(1) The second field could be a formula field that derives it's answer based on the first field.
(2) A workflow rule using a field update to set the value of the second field, using a formula
(3) A trigger to do the same as #2.
As far as locking, one semi-popular method to lock a page layout is to essentially have two page layouts. The first layout has the fields normally, the second layout has the fields with "read-only". You then create a record type called "Read Only", for example. After the user has entered some specific information in a specific set of fields, a trigger could then check the record type from the normal default one, to the "Read Only" one.
To the user's point of view, the record will be the same, but now he sees it from a different page layout.