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

Creating work item with validateOnly=True causes exception #36

Open
SAnCherepan opened this issue May 16, 2018 · 2 comments
Open

Creating work item with validateOnly=True causes exception #36

SAnCherepan opened this issue May 16, 2018 · 2 comments

Comments

@SAnCherepan
Copy link
Contributor

validateOnly=true is used to test work item creation without actually creating one.
Therefore, response contains fields of not-created-workitem.
Logically, it does not contain System.ID.
That breaks WorkItem.__init__() method that tries to self.id = self.data["id"] while data has no "id".

@ondrno
Copy link
Contributor

ondrno commented Dec 30, 2018

@allburov , @SAnCherepan : what would be the expected behaviour when calling, e.g. create_workitem('Bug', validateOnly=true)?

A solution could be that create_workitem() would return True/False (depending on http response) instead of returning a Workitem instance. What do you think?

@Boltyk
Copy link
Member

Boltyk commented Apr 12, 2019

Maybe fixed with 39aa216

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants