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

fix: Incorrect listing status #2015

Merged
merged 6 commits into from
Oct 26, 2021
Merged

fix: Incorrect listing status #2015

merged 6 commits into from
Oct 26, 2021

Conversation

dominikx96
Copy link
Collaborator

Pull Request Template

Issue

Addresses #1949

  • This change addresses the issue in full
  • This change addresses only certain aspects of the issue
  • This change is a dependency for another issue
  • This change has a dependency from another issue

Description

Fixes incorrect status (closed) if the application due date is before the current time even if the application is a draft.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Prototype/POC (not to merge)
  • This change is a refactor/addresses technical debt
  • This change requires a documentation update
  • This change requires a SQL Script

How Can This Be Tested/Reviewed?

Try to create a new listing with a past due date ad try to save it as a draft. After saving, a status still should be draft;

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have reviewed the changes in a desktop view
  • I have reviewed the changes in a mobile view
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have assigned reviewers
  • I have updated the changelog to include a description of my changes
  • I have run yarn generate:client if I made backend changes
  • I have exported any new pieces in ui-components

@netlify
Copy link

netlify bot commented Oct 18, 2021

✔️ Deploy Preview for dev-bloom ready!

🔨 Explore the source changes: 0206823

🔍 Inspect the deploy log: https://app.netlify.com/sites/dev-bloom/deploys/6176bf330131ac00075170df

😎 Browse the preview: https://deploy-preview-2015--dev-bloom.netlify.app

@netlify
Copy link

netlify bot commented Oct 18, 2021

✔️ Deploy Preview for dev-partners-bloom ready!

🔨 Explore the source changes: 0206823

🔍 Inspect the deploy log: https://app.netlify.com/sites/dev-partners-bloom/deploys/6176bf332bb00e0008f6bc40

😎 Browse the preview: https://deploy-preview-2015--dev-partners-bloom.netlify.app

@netlify
Copy link

netlify bot commented Oct 18, 2021

✔️ Deploy Preview for dev-storybook-bloom ready!

🔨 Explore the source changes: 0206823

🔍 Inspect the deploy log: https://app.netlify.com/sites/dev-storybook-bloom/deploys/6176bf331a8d270007e97c2b

😎 Browse the preview: https://deploy-preview-2015--dev-storybook-bloom.netlify.app

@dominikx96 dominikx96 changed the title fix: Fix lisitng status on past application due date fix: Incorrect listing status Oct 18, 2021
@emilyjablonski
Copy link
Collaborator

From what's in the issue this looks good but I cannot get back from the Closed state. So if I make a draft listing with a due date in the past this branch still keeps it as a draft which is good. Then I publish it and its closed which makes sense. Then I change the due date to the future and save but it is still closed. It shows up in the closed section in the website but its due date is in the future.

Copy link
Collaborator

@seanmalbert seanmalbert left a comment

Choose a reason for hiding this comment

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

@dominikx96 , please see @emilyjablonski's comment

@dominikx96
Copy link
Collaborator Author

From what's in the issue this looks good but I cannot get back from the Closed state. So if I make a draft listing with a due date in the past this branch still keeps it as a draft which is good. Then I publish it and its closed which makes sense. Then I change the due date to the future and save but it is still closed. It shows up in the closed section in the website but its due date is in the future.

Hm when I click the "Publish" button, a listing is active again. This behavior is only when you click on the "Save and exit" button.

How do we want to resolve it? I think when a listing is closed, you should use Publish to change the status to active even if a dueDate is future. Maybe we should consider changing status to pending when:

  • listing is closed
  • user tries to use the Save and exit button

@emilyjablonski @seanmalbert

@emilyjablonski
Copy link
Collaborator

emilyjablonski commented Oct 20, 2021

@dominikx96 Just putting a note here from what we talked about in standup - when a listing is Closed and we change the due date to the future and hit save and exit, the status should be published

@dominikx96
Copy link
Collaborator Author

@emilyjablonski updated. I had to implement it frontend-side because there is also a Close button so from the backend perspective there is no way to determine which action has been triggered.

@emilyjablonski
Copy link
Collaborator

Getting this on the listing/add page I think you just need an optional
Screen Shot 2021-10-21 at 6 39 45 PM

@dominikx96 dominikx96 merged commit 48aa14e into dev Oct 26, 2021
seanmalbert pushed a commit to CityOfDetroit/bloom that referenced this pull request Jun 23, 2022
* fix: Fix lisitng status on past application due date

* docs: Update changelog

* fix: Update status to active if the dueDate is future

* fix: Fix incorrect useMemo dependency
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