anitab-org / bridge-in-tech-backend

BridgeInTech (BIT) is an application that allows organizations, mentors and mentees to actively collaborate through mentoring programs. This is the backend client of BridgeInTech.
https://bridgeintech-bit-heroku-psql.herokuapp.com/
GNU General Public License v3.0
24 stars 80 forks source link

Feat: create POST /organizations /{organization_id} /programs/{program_id} /send_request #161

Open mtreacy002 opened 4 years ago

mtreacy002 commented 4 years ago

Description

As a developer, I need add POST /organizations /{organization_id} /programs/{program_id} /send_request API endpoint, so that a mentor/mentee can apply to a program.

Mocks

NA

Acceptance Criteria

Update [Required]

Enhancement to Update [Optional]

NA

Definition of Done

Estimation

2-3 days

Sanika1999 commented 4 years ago

Can I work on this? (But, I would require some guidance as I am new to this :D)

mtreacy002 commented 4 years ago

Sure, @Sanika1999, I'll assign you to this. But are you able to solve the setting up issue on the backend you mentioned here? Let me know if this is still an issue after pulling the latest code change on upstream develop branch.

Sanika1999 commented 4 years ago

@mtreacy002 Iam still working on this it might take 1-2 days more.

mtreacy002 commented 4 years ago

That's ok, @Sanika1999 . Take your time. It is a pretty big task. Thanks for giving the update.

Sanika1999 commented 4 years ago

Hi @mtreacy002 Iam so sorry but my laptop has crashed so I need to set everything up again. You can unassign me for now.πŸ˜”

vj-codes commented 4 years ago

I would like to work on this @mtreacy002

mtreacy002 commented 4 years ago

That's ok, @Sanika1999 . Thanks for letting me know. Hope you get the laptop fix soon πŸ˜‰. @vj-codes . Yes, suree. I'll assign you to this.

vj-codes commented 4 years ago

Update: working on it , will send a PR by this week

mtreacy002 commented 4 years ago

@vj-codes , can you please give me an update on where you are with this issue? Thanks

vj-codes commented 4 years ago

@mtreacy002 heyy , I am kinda busy with a hackathon project which will get over on 26th , if this is an urgent issue to be fixed , anyone else willing to can work coz I won't be able to until 26th .

mtreacy002 commented 4 years ago

That's ok, @vj-codes. Take your time. You can do it after the 26 if you'd like. BIT backend repo is currently blocked by PR #167 and #129 anyway. Even the other PRs that are currently open cannot be merged until the 2 PRs mentioned get reviewed πŸ™„ . Just let me know when you ready to pick it up again πŸ˜‰

vj-codes commented 4 years ago

@mtreacy002 really sorry for the delay , I would like to work on this again!

mtreacy002 commented 4 years ago

Sure, thanks for the update, @vj-codes. Look forward to the PR... :wink:

vj-codes commented 4 years ago

@mtreacy002 hey I kinda forgot the file in which the changes were needed πŸ‘€ So just to make sure , ms schema and bit schema are the right files or not?

mtreacy002 commented 3 years ago

Sorry for the late reply, @vj-codes . We definitely need a new file (mentorship_relation.py) under api/models and another new file for mentorship_relation_extension.py under api/dao. Under api/resources we also need one file for mentorship_relations.py that will takee care all the routings related to mentorship_relations be it for BIT mentorship_relation_extension table or MS mentorship_relation table.

There is a file called db_add_mock.py under app/database that can help you get an idea of how the mentorship relation is created in the database (lines 339 to 475). The attributes of the mentorship_relation and mentorship_relation_extension on that file might be slightly different since the file was created at the initial stage of GSoC to test the database design. But from there you could see how the two tables related to mentorship relation and tasks are connected. From the file you should be able to construct the needed route flows, api request/response models and the dao logics for creating the mentorship relation.

IMO at this stage the db models under database schemas should be enough to cater for the needed information so you might not need to change anything under ms_schema and bit_schema.

Let me know if you have any doubts.

mtreacy002 commented 3 years ago

@vj-codes , thank you again for coming to the BIT Open Session just now. As you've mentioned that you won't be available for the upcoming weeks, I'll unassign you from this issue and assign this to myself for now. Please let me know if this is as what you'd prefer.

NenadPantelic commented 3 years ago

Hi @mtreacy002, is this still available? :slightly_smiling_face:

mtreacy002 commented 3 years ago

Hi @NenadPantelic , I was thinking on working on this myself. But if you’re interested, you can give it a try. Do you have an idea on how to approach this?

NenadPantelic commented 3 years ago

Hi @mtreacy002, I'm currently working on some other issues. I can ping you after I have them finished, and if the issue is still available, I can take it. What do you think?

mtreacy002 commented 3 years ago

Sure, that’s sounds great πŸ‘ , @NenadPantelic

decon-harsh commented 3 years ago

@mtreacy002 Currently there can be only one mentorship_relation at a time, be it mentor or mentee but this shouldn't be in the case of an organization, right? Or even an organization cannot have many mentor-mentee relations?

And is it both ways? Can the creator of the organization send a mentorship_relation request?

decon-harsh commented 3 years ago

@mtreacy002 I would like to work on this.

mtreacy002 commented 3 years ago

@mtreacy002 Currently there can be only one mentorship_relation at a time, be it mentor or mentee but this shouldn't be in the case of an organization, right?

Or even an organization cannot have many mentor-mentee relations?

And is it both ways? Can the creator of the organization send a mentorship_relation request?

@decon-harsh , since the organisation actually connected to the mentor or mentee through a program, so within that program, the organisation only allowed to have one mentor and one mentee. The organisation itself can have many programs which means indirectly it is allowed to have many mentors and mentors, just not within the same program. Also, if the BIT member already blocked to work in a program (either as mentor or mentee), they are not allowed to apply to another program regardless of the organisation. Does this answer your question?

decon-harsh commented 3 years ago

Can an org send request to a mentee? @mtreacy002

mtreacy002 commented 3 years ago

Can an org send request to a mentee? @mtreacy002

Yes, the organisation through the program can send a request to the mentor or mentee, @decon-harsh

mtreacy002 commented 3 years ago

Would you like me to assign you to this, @decon-harsh ?

decon-harsh commented 3 years ago

Yess i would love to work on this @mtreacy002