Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Add option to bypass rules on workitem create and update #1070

Open
danielorn opened this issue Nov 22, 2020 · 0 comments · May be fixed by #1071
Open

[Feature Request] Add option to bypass rules on workitem create and update #1070

danielorn opened this issue Nov 22, 2020 · 0 comments · May be fixed by #1071
Labels
Feature Feature Work required.

Comments

@danielorn
Copy link

danielorn commented Nov 22, 2020

Is your feature request related to a problem? Please describe.
I cannot bypass rules when I create or update a workitem

Describe the solution you'd like
The Azure DevOps REST API for creating and updating a workitem exposes a query parameter called "bypassRules". This defaults to false, but could be set to true to allow to bypass the rules.

I propose adding a flag --bypass-rules to az boards work-item create and az boards work-item update to expose this behavior in the CLI

As such the below commands will create and update a workitem respectively, setting the System.ChangedDate to Jan 1st 2010

az boards work-item create --title "Test" --type Task --fields System.ChangedDate=2010-01-01T00:00:00.000Z --bypass-rules
az boards work-item update --id <ID> --fields System.ChangedDate=2010-01-01T00:00:00.000Z --bypass-rules

Omitting the --bypass-rules flag preserves the original behavior, i.e the values in System.ChangedDate will be disregarded by the server and the System.ChangedDate will be set to the current time.

az boards work-item create --title "Test" --type Task --fields System.ChangedDate=2010-01-01T00:00:00.000Z
az boards work-item update --id <ID> --fields System.ChangedDate=2010-01-01T00:00:00.000Z

Additional context
An example of when this would be useful is when importing workitems from another product and history is to be preserved. Then the fields System.CreatedDate and System.ChangedDate must be set to the original creation/change dates of the workitem and not to the time when the import is run.

@danielorn danielorn added the Feature Feature Work required. label Nov 22, 2020
@danielorn danielorn linked a pull request Nov 24, 2020 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Feature Work required.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant