Skip to content

Update Date.vue dateFormat to include seconds#3096

Merged
Joossensei merged 2 commits into
bolt:masterfrom
simongroenewolt:fix/issue-3082
Feb 28, 2022
Merged

Update Date.vue dateFormat to include seconds#3096
Joossensei merged 2 commits into
bolt:masterfrom
simongroenewolt:fix/issue-3082

Conversation

@simongroenewolt

Copy link
Copy Markdown
Contributor

Added seconds to dateFormat to fix issue with date-compare between database original and edited version, causing users that didn't have the right to change publication dates to be denied making edits.

This fixes #3082

Note, this is only for the dateFormat, this is used 'behind the scenes' in this vue component and is used to post to the server, the actual format shown is specified in altFormat.

@Joossensei

Copy link
Copy Markdown
Contributor

Hey! First of all nice fix! But I don't think it happens on the background only as the Cypress tests are failing.

One way to fix this is by editing the failing tests over here:
https://github.com/bolt/core/blob/8cbe02383a3b31b71cbf3e7b3fe35ba29ceacde4/tests/cypress/integration/edit_record_1_field.spec.js#L54-L181

It should be fixed by just adding the seconds it should expect.
Screenshot 2022-02-22 at 08 50 27

If the tests work then we can merge it in 😄

@simongroenewolt

Copy link
Copy Markdown
Contributor Author

Thanks @Joossensei for the tip on where to fix the tests. It looks like these tests do check a value in the dom that is not visible to the user, but as it is the actual value that should be posted it is important to fix them anyway -- I'll try to get that done this week.

@Joossensei Joossensei left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! 👍🏻

@Joossensei Joossensei merged commit 18eccb8 into bolt:master Feb 28, 2022
@bobdenotter bobdenotter changed the title Update Date.vue dateFormat to include seconds Update Date.vue dateFormat to include seconds Mar 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

As ROLE_EDITOR, can't save changes on any record

3 participants