Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

As a user I want to have the Coming Up field active when I create a new story in save as a template. [SDBELGA-466] #4033

Merged
merged 6 commits into from
Dec 17, 2021

Conversation

GyanP
Copy link
Contributor

@GyanP GyanP commented Dec 2, 2021

No description provided.

…ew story in save as a template. [DBELGA-466]
@GyanP GyanP changed the title As a user I want to have the Coming Up field active when I create a new story in save as a template. [DBELGA-466] As a user I want to have the Coming Up field active when I create a new story in save as a template. [SDBELGA-466] Dec 2, 2021
@petrjasek petrjasek added this to the 2.4 milestone Dec 2, 2021
@GyanP GyanP marked this pull request as ready for review December 2, 2021 10:08
Copy link
Member

@tomaskikutis tomaskikutis left a comment

Choose a reason for hiding this comment

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

Can you post functional changes in PR description? There's a ticket for this, but this is a 2nd PR for the same ticket if we don't count the one addressing comments from the first one. Were there issues with first implementation, did requirements change?

@GyanP
Copy link
Contributor Author

GyanP commented Dec 2, 2021

Can you post functional changes in the PR description? There's a ticket for this, but this is a 2nd PR for the same ticket if we don't count the one addressing comments from the first one. Were there issues with the first implementation, did requirements change?

The previous PR changes are working fine. Actually, there is one new requirement like when we create an article with a template containing the coming up field then choose any date in the future for it and save the article as a template. after this when we create a new article with that new template then coming up field should behave like it is just turned on(means current datetime + offset time)

@tomaskikutis
Copy link
Member

If I understand correctly, the issue is that when you "save as template" from authoring, it will save the date that is selected via date picker, and not the dynamic date template that we want to get saved?

If that's the case, adding onTemplateCreate(): any option that I mentioned in another comment should work and allow us to keep the logic inside the extension.

@GyanP
Copy link
Contributor Author

GyanP commented Dec 7, 2021

If I understand correctly, the issue is that when you "save as template" from authoring, it will save the date that is selected via date picker, and not the dynamic date template that we want to get saved?

yep, that was the case.

@GyanP GyanP merged commit 06a1e8d into superdesk:develop Dec 17, 2021
@petrjasek petrjasek modified the milestones: 2.4, 2.3.3 Dec 20, 2021
petrjasek pushed a commit that referenced this pull request Dec 20, 2021
…ew story in save as a template. [SDBELGA-466] (#4033)

* As a user I want to have the Coming Up field active when I create a new story in save as a template. [DBELGA-466]

* minor change

* address the comment

* add implementation of date-time field inside the extension

* trigger `onTemplateCreate` for all extensions, not only date time; pass current value as argument

* fix unit tests

Co-authored-by: Tomas Kikutis <t.kikutis@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants