[EXTDAM-283] Bynder Asset Date parsing problem Created: 10/Aug/21  Updated: 01/Oct/21  Resolved: 01/Sep/21

Status: Closed
Project: External DAMs
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Carlos Cantalapiedra Assignee: Unassigned
Resolution: Not an issue Votes: 1
Labels: cm-team-support
Remaining Estimate: Not Specified
Time Spent: 1h 50m
Original Estimate: Not Specified

Attachments: File Bildschirmaufnahme 2021-08-25 um 17.12.15-1.mov     File Bildschirmaufnahme 2021-08-25 um 17.12.15.mov     PNG File Bildschirmfoto 2021-08-31 um 09.18.15.png     PNG File Bildschirmfoto 2021-08-31 um 10.10.49-1.png     PNG File Bildschirmfoto 2021-08-31 um 10.10.49.png     Zip Archive Lehmann Bynder.postman_collection.json.zip     PNG File Screen Shot 2021-08-31 at 2.58.42 PM.png     PNG File Screen Shot 2021-08-31 at 3.02.08 PM.png     Text File bynder-error.log    
Issue Links:
Problem/Incident
Relates
relates to EXTDAM-291 Bynder - Make date time pattern more ... Open
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Epic Link: Ext DAMs maintenance & partnership support
Story Points: 5

 Description   

Steps to reproduce

  1.  Enable Bynder Connector with credentials:
    1. bynderPortalURL: [URL/]
    2. permanentToken: Permanent token from Passwords App
  2.  Open Bynder Tab in Assets Content App
  3. Check the assets are displayed
  4. Select and asset and check an error is thrown

Expected results

Bynder Assets should be selectable in Content App

Actual results

An Error is Displayed in AdminCentral:

Text '2021-07-27T15:04:04.707Z' could not be parsed at index 19 (check attached log for the full stack trace)

Workaround

N/A

Development notes

In class BynderAsset the date is parsed with this format


inputFormatter
= DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss'Z'", Locale.ENGLISH);

But it seems that we receive also the milliseconds '2021-07-27T15:04:04.707Z'



 Comments   
Comment by Yen Lac Tue [ 26/Aug/21 ]

Hi ccantalapiedra
The current implementation is parsing the date follow the instruction from Bynder https://bynder.docs.apiary.io/#reference/assets/asset-operations/retrieve-assets

Which date use the ISO8601 format: yyyy-mm-ddThh:mm:ssZ.

Example: 2014-12-25T10:30:00Z.

Testing with your bynder credentials, the assets display and some can not because of date return is 2021-07-27T15:04:04.707Z which causing the error

Could you please help to check the date stored in your bynder instance to make sure it follow the ISO8601 format?

Thanks,

Yen Lac

Comment by Pierre Sandrin [ 31/Aug/21 ]

I made some test and attached the Postman collection, so you can check the API to see. And I attached a screenshot of a particular Assets and the dates seem to be formated correctly. The Error appears only if I click on a partcular Asset in the Bynder Tab. I dont know which Dates are wrongly formated, is it a special Asset? Or a special state?

 

 

Comment by Yen Lac Tue [ 31/Aug/21 ]

Hi pierre,

I can find the record which date cause the error, please help to take a look at the attached image

Could you please help to check is this date format comes from Bynder instance configuration?

Comment by Pierre Sandrin [ 31/Aug/21 ]

Ah yes. It is this image causing the problem. I will try to see if there is some kind of configuration for the "dateModified"

 

Comment by Yen Lac Tue [ 31/Aug/21 ]

Could you please help to check for "dateCreated", it will also be parse in source code. Thank a lot!

Comment by Pierre Sandrin [ 31/Aug/21 ]

I found out that when i change something in the Asset and save it again in Bynder, the dateCreated ist provided correctly from then on. So it seems that the Bynder API did provide it incorrectly in certain circumstances. I will ask how the Client uploaded the Images into Bynder. It might be a Problem there.

So the bug is probably in the Bynder API. Nonetheless it would be a good idea to check for the date format and catch the exception so the App Remains usable.

Comment by Pierre Sandrin [ 31/Aug/21 ]

UPDATE: The createdDate is delivered in the wrong format after changing multiple assets at a time. If you modify only one asset the "dateModified" is delivered correctly. So this seems to be a Bynder Bug.

Comment by Laura Delnevo [ 01/Sep/21 ]

Thanks pierre for the latest update :bow: 

Generated at Mon Feb 12 01:53:41 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.