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

Capacity per day as integer only #305

Closed
RK159 opened this issue Dec 17, 2019 · 3 comments
Closed

Capacity per day as integer only #305

RK159 opened this issue Dec 17, 2019 · 3 comments
Assignees
Labels

Comments

@RK159
Copy link

RK159 commented Dec 17, 2019

In v5_1/work/models.py

`
class Activity(Model):
"""Activity.

:param capacity_per_day:
:type capacity_per_day: int
:param name:
:type name: str
"""

_attribute_map = {
    'capacity_per_day': {'key': 'capacityPerDay', 'type': 'int'},
    'name': {'key': 'name', 'type': 'str'}
}

def __init__(self, capacity_per_day=None, name=None):
    super(Activity, self).__init__()
    self.capacity_per_day = capacity_per_day
    self.name = name

`

the type of the parameter capacity_per_day is 'int', but the user could fill that field with a float.

For instance with a 10 days iteration, if the user fills "4.9" in capacity per day, and that we want to use the api to calculate the total capacity for the iteration, the results from the api will be 40 instead of 49

Is there a way to change that?

@tedchamb tedchamb added the bug label Jan 2, 2020
@tedchamb tedchamb self-assigned this Jan 2, 2020
@tedchamb
Copy link
Member

tedchamb commented Jan 3, 2020

#308

@tedchamb
Copy link
Member

tedchamb commented Jan 3, 2020

@RK159 thanks for reporting this issue.

The fix is in the following releases:
https://github.com/microsoft/azure-devops-python-api/releases/tag/6.0.0b2
https://github.com/microsoft/azure-devops-python-api/releases/tag/5.1.0b7

@tedchamb tedchamb closed this as completed Jan 3, 2020
@RK159
Copy link
Author

RK159 commented Jan 7, 2020

Thanks for the quick response @tedchamb that helps a lot!

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

No branches or pull requests

2 participants