Resolve mismatch between FeedbackSession and FeedbackSessionAttributes isClosed, isOpened, isInGracePeriod
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
- As the
FeedbackSessionAttributesdid not need a separateisXXXGivenExtendedDeadlineset of methods, a suggestion is to rename them inFeedbackSessionand make the method signatures match the set of methods inFeedbackSessionAttributes. - Implement additional unit tests if need be.
Can I work on this issue with a team for a class project?
Hey @FergusMok, was interested to solve the issue. Was wondering if its still available?