Cannot change Parent Link from Userstory to another Epic - azure-devops

I have imported work items from jira to Azure DevOps. There are Epics containing user stories as children.
These links describes most of the structure of my project. The user story ha a parent link to its epic. Now, i want to change some parent links from the old epic to another epic. If i try that on the user story item, i can only choose features as new parents, but no epics.
The company has set up the "agile" process.
I already checked the devops documentation and think, that parent child links are suitable for any work item type?

i want to change some parent links from the old epic to another epic.
Open the User Story->click the links tab->Select the parent link->click the button Remove link->click Add links->Existing item->select Links type Parent->enter another Epic work item ID->Click OK and Save&Close button to save it, then we could see the parent link has changed. Check the GIF below.

Related

Find what the parent of an unparented task was in Azure DevOps

Is there a way to query product backlog items (and their histories) to find what the parent of an unparented task was before the link was deleted?
For instance here I have two tasks that are showing up as unparented.
They used to be parented to a user story but the link has been broken. Rather than having to trawl all my user stories and look through the history, I would like to be able to run a query (for instance on item 253152) and it to tell me what the parent used to be.
Update 07 Apr 2022:
Miao Tian's answer is of course absolutely correct.
In our case the tasks appear to have never been parented. They where created by a third party tool which appears to have failed to link them correctly. I'll post more information if it is helpful when we get to the cause.
If you just need to find the parent of this work item in the past, you don't need to use query. You can directly open item 253152 to view its history.
example:
start
delete the link
check the history of the task and find the parent

In Azure DevOps Server (TFS on Prem) is there a way to link a Changeset to a hyperlink directly?

I am looking to see if it is possible to link a TFS Changeset with a hyperlink directly.
I can create a workitem and in the workitem create a Hyperlink link type to a site and then associate the changeset to the workitem. Doing this however the user has to open the 'Related Work Items' list, open the Related work item, locate the hyperlink link, and open the link.
The end result I am looking for would be when viewing the Changeset Details of a Changeset there would be a 'Related Links' section or something similar where the user could easily see any related hyperlinks for the changeset.
Thanks,
Chris
So after some trial and lots of errors I have come up with a workable solution for my case.
Accomplished by way essentially two actions in a Visual Studio Extension and a new custom Work Item type.
New Work Item type - basically used the Code Review template a hidden work item that can only be created through automation. Removed the fields not needed for my case.
Visual Studio Extension Part 1 - setup up an action that takes place when the user clicks the 'Checkin' button on the Pending Changes window. When this action is triggered the extension will capture some relevant data from the checkin. The extension will then create the new work item and establish two links in the work item. One link is relating the changeset and the work item. The other is a hyplerlink to the desired site.
Visual Studio Extension Part 2 - setup an action for the Changeset Details View. When the Changeset Details View is loading grab the selected changeset ID. This proved to be a somewhat difficult task as a lot of the provided Changeset details classes are private. After grabbing the changeset ID, find the related work items to the changeset. Loop through the links in the work item grabbing the hyperlink links in the work item. Then go through the found hyplerlinks and display them in a new section through WPF in the changeset details view.
Section of code that helped get the changeset ID in the Visual Studio Extension:
var dte = Package.GetGlobalService(typeof(EnvDTE.DTE)) as EnvDTE.DTE;
var dte2 = (EnvDTE80.DTE2)dte;
var vce = dte2.DTE.GetObject("Microsoft.VisualStudio.TeamFoundation.VersionControl.VersionControlExt") as VersionControlExt;
VersionControlHistoryChangesetItem[] versionControlHistoryChangesetItems = vce.History.ActiveWindow.SelectedChangesets;

Child work types inheriting field values from parent item

I am working through creating a custom process in Azure DevOps and was curious if field values from parent can be shared with child items.
Here is an example:
Create field 'Custom Field 9' on Epic work type
Create the same field 'Custom Field 9' on Product Backlog Item work type
Create an epic and fill in the value of 'Custom Field 9'
Create a child Product Backlog Item, 'Custom Field 9' is then inherited to the backlog items field.
What I've tried so far is to use a rule on either Epic or Product Backlog Item, however, I do not believe the rules can apply to creation of children processes.
One other option I'm going to try later today is a Flow that detects when a child work item is created and perform it automatically. I'd like to try to keep this contained to Azure DevOps if possible.
Edit: Thought it helpful to mention that we are using the hosted solution of DevOps and nothing on premise.
Sorry to say that as default, there does not such a work item features with "out of the box". But you can use another tool to achieve this.
Like you said, Microsoft Flow, there does not such feature supported while connect with Azure Devops.
But, in addiiton, I think you can do this with writing some custom scripts. And then configure Web hook to trigger this custom events.
Also, here has another tool named TFS Aggregator (Web Service) to achieve what you want. You can set and configure apply certain rules (such as copying fields from a parent item to a child item). And it will trigger after a work item is created or saved.
I know this is very inconvenient, here has an same feature suggest which raised by others. They has the same demand with you. You can vote and comment for this suggestion. When there are enough communities vote and add comments for this feedback, the product team member will take this feedback seriously.
I needed this feature as well, but in it's absence I have got it to work (relatively easily) with an Azure Logic App (for anyone also using Azure)
​Trigger
When a work item is created
Then
​Get work item details using "Parent" as the work item ID to search for
​Finally
​Update the new work item with any field from the parent you require
​
​

User Story State Change to Update Work Items

We're currently using Azure DevOps to manage work items (user stories, task , etc.). I'd like enable an event/trigger when I close the user story, the child task-status are also closed. Is this possible?
I saw within
User Story State Change to Update Work Items
Generally, we would like convert the parent work item state based on the linked child work item state, not the other way around.
Converting the child work item state based on the linked parent work item state may cause some unsafe issue. For example, if we have one child work item that is not completed, then we accidentally closed the parent work item. In this case, the incomplete child work item will also be closed incorrectly.
To resolve auto change parent states, there is a free solution on the marketplace available: TFS Aggregator, For VSTS, you need to use Web Hook to complete it. Please refer to this : https://github.com/tfsaggregator/tfsaggregator-webhooks.
Besides, if auto change the linked child work item states is your final requirement, You can use the Rest API to invoke state changes. You could check the post and the post for some more details.
Hope this helps.

MOSS 2007 - Customize Send To Menu

We currently have a need to add a custom menu item to the Send To menu within our document libraries that would allow a user to create a link to the currently selected list item within another library. When the user clicks on the new "Send Link to..." menu item, they should be prompted to browse to the library in which the link should be added. Once the user chooses a destination, the link, along with the metadata from the list item, should magically appear in the selected desitnation library. Once again, we only want a link, not a copy of the file. Is this possible to do? Code examples would be much appreciated.
Does it have to be in the send to menu? Can it also be directly in the context menu (say at the bottom)? If so, you can create a feature that deploys a CustomAction to the site. If it really, REALLY needs to be under the "send to" menu, you are going to have to use javascript (since that is how the out of the box context menu is created) to "hijack" the menu and insert your own item.
IMHO this is rarely needed, a CustomAction is the preferred way of doing this. It is the easiest and most "maintainable" (all it is is a feature + customaction definition with maybe some code, all of which are deployed using a solution).
More info on CustomActions here.
P.S. if you do decide to go with javascript, don't go editing the out of the box sharepoint js files in SharePoint's 12 Hive, but add a ContentEditorWebPart to the page and insert your Javascript in there.
P.P.S. While assigning a method from an assembly as the action for a CustomAction is allowed in most cases, it is not for the ListEdit (item) context menu.
What they say is that "Sharepoint server 2010 will have it out of the box", i.e. documents may stay where they were created and links go to the Records center (named "In Place Records Management, see http://www.cmswire.com/cms/document-management/the-scoop-sharepoint-2010-records-management-005948.php).
MOSS 2007 requires the actual document to be copied to the Records repository to be registered.