Skip to content
This repository was archived by the owner on Oct 20, 2022. It is now read-only.

Conversation

@martin-trajanovski
Copy link
Contributor

@martin-trajanovski martin-trajanovski commented Jun 2, 2022

Description

Call should become inactive when the cycle ends not on call end date. Added is_active flag on the call to be able to explicitly deactivate/activate calls.

Motivation and Context

Previously we were making a call inactive on the call ended date.

How Has This Been Tested

  • manual tests
  • e2e tests

Fixes

https://jira.esss.lu.se/browse/SWAP-2465

Depends on

Frontend PR: UserOfficeProject/user-office-frontend#956

Tests included/Docs Updated?

  • I have added tests to cover my changes.
  • All relevant doc has been updated

@auto-add-label auto-add-label bot added the enhancement New feature or request label Jun 2, 2022
@martin-trajanovski martin-trajanovski marked this pull request as ready for review June 13, 2022 06:48
@martin-trajanovski martin-trajanovski requested a review from a team as a code owner June 13, 2022 06:48
@martin-trajanovski martin-trajanovski requested review from simonfernandes and removed request for a team June 13, 2022 06:48
@martin-trajanovski
Copy link
Contributor Author

@bolmsten you can double check this now and confirm if the changes are correct.

@bolmsten
Copy link
Contributor

This looks good for ESS, can STFC verify that this would work for them as well?

@martin-trajanovski martin-trajanovski self-assigned this Jun 13, 2022
@martin-trajanovski martin-trajanovski added the review: please A request for an ad-hoc review. label Jun 13, 2022
/**
* NOTE: We are comparing dates instead of using the call_ended flag,
* because the flag is set once per hour and we could have a gap.
* TODO: Maybe there is a need to use the timezone setting here but not quite sure about it. Discussion is needed here!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have thought this would be fine as new Date().toISOString() and start_call and end_call is all in UTC

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@simonfernandes thank you I can remove the comment then. 🙂

* TODO: Maybe there is a need to use the timezone setting here but not quite sure about it. Discussion is needed here!
*/
const currentDate = new Date().toISOString();
if (filter?.isEnded === true) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the filter value isEnded used? If no service is using it we could consider removing it.

@martin-trajanovski martin-trajanovski changed the title feat: Call should end on endCycle instead of endCall date feat: Call should end explicitly instead of endCall date Jul 20, 2022
@martin-trajanovski martin-trajanovski changed the title feat: Call should end explicitly instead of endCall date [WIP] feat: Call should end explicitly instead of endCall date Jul 27, 2022
@martin-trajanovski martin-trajanovski marked this pull request as draft July 27, 2022 12:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants