teammates icon indicating copy to clipboard operation
teammates copied to clipboard

Resolve mismatch between FeedbackSession and FeedbackSessionAttributes isClosed, isOpened, isInGracePeriod

Open FergusMok opened this issue 1 year ago • 2 comments

Currently, there's a mismatch in behavior of the methods during the migration. FeedbackSession only takes into account endTime, but the original method takes into account graceTime, deadlineExtensions and endTime.

https://github.com/TEAMMATES/teammates/blob/d6c67fc9dd31c36f196be454a22cce955e1c8229/src/main/java/teammates/storage/sqlentity/FeedbackSession.java#L454-L477

https://github.com/TEAMMATES/teammates/blob/d6c67fc9dd31c36f196be454a22cce955e1c8229/src/main/java/teammates/common/datatransfer/attributes/FeedbackSessionAttributes.java#L318-L344

The actual behavior should instead use these methods: https://github.com/TEAMMATES/teammates/blob/d6c67fc9dd31c36f196be454a22cce955e1c8229/src/main/java/teammates/storage/sqlentity/FeedbackSession.java#L486-L511

Impact of bug During the migration, due to similarity in names, some migrated actions are utilizing the wrong method.

Suggested change

  1. As the FeedbackSessionAttributes did not need a separate isXXXGivenExtendedDeadline set of methods, a suggestion is to rename them inFeedbackSession and make the method signatures match the set of methods in FeedbackSessionAttributes.
  2. Implement additional unit tests if need be.

FergusMok avatar Feb 19 '24 09:02 FergusMok

Can I work on this issue with a team for a class project?

franko1508 avatar Oct 11 '24 14:10 franko1508

Hey @FergusMok, was interested to solve the issue. Was wondering if its still available?

arnav-goel05 avatar Jun 28 '25 07:06 arnav-goel05