You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The POST endpoint for adding a new app now allows for existing apps. This is done with a simple conflict check in the SQL-statement. The problem with this is that the created date is defined by logic in the controller. The new value overwrites the existing date.
The logic to check for existing metadata document needs to be moved into the controller and service logic in order to prevent Storage from overwriting the created date.
Steps To Reproduce
Deploy the same application twice.
Notice that the created date is the timestamp of the last deploy. The same as the timestamp for last changed
Additional Information
No response
The text was updated successfully, but these errors were encountered:
@nkylstad We're wondering if altinn.studio should be responsible for setting the created date time of an application. Currently we're setting the date in the Post endpoint logic. We can remove that and respect the input from altinn-studio instead.
@SandGrainOne Studio sets created in applicationMetdata when creating an application. So this is already in the application object and probably doesn't have to be changed in Storage. Or are you thinking of another property?
@nkylstad It boils down to what we want the value to mean in practice. There was an assumption that the created date would mean first deployment time in environment. If that is still the desired meaning, altinn-studio would need to manage the value and treat it differently between first deploy and consecutive deploys.
Ah I see. Well, I have no strong preferences on whether Studio should control this or Storage. If you would like Studio to set the date as part of the application-object we pass to the Post endpoint then that's fine by me! We'll create an issue and try to find some time for it.
Description of the bug
The POST endpoint for adding a new app now allows for existing apps. This is done with a simple conflict check in the SQL-statement. The problem with this is that the created date is defined by logic in the controller. The new value overwrites the existing date.
The logic to check for existing metadata document needs to be moved into the controller and service logic in order to prevent Storage from overwriting the created date.
Steps To Reproduce
Additional Information
No response
The text was updated successfully, but these errors were encountered: