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

Add <createdBy> and <assignedTo> fields in the task creation form #18

Closed
swarajpure opened this issue Apr 7, 2021 · 5 comments · Fixed by #22
Closed

Add <createdBy> and <assignedTo> fields in the task creation form #18

swarajpure opened this issue Apr 7, 2021 · 5 comments · Fixed by #22
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@swarajpure
Copy link
Contributor

swarajpure commented Apr 7, 2021

While creating a task, we should be sending participants array which contains the users to which the task is to be assigned.
As of now, the array will contain only one user, which needs to be read from an input box.

Currently we have an "ownerId" field in the response, we want to remove that and instead be sending:

  • createdBy
  • assignedTo

These will contain the respective userIds of the user who has created the task and the user who the task has been assigned to
You can refer this contract https://github.com/Real-Dev-Squad/website-api-contracts/blob/main/tasks/README.md

@swarajpure swarajpure added the good first issue Good for newcomers label Apr 7, 2021
@dimky01
Copy link

dimky01 commented Apr 7, 2021

Hi, I will like to work on this issue but I need more clarification.
Do you mean that the dataToBeSent should have an array of "ownerId"?

@akankshadharkar
Copy link
Contributor

akankshadharkar commented Apr 7, 2021

Hey @dimky01, glad to have you here 😄
I've updated the description, please feel free to reach out if you have any queries
I'll also assign the issue to you
You can also join our discord channel if you'd like to be a part of our community - https://discord.gg/mppVvGhc

@akankshadharkar akankshadharkar changed the title Add participants field in the task creation form Add <createdBy> and <assignedTo> fields in the task creation form Apr 7, 2021
@ankushdharkar ankushdharkar added enhancement New feature or request help wanted Extra attention is needed labels Apr 7, 2021
@dimky01
Copy link

dimky01 commented Apr 8, 2021

Hi @akankshadharkar. I tried to make the changes and the run locally but I couldn't submit the form because I guess the POST Api handling the form submission needs to be updated as well. Is there any information on that or can I get access to make the required modification at the backend

@swarajpure
Copy link
Contributor Author

Hi @akankshadharkar. I tried to make the changes and the run locally but I couldn't submit the form because I guess the POST Api handling the form submission needs to be updated as well. Is there any information on that or can I get access to make the required modification at the backend

Yes, the API won't work. It'll give you CORS error as you're trying to access api.realdevsquad.com from localhost
Also, even if that was working, the API give error as we don't (yet) allow assignedTo field to be passed in req.body. We are validating the data coming through req.body here.

Also, we had a discussion later on this issue and we had finalized that we won't be sending createdBy field from the frontend. Instead backend will pick that up from the cookie which is being sent. Why? The reason is stated here

So can you please make a PR with the changes you've done? We could review and suggest changes -- if any 🙂

dimky01 pushed a commit to dimky01/website-dashboard that referenced this issue Apr 10, 2021
@dimky01
Copy link

dimky01 commented Apr 10, 2021

Hi @swarajpure I have created a PR

dimky01 pushed a commit to dimky01/website-dashboard that referenced this issue Apr 10, 2021
swarajpure added a commit that referenced this issue Apr 11, 2021
Added <assignedTo> field in the task creation form for Issue #18
ankushdharkar added a commit that referenced this issue Apr 11, 2021
* Revert "Merge pull request #11 from kamara-moses/main"

* Merge pull request #15 from kamara-moses/develop

added styling to the taskform and maintaining the same asthetic as th…

* Updated script.js

* Removed .idea files

* Added <assignedTo> field in the task creation form #18

* Added <assignedTo> field in the task creation form for Issue #18

Co-authored-by: Swaraj <swarajrajpure@gmail.com>
Co-authored-by: Nikhil Bhandarkar <nikhilbhandarkar1998@gmail.com>
Co-authored-by: Nilisha Jaiswal <73216246+nilisha-jais@users.noreply.github.com>
Co-authored-by: Akanksha Dharkar <akankshadharkar@gmail.com>
Co-authored-by: Damilola Aiyetigbo <damilolaaiyetigbo@Damilolas-MBP.lan>
Co-authored-by: Swaraj Rajpure <56217868+swarajpure@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants