CodeYourFuture / tech-products-demo

Example app for tech products interview experiment
https://tech-products-demo-d1182e30f280.herokuapp.com/
ISC License
3 stars 20 forks source link

Automatic publication of admins' resource suggestions #11

Open textbook opened 1 year ago

textbook commented 1 year ago

Currently, if an admin user wants to publish a new resource they have to suggest it on the /suggest page and then publish it on the /drafts page. Given that they have sufficient permissions to publish the resource, it would be more efficient if their resource was published as soon as they suggest it.

User story

As an admin user I want my resource suggestions to be automatically published So that I don't have to do two steps to publish a new resource

Acceptance criteria

Admin user

  1. Scenario: accurate information in UI
    • Given that I'm logged in as an admin user
    • When I visit the /suggest page
    • Then it does not tell me "...it will not appear on the home page immediately..."
  2. Scenario: automatic publication
    • Given that I'm logged in as an admin user
    • When I suggest a resource via the /suggest page
    • Then it is immediately shown on the home page
    • And not on the drafts page

Non-admin user

  1. Scenario: accurate information in UI
    • Given that I'm logged in as a non-admin user
    • When I visit the /suggest page
    • Then it still tells me "...it will not appear on the home page immediately..."
  2. Scenario: manual publication
    • Given that I'm logged in as a non-admin user
    • When I suggest a resource via the /suggest page
    • Then it is not immediately shown on the home page
    • And an admin user can see it on the drafts page
DouglasVDM commented 1 year ago

@textbook Can you assign this issue to me please? https://github.com/CodeYourFuture/tech-products-demo/issues/11 Branch name: feature/automatic-publication

textbook commented 1 year ago

@DouglasVDM these are just example stories. If you'd like to try implementing one, you don't need to wait for permission - create a fork and have a go.

Ikamrava commented 4 months ago

@textbook Here is the pull request for this task link

textbook commented 4 months ago

@Ikamrava I'm not sure why you've opened another PR for this in your own repo; it's already being reviewed in this repo as #40. And you seem to have left out most of it.

Ikamrava commented 4 months ago

I am not sure, so which one of the back logs should I do ? How can I check if it is blocked or done or should I do it? the document is not clear: "Look through the backlog and select an un-blocked open feature to complete."

textbook commented 4 months ago

You've already done that. You looked through the backlog, chose this story (which is indeed open and not tagged as blocked), implemented it and opened a PR: #40. That's all fine.

What is confusing to me is that you've now also made a different PR in your own repo, for the same story, but without most of the changes (before and after feedback) you included in the first one. What was your intention with this?

Ikamrava commented 4 months ago

You've already done that. You looked through the backlog, chose this story (which is indeed open and not tagged as blocked), implemented it and opened a PR: #40. That's all fine.

What is confusing to me is that you've now also made a different PR in your own repo, for the same story, but without most of the changes (before and after feedback) you included in the first one. What was your intention with this?

PR 40 is not mine

textbook commented 4 months ago

Ah 🙈 thank you for clarifying - that's why I'm confused! Could you please open the PR from your branch to this repo, rather than internal to your repo?