Skip to content

Commit 83f6993

Browse files
committed
link the ticket in the comments
1 parent b4187a7 commit 83f6993

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

common/src/main/scala/com/gu/sfl/model/model.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ object SavedArticleDateSerializer {
8888

8989
// TEMPORARY: the Android client currently sends dates using Java's default Date#toString format
9090
// instead of ISO-8601. This object and its use below should be deleted once the client is fixed
91-
// to only ever send the ISO format used by SavedArticleDateSerializer above.
91+
// to only ever send the ISO format used by SavedArticleDateSerializer above (Task ticket: https://app.asana.com/1/1210045093164357/project/1215309367148854/task/1216728547635263)
9292
object JavaDefaultDateFormat {
9393
// matches java.util.Date#toString, e.g. "Fri Jan 01 00:00:01 GMT 2010" or "Fri Jan 01 08:00:01 GMT+08:00 2010"
9494
val formatter = DateTimeFormatter.ofPattern("EEE MMM dd HH:mm:ss zzz yyyy", Locale.ENGLISH)
@@ -99,7 +99,7 @@ class DirtySavedArticleDeserializer(t: Class[DirtySavedArticle]) extends StdDese
9999

100100
// TEMPORARY: accept both the ISO format and the legacy Java default format until the client
101101
// is updated to always send ISO. Remove the fallback (and JavaDefaultDateFormat above) once
102-
// that migration is complete.
102+
// that migration is complete (Task ticket: https://app.asana.com/1/1210045093164357/project/1215309367148854/task/1216728547635263).
103103
private def parseDate(text: String): LocalDateTime =
104104
Try(LocalDateTime.parse(text, SavedArticleDateSerializer.formatter))
105105
.getOrElse(ZonedDateTime.parse(text, JavaDefaultDateFormat.formatter).toLocalDateTime)

mobile-save-for-later/src/test/scala/com/gu/sfl/controller/SaveArticlesControllerSpec.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ class SaveArticlesControllerSpec extends Specification with Mockito {
4646
* while Android fixes their bug in sending the incorrect format. These tests exist only to
4747
* document and pin down the temporary fallback behaviour, and MUST fail (or get removed) once
4848
* that fallback is gone.
49+
*
50+
* Task ticket: https://app.asana.com/1/1210045093164357/project/1215309367148854/task/1216728547635263
4951
*/
5052
"save the articles when the date is in the java default format" in new Setup {
5153
val javaDefaultDateTimeString = "Fri Jan 01 00:00:01 GMT 2010"

0 commit comments

Comments
 (0)