Closed alexander-kuruvilla closed 1 month ago
The changes involve renaming the time
variable and associated methods to timestamp
across various Java classes and JSP files in the repository. This update ensures consistency in naming conventions for handling timestamps. Additionally, database schema migrations were applied to rename the time
column to timestamp
across multiple tables, standardizing the timestamp column names.
Files/Directories | Change Summaries |
---|---|
src/main/java/ai/elimu/util/csv/CsvAnalyticsExtractionHelper.java |
Renamed time variable and setTime method to timestamp and setTimestamp respectively in StoryBookLearningEvent class. |
src/main/java/ai/elimu/web/content/peer_review/... |
Updated handleSubmit methods to use setTimestamp instead of setTime for various peer review event controllers (AudioPeerReviewEventCreateController , LetterSoundPeerReviewEventCreateController , NumberPeerReviewEventCreateController , StoryBookPeerReviewEventCreateController , WordPeerReviewEventCreateController ). |
src/main/resources/db/migration/2004014.sql |
Introduced database migrations to rename time columns to timestamp and change data type to DATETIME across multiple tables. |
src/main/webapp/WEB-INF/jsp/content/contributor/... |
Updated timestamp formatting from time to timestamp for different contribution events (contributor-numbers.jsp , contributor-storybooks.jsp , contributor-words.jsp ). |
src/main/webapp/WEB-INF/jsp/content/letter-sound/... |
Changed timestamp variable from time to timestamp in JSP files related to letter sound contribution and peer review events (edit.jsp , peer-reviews/pending.jsp ). |
src/main/webapp/WEB-INF/jsp/content/letter/... |
Updated date formatting for letterContributionEvent and letterPeerReviewEvent by changing the variable from time to timestamp in edit.jsp . |
src/main/webapp/WEB-INF/jsp/content/multimedia/... |
Renamed time to timestamp for date formatting in JSP files related to multimedia events (audio/edit.jsp , image/edit.jsp ). |
src/main/webapp/WEB-INF/jsp/content/number/... |
Updated timestamp variable from time to timestamp in JSP files related to number contribution and peer review events (edit.jsp , peer-reviews/pending.jsp ). |
src/main/webapp/WEB-INF/jsp/content/sound/edit.jsp |
Changed date formatting variables from time to timestamp for sound contribution and peer review events. |
src/main/webapp/WEB-INF/jsp/content/storybook/... |
Modified timestamp variable from time to timestamp in JSP files for storybook events (edit.jsp , peer-reviews/pending.jsp ). |
src/main/webapp/WEB-INF/jsp/content/word/... |
Updated date formatting from time to timestamp for word contribution and peer review events (edit.jsp , peer-reviews/pending.jsp ). |
Objective | Addressed | Explanation |
---|---|---|
Rename from time to timestamp in the database (#1678) |
✅ |
src/main/webapp/WEB-INF/jsp/content/word/peer-reviews/pending.jsp (1)
`68-68`: **Correct update of timestamp variable.** The change from `${wordContributionEvent.time.time}` to `${wordContributionEvent.timestamp.time}` correctly reflects the database and variable renaming. Ensure that the timestamp is displayed correctly in the UI.src/main/webapp/WEB-INF/jsp/content/letter-sound/peer-reviews/pending.jsp (1)
`68-68`: **Correct update of timestamp variable.** The update from `${letterSoundContributionEvent.time.time}` to `${letterSoundContributionEvent.timestamp.time}` is consistent with the renaming in the database schema. Verify that the displayed format "yyyy-MM-dd HH:mm" is suitable for the application's requirements.src/main/webapp/WEB-INF/jsp/content/number/peer-reviews/pending.jsp (1)
`77-77`: **Correct update of timestamp variable.** The change from `${numberContributionEvent.time.time}` to `${numberContributionEvent.timestamp.time}` aligns with the renaming efforts. Confirm that the timestamp is displayed correctly and that the format "yyyy-MM-dd HH:mm" meets the application's display requirements.src/main/webapp/WEB-INF/jsp/content/storybook/peer-reviews/pending.jsp (1)
`83-83`: **Correct update of timestamp variable.** The update from `${storyBookContributionEvent.time.time}` to `${storyBookContributionEvent.timestamp.time}` aligns with the renaming efforts. Verify that the timestamp is displayed correctly and that the format "yyyy-MM-dd HH:mm" meets the application's display requirements.src/main/webapp/WEB-INF/jsp/content/letter/edit.jsp (2)
`74-74`: **Updated date formatting to use `timestamp`.** The change from `time` to `timestamp` in the `fmt:formatDate` function call aligns with the PR's objective and is correctly implemented here. --- `145-145`: **Updated date formatting to use `timestamp` in peer review events.** This update is consistent with the changes made throughout the file and correctly uses the new `timestamp` field.src/main/webapp/WEB-INF/jsp/content/contributor/contributor-numbers.jsp (3)
`34-34`: **Timestamp variable update in date formatting is correct.** The change from `time.time` to `timestamp.time` correctly reflects the PR's objective to standardize timestamp handling. This should ensure the correct display of the timestamp in the UI. --- `81-81`: **Consistent update for peer review timestamp display.** This update is consistent with the changes made elsewhere in the file, ensuring that all references to the old `time` variable are updated to `timestamp`. Good attention to detail. --- `155-155`: **Proper implementation of timestamp in peer review section.** The update from `time.time` to `timestamp.time` is implemented correctly here as well. This ensures that the display of dates in the peer review section is accurate and consistent with the rest of the application.src/main/webapp/WEB-INF/jsp/content/number/edit.jsp (2)
`182-182`: **Correct update of timestamp usage in contribution events.** The change from `time.time` to `timestamp.time` in the date formatting tag is correct and aligns with the PR's objectives. This should ensure the accurate display of timestamps in the contribution events section. --- `253-253`: **Properly updated timestamp formatting in peer review events.** The update to use the `timestamp` variable for date formatting in peer review events is correctly implemented. This change maintains consistency across the application.src/main/webapp/WEB-INF/jsp/content/multimedia/image/edit.jsp (1)
`116-116`: **Timestamp update in image contribution events is correct.** The renaming of `time` to `timestamp` in the date formatting tag is implemented correctly. This ensures that the timestamp is displayed accurately in image contribution events.src/main/webapp/WEB-INF/jsp/content/letter-sound/edit.jsp (2)
`213-213`: **Correct implementation of timestamp in letter sound contribution events.** The change from `time.time` to `timestamp.time` is correctly implemented, ensuring that the timestamp is displayed accurately in letter sound contribution events. --- `284-284`: **Consistent timestamp formatting in peer review events for letter sounds.** The update to use the `timestamp` variable for date formatting in peer review events is correctly implemented, maintaining consistency and accuracy in the display of timestamps.src/main/webapp/WEB-INF/jsp/content/multimedia/audio/edit.jsp (2)
`193-193`: **Updated Timestamp Formatting** The update from `time` to `timestamp` here is consistent with the PR's objective to standardize timestamp handling. The formatting string is correctly maintained. --- `264-264`: **Updated Timestamp Formatting in Peer Review Section** This change correctly updates the timestamp formatting for peer review events, aligning with the PR's objectives. The use of the `timestamp` field and the date formatting pattern are correctly applied.src/main/webapp/WEB-INF/jsp/content/word/edit.jsp (1)
`311-311`: **Updated Timestamp Formatting in Peer Review Section for Words** This update correctly applies the new `timestamp` field for formatting dates in the peer review section for words. The consistency in date formatting ensures that the display remains accurate and clear.src/main/webapp/WEB-INF/jsp/content/sound/edit.jsp (2)
`78-78`: **Updated variable name from `time` to `timestamp`.** The change from `${soundContributionEvent.time.time}` to `${soundContributionEvent.timestamp.time}` is consistent with the PR objectives to standardize timestamp naming. This should help avoid confusion in the codebase. --- `149-149`: **Updated variable name from `time` to `timestamp`.** The change from `${soundPeerReviewEvent.time.time}` to `${soundPeerReviewEvent.timestamp.time}` is correctly implemented and aligns with the PR's goal of renaming `time` to `timestamp` to enhance clarity.src/main/webapp/WEB-INF/jsp/content/contributor/contributor-words.jsp (2)
`30-30`: **Updated variable name from `time` to `timestamp`.** The change from `${wordContributionEvent.time.time}` to `${wordContributionEvent.timestamp.time}` is correctly implemented. This update is part of the effort to standardize the handling of timestamps across the application. --- `77-77`: **Updated variable name from `time` to `timestamp`.** The changes from `${wordPeerReviewEvent.time.time}` to `${wordPeerReviewEvent.timestamp.time}` are correctly implemented across multiple instances in the file. This ensures consistency in how timestamps are handled and displayed. Also applies to: 151-151src/main/webapp/WEB-INF/jsp/content/contributor/contributor-storybooks.jsp (1)
`32-32`: **Updated variable name from `time` to `timestamp`.** The changes from `${storyBookContributionEvent.time.time}` and `${storyBookPeerReviewEvent.time.time}` to `${storyBookContributionEvent.timestamp.time}` and `${storyBookPeerReviewEvent.timestamp.time}` are correctly implemented. These updates are part of the effort to standardize the handling of timestamps across the application, enhancing clarity and consistency. Also applies to: 79-79, 153-153
Attention: Patch coverage is 4.91803%
with 58 lines
in your changes missing coverage. Please review.
Project coverage is 15.26%. Comparing base (
db733c0
) to head (e670259
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@jo-elimu thanks for your guidance and input, I will work on those.
@alexander-kuruvilla The changes need to be reflected in the frontend files as well. For example the
WEB-INF/jsp/content/letter/edit.jsp
:Caused by: javax.el.PropertyNotFoundException: Property [time] not found on type [ai.elimu.model.contributor.LetterContributionEvent] at javax.el.BeanELResolver$BeanProperties.get (BeanELResolver.java:253) at javax.el.BeanELResolver$BeanProperties.access$300 (BeanELResolver.java:206) at javax.el.BeanELResolver.property (BeanELResolver.java:322) at javax.el.BeanELResolver.getValue (BeanELResolver.java:93) at org.apache.jasper.el.JasperELResolver.getValue (JasperELResolver.java:125) at org.apache.el.parser.AstValue.getValue (AstValue.java:168) at org.apache.el.ValueExpressionImpl.getValue (ValueExpressionImpl.java:189) at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate (PageContextImpl.java:690) at org.apache.jsp.WEB_002dINF.jsp.content.letter.edit_jsp._jspx_meth_fmt_005fformatDate_005f0 (edit_jsp.java:1411) at org.apache.jsp.WEB_002dINF.jsp.content.letter.edit_jsp._jspx_meth_c_005fforEach_005f0 (edit_jsp.java:1305) at org.apache.jsp.WEB_002dINF.jsp.content.letter.edit_jsp._jspx_meth_content_005fsection_005f0 (edit_jsp.java:365) at org.apache.jsp.WEB_002dINF.jsp.content.letter.edit_jsp._jspService (edit_jsp.java:227)
-->
Tip
For a quick sign-on during localhost development, use this URL: http://localhost:8080/webapp/sign-on/test/role-CONTRIBUTOR
Got it. I wasn't able to check out the frontend, thanks for that tip. I'll update the jsps and go over the pages. Thanks.
Also I wanted to run something by you regarding coderabbitai's query optimisation suggestion, should I make the changes along with this or does that have to be another issue?
Also I wanted to run something by you regarding coderabbitai's query optimisation suggestion, should I make the changes along with this or does that have to be another issue?
@alexander-kuruvilla The CodeRabbit suggestion seems reasonable, but is out of scope for this PR. So yes, feel to create a new issue for addressing that separately 👍
Closes #1678
Changes: Updated the name of objects name time to timestamp. Updated setTime() to setTimestamp(). Updated getTime() to getTimestamp(). Updated references to getters and setters in the code.