How to add a new Activity type to the Task work item in VSTS - azure-devops

Is it possible to add a new Activity type on the Task work item in VSTS and, if so, how can I do it? Thanks!

To add activities that is also available in the Work Details page and Sprint capacity view you need to go to the Process used by the Project (Make sure you have a Process that is editable for the project) and edit a work item type that use the activity field.
You can then edit the work item field and add values to the pick list
Edit work item activity picklist

For VSTS, you can not change system fields (such as Activity) in System processes (Agile, Scrum and CMMI).
The workaround is create an inherited prcess and a new field to replace the system Activity field.
Such as if you are using Agile system process, you can create an inherited process (myagile) from Agile, then change your team project to the inherited process. And add a new field (such as Activity1) to replace the system Activity field. Detail steps as below:
Create inherited process
In Process Tab (https://account.visualstudio.com/_admin/_process) -> Create inherited process from system process -> input the name (such as myagile) -> Create.
Change your team project to use inherited process
Click … button for the inherited process myagile -> Change team projects to use myagile -> select your team project which you want to use the inherited process -> OK.
Add a new field for Task WIT
Click the inherited process (myagile) -> Task -> New field ->cCreate the field Activity1 with picklist(string) type -> add values as system Activity field has (Deployment, Design, Development, Documentation, Requirements and Testing) -> add the new value you want to add (such as MyActivity) -> Layout Tab -> Change the Label as Activity -> Add field.
Replace custom field Activity1 to replace system Activity field
Click … button for the system Activity field -> Hide from layout -> move the custom Activity1 field to the same position of the system Activity field.
Now you can select the new added value from Activity (Activity1 field) dropdown list.

Related

Undo ticked Required field for due date

How do I undo tick the Required box for the Due Date field in Azure DevOps.
The properties of the field have been inherited from another work item that I can't find.
The get the Field Reference Name: Microsoft.VSTS.Scheduling.DueDate.
Please advice?
Thnaks
To make a required field optional, you need to:
Firstly, check whether you are using Inherited process or XML process. In Organization Settings -> Process. The inherited process should be under a Basic process and the XML process begins with an icon like "</>".
If you are using inherited process:
Go to Organization Settings -> Process -> click that process -> select your work item type -> edit the field -> select "Options" tab -> un-check the "Required" checkbox.
If you are using XML process:
Go to Organization Settings -> Process -> export and unzip it -> go to ..\WorkItem Tracking\TypeDefinitions -> open your work item type definition -> search for your field definition -> delete <REQUIRED /> -> save and archive it -> click "import process" in Azure DevOps -> select your file and check "Replace existing template".

How can i click on an item that is freshly created with an automated test?

How can I click on an item that is freshly created with an automated test using katalon?
In my katalon script I am adding one record and immediately I want to edit that record. So I want to identify the new one among old records.
WebUI.click(findTestObject('Object Repository/Page_MEDICALHUB Sales/button_SAVE')) //here I am saving
WebUI.check(???????) //here I want to select checkbox to edit
WebUI.click(findTestObject('Object Repository/Page_MEDICALHUB Sales/i_Sales_fa fa-pencil'))
checkbox is not checked
before try to check
Use this:
WebUI.waitForElementPresent(findTestObject('checkobx'), waitTime)
Since you have to wait for the element to be rendered, you will need to wait not only for it to be present (present in DOM) but also clickable:
WebUI.waitForElementClickable(findTestObject('Object Repository/checkbox element'), 30)
More info on Katalon Docs page.

CTRL+N Not invoking new on a DetailsFormTransactions Page

I need CTRL+N to invoke the default behavior, that is to create a new record without invoking my NewButton.
NewRecordAction property is not filled out, the shortcut does nothing, seems to be disabled.
The DataSource on the form allows create, I can create through my NewButton MenuItemButton.
I seem to have lost it's default behavior somehow, what could cause that?
Ctrl-N does not do anything, because the NewRecordAction is not filled out and because there is not a command button with New in the Command property.
I assume you have used "Create form from template" or have copied from the SysBPStyle_TransactionDetails form (same thing). This form contains a botton NewButton which is ment to call a creation form, like the SalesCreateOrder form.
You have two options:
Fill out the NewRecordAction with the control name of your create menu item. This should be mandatory in list pages.
Delete the NewButton, then create a new command button with New in the Command property. Also remember to assign a value to the DataSource property on the control or a containing node.
I personally prefer the second option (maybe combined with a setFocus call) because a create form is then not needed and there is only one form for you to maintain and the user to learn.

How to update the package explorer manually (Preferences)

I have added a custom LabelDecorator to an Eclipse 3.6, which replaces the cryptic usernames added by the SVN Team Text Decorations. The SVN Team Decorator allows you to add an author tag. What I did was adding another Decorator replacing these author strings (which are company specific shortnames with numbers) with the actual name of the user.
While SVN Team Text Decorations extends the Package Explorer with:
... com.company.package · XY9723 · [30.02.11 19:11]
I replace that by
... com.company.package · Neil Diamond · [30.02.11 19:11]
Now, to complete the mission, I added a preference page, where users are able to specify the attributes (name, forename, birthdate, company name, telephone, etc.), which should be used as replacement. I'd like to update the package explorer (or whereever svn team decorates ressources) with the newly selected attributes whenever "Apply" or "Ok" is pressed.
At the moment the ressources are only updated after you have pressed "Apply" or "Ok" and manually collapse/expand one of the ressource in the explorer.
Is there some event I could fire?
Use the IDecorationManager interface:
IWorkbench workbench = ...;
IDecoratorManager manager = workbench.getDecoratorManager();
inside of the prefernce pages LabelProvider:
ILabelDecorator decorator = manager.getLabelDecorator("com.plugin.mydecorator");
if(decorator != null){ // decorator is enabled
LabelProviderChangedEvent event = new LabelProviderChangedEvent(demoDecorator);
// update specific resources
fireLabelEvent(event, arrayOfResourceToUpdate);
// or update all resources
fireLabelEvent(event);
}
-> see Understanding Decorators
without a LabelProvider
manager.update("com.plugin.mydecorator");
-> see DecoratorManager.java

Dependency Property With Windows Workflow

I have a situation where I have a workflow that uses custom activities within a activity library. The workflow uses the custom activities that moves from custom activity 1 to custom activity 2. In custom activity 1 I create a dependency property that passes in my object (say a Widget) with custom properties. Inside the activity it updates the properties on the Widget (i.e. sets Widget.Name = "New Name"). Inside custom activity 2 I would like to update the same dependent property to update additional properties on the Widget (i.e. set Widget.Title = "New Title").
My question is if I register the Dependency Property in Custom Activity 1 how do I use the dependency property in custom activity 2? If I try and register the property in the second activity I get a build error saying "A property with the same name already exists". The other idea I had was instead of registering the dependency property I tried to use DepenedncyProperty.FromName but that doesn't seem to work either.