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

Item response time #1021

Open
shayaniox opened this issue Jul 17, 2019 · 0 comments
Open

Item response time #1021

shayaniox opened this issue Jul 17, 2019 · 0 comments

Comments

@shayaniox
Copy link
Contributor

shayaniox commented Jul 17, 2019

The response time is a virtual column on the Item model which its value is calculated on per request. For calculating response time, we need a DateTime flag named need estimate timestamp to measure the delta time between the moment an Item is moved to need estimate zone and the hours the assigned member has to estimate the Item.
Thus, setting the need estimate timestamp equals to setting the response time.

When to set and unset need estimate timestamp?

The need estimate timestamp is set and unset on below APIs:

  • /apiv1/issues/: id ASSIGN
  • /apiv1/issues/: id UNASSIGN
  • /apiv1/items/: id ESTIMATE

/apiv1/issues/: id ASSIGN

On assigning an Issue, an Item is created. So we should examine if the created Item is on need estimate zone or not.

  • If there is no Item for Issue already, the created Item is on need estimate zone; So the need estimate timestamp should be set.

  • If the Phase of created Item equals to current Issue need estimate phase; The Item is on need estimate zone.

  • If the order of created Item phase is less than Issue need estimate phase; It means Item is on need estimate zone and all items are in current Issue need estimate phase move to newly assigned zone, So the need estimate timestamp on these items will be unset.


/apiv1/issues/: id UNASSIGN

On unassigning an Issue, an Item is deleted.

  • If the Item is the Issue need estimate phase; There are two conditions:

    1. The deleted Item is the only Item of Issue.
    2. The other items with the same phase of deleted Item are all estimated.

On the two cases, the items with the first less phase order which is not estimated yet will be moved to need estimate zone.


/apiv1/items/: id ESTIMATE

If the estimated Item is the only remaining item on Issue need estimate phase; the Items on phases with more order will be moved to need estimate zone.

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

No branches or pull requests

1 participant