Manage versions with Azure DevOps - azure-devops

I currently use these tools :
Azure DevOps - Only for Git repositories
Jira - To manage tasks / bugs / versions / customer requests / ...
TeamCity - Continuous integration (build and deploy versions )
I would like to replace Jira with Azure Devops (but continue to use TeamCity for builds for now.)
I already created some teams / areas / user stories / bugs.
But I would like a simple way to handle versions. For example, I fix some bugs and release a new version using TeamCity (ex. : v3.1.1.1234 ). How can I update my user stories / bugs to say that it is fix in this version ? There is no "Fix version" field like in Jira...
Should I use "Iterations" or just "tags" ?
If I want to generate release notes for the new version (for internal use), do I have to use Azure DevOps queries ?

You can create a customized field (ie.Fix version) for User Stories in azure devops. You can follow below steps:
1, Create an inherited process. (only an inherited process is allowed to create custom field)
Organization Setting--> Process under Boards--> Select the Process--> Click 3dots(...)-->Click Create inherit process.
2, Create customized Field for the inherited processs which created above
Choose your inherited process, and then choose the Work Item Type (ie, User Story)you want to customize.
Click New field, type in the new field's name (ie. Fix Version) in the Definition section. (you can decide where the new field should locate in Layout section or keep the default layout).
3, Change your project process to above inherited process.
Choose the process that contains you project. Click Projects-->Choose your Project-->Click the 3dots-->Click Change Process
You can check the document here for more information.
After you finish above steps, you will see the new field Fix Version in User Stories edit page.
If you find above steps complicated, you can just use tags.

#Levi Lu-MSFT, This only lets you create field in one workitem type if you want same field in Bugs, Features, Stories it wouldn't allow, it'll throw 'Field already exists" error.

Related

Why don't I have have permission to add Project Work Items in Azure Dev Ops

I am the owner of an Organization and the project within that organization, but I am not able to see the Add button for work types.
What permission needs to be set for me to have this ability?
You are trying to edit a base process. You have to create a child process first: Create and manage inherited processes
You can't edit the built-in process types. You must first create an inherited template. You can edit that and then switch the process type of your project.

VSTS Extension - Release definition data, environment ids

I am developing web extension for VSTS. I am using vss sdk of Microsoft.
I got some issue.
You can see on the image that there is new line - App insights Settings
This pop up appears on clicking on 3 dots near every release definition on page of list of all releases.
This button navigates user to some environment of some specific release.
Example of link:
https://ozcodedev.visualstudio.com/OzCode/_releaseProgress?releaseId=372&_a=release-environment-logs&environmentId=850
The problem that I do not know how to fetch list of releases and environments for building this link.
How can I get them on page All release pipelines.
Through the GUI it is not possible to get all the release ids and the environment ids for each step. However this is possible through the VSTS APIS. You could use the release endpoint to and iterate to obtain your release id
https://{accountName}.vsrm.visualstudio.com/{project}/_apis/release/releases?api-version=4.1-preview.6
Once you have the release id you can use it like so
https://{accountName}.vsrm.visualstudio.com/{project}/_apis/release/releases/{releaseId}?api-version=4.1-preview.6
Within the returned JSON you can follow iterate the path environment[n].id to obtain the environment id.
You can then construct the link using this information.
Hope that helps
Ok. So after working 2 days on this issue I found solution.
1.It is possible to fetch data that I wanted on Client Side. For this I used Microsoft's library vss-web-extension-sdk. Install it - npm install vss-web-extension-sd --save.
2.Add relevant scopes to your vss-extension.json. In my case the problem was - that I needed data that relates to managing of VSTS user releases. So after Including "vso.release_manage" to my scopes array I stopped to got 401 Unauthorized error because access token was changed according to new scopes.
https://learn.microsoft.com/en-us/vsts/extend/develop/manifest?view=vsts#scopes
In this documentation you can check which scope controls which resources that can be accessed by your extension.
You can use our ts/js clients to get whatever you want for your experience.
We have extensive documentation available here. Let me know if you are blocked anywhere.

How to customize workflow in Azure DevOps Service (VSTS online)?

I've read all the MSDN docs, but cannot find a way to edit the work item transitions in Azure DevOps Service (VSTS online).
I'm trying to:
Add a custom Reason to a State of a work item. (e.g. "resolved", "won't fix")
See/edit all the existing rules about how states transition.
This is possible if you are on the Hosted XML Process model in VSTS.
Hosted XML process model concept - VSTS
When are you on the Hosted XML Process model you ask??
Well after lots of reading I found the following note on the page explaining Hosted XML customization which states
Feature availability: Import process supports the Hosted XML process model which allows you to manage customizations through updating select XML definition files of a process template. This feature is only available for accounts that have been migrated to VSTS using the TFS Database Import Service.
But since I didn't import my VSTS I'm on the Inheritance Process model.
Which does NOT currently support this feature as confirmed here in comments
#RohanDaniel #ehofman#MSFT #DevMarTechOps You are correct. Advanced workflow management, which includes restricting transitions and customizing the reasons of a transition is not yet possible in the Inheritance model. It is on our backlog to add though.
Also, if you indeed used a high fidelity migration tool and you have a Hosted XML process model, you are stuck on it. You cannot move to the inheritance model as seen in this link.
In summary then. On the Inheritance Process model in VSTS this is not a feature that is available currently but is on the backlog as confirmed by MS. However it is not planned for delivery in the next few months and a year or more from now is more likely.
In my case I also had to add addition fields and a new state on the BUG WIT (Work Item Type). This was accomplished on VSTS by customizing a process which is done by inheriting from one of the standard processes ( Agile, CMMI, Scrum ) which you can then customize.
You can add customized rules to a WIT and you can base a rule on changes to the state.... however the rules seems too limited to restrict transitions and the options to set fields doesn't have the "Reason" field available.
In fact, I came up with a solution! Which I admit is not clean as I would like, but it works.
I created three new fields: "Rules error" (Text single line), "Rules broken" (Text single line) and "Rules activated" (Boolean).
"Rules error" I put it on the main tab so I can see the error and the two others I created a tab named "Useless" in which I put them.
Now, add a rule making the reset:
Name: Reset rules
Condition: The value of equals ==> "Rules activated" ==> true
Action: Clear the value ==> "Rules error"
And then one rule per not wanted transition of states:
Name: State change - Approved to Deployed QA
Condition: A work item state changes from ==> Approved ==> Deployed QA
Action: Make required ==> "Rules broken"
Action: Set the value of ==> "Rules activated" ==> true
Action: Set the value of ==> "Rules error" ==> "Can't change from Approved to Deployed QA"
I know, entering something in the field "Rules broken" breaks this enforcement, but as this functionality doesn't exist, it is the only way I came up with when you don't have access to Hosted XML.
Neither of those things appear to be possible at the moment.
The VSTS process customisation is very different to TFS and is still evolving. #1 seems like something that might be added in a future update. But #2 doesn't seem like it would appear, as Microsoft have relaxed most of the transition rules on all the templates on VSTS by default.
This is currently not possible when using inheritance process.
You can vote for this feature request in the community: Allow specifying state transitions when using inheritance process
It's possible by creating our own custom extensions and creating some rules that disable state changes from one state to another state
I have implemented this for my org but haven't published it online..will do it soon
Here is a workaround for denying any users who are not a member of group "HighLevelManagement" to change state from Approved to Committed for PBI:
Create a new Field Called "Unlocked".
create a new rule to "Hide the Field" when the user is not part of "HighLevelManagement" as below
Create a new rule with action "Make Read Only" set to "State" when
Unlocked is False and workitem change from Approved to Commited as
below:
Now whenever a user from HighLevelManagement wants to change state from Approved to Committed he simply tick Unlocked change state and then tick back Unlocked, that way anyone from outside HighLevelManagement will be restricted to change state from Approved to Committed.

Is it possible to publish versions of a page/asset in AEM?

For a regulatory requirement, we are supposed to show the previous versions of a page/asset (state of page as of particular date) at publish instance. So when an end user searches an asset, and if the asset had multiple versions, he should be able to hit any version from the search result.
I managed this to solution from author instance wherein I included the versionId in query param or selector and a custom filter picked this version in url, used version manager to return the respective version of page.
When it comes to publish, from 6.1 AEM has made ACLs stricter in accessing /jcr:system. I tried to publish a revision say /jcr:system/jcr:versionStorage/1f/4f/d1/1f4fd128-b9e3-43cc-9d8a-9335bb34c3ae from activation tree and it didnt publish either.
With this requirement how can we publish versions of a page/asset?

Set workflow model id (path)

When I create a new workflow model in AEM, it gets created under /etc/workflow/models. How do I get it to be created under a different path like /etc/workflow/models/myapp ? The only way I can think of is changing the path in CRXDE after the workflow gets created. Wanted so if there is a better way to do this.
Better way to move workflow to another place would be:
go to /miscadmin#/etc/workflow/models
use button "Move..."
Unfortunately, it seems, that there is no easy way to change place, where worflows, which are created through UI, are stored. To do this you should:
override "/libs/cq/workflow/widgets/source/widget/ModelsPanel.js" in you project, where you can find action this.newAction, where you will be able to change propery parentPath to /etc/workflow/models/myapp. But you can run into troubles after upgrading to another version of AEM.
also you can be interested in service Granite Workflow Service where you can set (through /system/console/configMgr) path to your models, which should be shown in Workflow Console /libs/cq/workflow/content/console.html. (Also it's applicable to CQ 5.6.1, for some older versions, you should configure Day CQ Workflow Service).