Closed yatishTrootech closed 1 year ago
Hey @suryaiiit At the time of the creation of the Feedback we create a post in the backend Here
By default, it is taking shared_with=self_department
and we are setting only ORGS(of creator) in the post model here departments are blank for post
But if we create a regular/normal from post/polls section and post that is shared with = self department
then we are setting departments in the post here ORGS are null Here
if we go according to the normal post logic feedback is following the opposite logic for it, Should set departments instead of ORGS
Should we make this change here for feedback post?
Hey @suryaiiit We Have a Custom option while creating post/polls
Custom (shared_with=ORGANIZATION_DEPARTMENTS
40)
Front end will pass organizations if all departments are selected otherwise I will get only departments
EG: ORGA: DeptA1, DeptA2 ORGB: DeptB1, DepatB2
for posts/polls custom selection
Case 1: if selected DeptA1, DeptB1, DepatB2 and create then front end will send me
organizations = [ORGB] departments = [DeptA1, DeptB1, DepatB2]
Case 2: If selected DeptA1, DeptA2, DeptB1, DepatB2 and create then front end will send me
organizations = [ORGA, ORGB] departments = [DeptA1, DeptB1, DepatB2]
Case 3: If selected DeptA1, DeptB1 and create then front end will send me organizations = [] departments = [DeptA1, DeptB1,]
is this correct @suyeshkandpal28 ?
Hey @suryaiiit We Have a Custom option while creating post/polls
Custom (
shared_with=ORGANIZATION_DEPARTMENTS
40) Front end will pass organizations if all departments are selected otherwise I will get only departmentsEG: ORGA: DeptA1, DeptA2 ORGB: DeptB1, DepatB2
for posts/polls custom selection
Case 1: if selected DeptA1, DeptB1, DepatB2 and create then front end will send me
organizations = [ORGB] departments = [DeptA1, DeptB1, DepatB2]
Case 2: If selected DeptA1, DeptA2, DeptB1, DepatB2 and create then front end will send me
organizations = [ORGA, ORGB] departments = [DeptA1, DeptB1, DepatB2]
Case 3: If selected DeptA1, DeptB1 and create then front end will send me organizations = [] departments = [DeptA1, DeptB1,]
Is this correct @suyeshkandpal28 ?
If yes then for case 3 post is working fine because at the time of creation, we are updating the initial data from this function Here and it updates the ORG if multi org is not enabled but while creating polls we are setting ORG in initial data Here Which looks wrong to me Should I do the same for updating ORG here in the initial data?
@suryaiiit
Hey @suryaiiit We Have a Custom option while creating post/polls
Custom (
shared_with=ORGANIZATION_DEPARTMENTS
40) Front end will pass organizations if all departments are selected otherwise I will get only departmentsEG: ORGA: DeptA1, DeptA2 ORGB: DeptB1, DepatB2
for posts/polls custom selection
Case 1: if selected DeptA1, DeptB1, DepatB2 and create then front end will send me
organizations = [ORGB] departments = [DeptA1, DeptB1, DepatB2]
Case 2: If selected DeptA1, DeptA2, DeptB1, DepatB2 and create then front end will send me
organizations = [ORGA, ORGB] departments = [DeptA1, DeptB1, DepatB2]
Case 3: If selected DeptA1, DeptB1 and create then front end will send me organizations = [] departments = [DeptA1, DeptB1,]
is this correct @suyeshkandpal28 ?
Yes its correct @yatishTrootech
if we create a custom post through postman without setting Enable Multi Organization Post & Poll it should throw
Hey @suryaiiit At the time of the creation of the Feedback we create a post in the backend Here By default, it is taking
shared_with=self_department
and we are setting only ORGS(of creator) in the post model here departments are blank for postBut if we create a regular/normal from post/polls section and post that is
shared with = self department
then we are setting departments in the post here ORGS are null Hereif we go according to the normal post logic feedback is following the opposite logic for it, Should set departments instead of ORGS
Should we make this change here for feedback post?
Dont consider shared_witjh for feedback posts
Date-27-4-23 Server-Jack.skordev.com
For post/polls (post_type=USER_CREATED_POST or USER_CREATED_POLL):
Case-1: if post is shared_with = self_department (departments only)
a) If the user is an admin they can see all the posts which are not belongs to them of
Their ORG/DEPT/post created by Themselves
b) Normal user must belongs to creator's Department or receiver of that post then only
he can access that post
[x] ( Parent Org ) Created post to (My dept only ) from hod1@mcd.com user is from hod dept and verified with hod dept user hod2@mcd.com post is showing and verified with another dept user steffi@mcd.com post Is not showing
[x] (Parent Org) verified with same Org user but admin user admin@mcd.com from Corporate Mcd dept post is showing and verified with same Org but different department admin user naveen123@mcd.com post is showing ( so irrespective of the dept who are admins in same Org can see the post )
[x] (Child Org) verified the post of parent Org with normal user emp@demo.com and admin user admin@mcddemo.com with same dept and another dept user demouser@mcd.com post is not displaying for affiliated child Orgs
[x] (Parent Org ) admin user created post from naveen123@mcd.com (below manager dept) and verified with yustar@mcd.com user is from below manger dept post is showing and login from Steffi@mcd.com another dept user post is not showing
[x] (Parent Org) admin user created post from admin@mcd.com (corporate Mcd) and verified with steffi@mcd.com corporate mcd dept post is showing and with hod1@mcd.com different dept post is not displaying.( if admin created post to logged user dept then that dept only can see the post and admins can see the post )
[x] (child Org) Login with admin user and verified for post of parent Org admin created with admin@mcd.com admin user and login with emp@demo.com normal or admin user post is not displaying ( affiliated Orgs will not see the admin created post or normal users post )
[x] Admin can delete, edit ,pin the post ,and report abuse for any post
Case-2: if post is shared_with = ALL_DEPARTMENTS (public)
a) If the user is an admin they can see all the posts which are not belongs to them of
their ORG/DEPT/post created by Themselves
b) Normal user must be creator’s ORG is same can access
[x] (Parent Org) Created post as public with steffi@mcd.com (Corporate mcd dept) and verified with test1@mcd.com is from same dept post is showing and verified with hod1@mcd.com different dept post is showing ( all the users in the Org can see the post )
[x] (Child Org ) verified the public post in child org with admin@mcddemo.com admin user and emp@demo.com normal user post is not showing ( public post created by parent org only will display to same Org not to affiliated Orgs)
[x] (Parent Org) Created poll from admin@mcd.com (Corporate mcd) and verified with steffi@mcd.com with same dept poll is showing and with hod1@mcd.com poll is not showing
[x] (child Org) verified with poll of parent Org login with admin@mcddemo.com admin user and emp@demo.com normal user poll is not displaying
[x] Admin can only pin the poll or delete the poll can't edit the poll
[x] (Parent Org ) Created public poll from admin@mcd.com(Corporate mcd)verified with steffi@mcd.com with same dept poll is showing and verify with hod1@mcd.com different dept poll is showing
[x] (Parent)OrgCreated poll from dept (below manager ) naveen123@mcd.com admin user and login with yustar@mcd.com with same dept poll is showing and login with steffi@mcd.com poll is displaying
[x] (Child Org) verified the 2 polls created in parent Org with admin@mcddemo.com and emp@demo.com poll is not disaplying in affiliated Orgs ( poll if public it will display to only the orgs which created poll)
[x] Post -->Only admin/creator can update/delete - > admin user can delete ,edit, pin the post and report abuse
[x] Poll--> Only admin can pin the poll or delete the poll
[x] normal users can only report abuse he can only edit or delete his own post
[x] Verified like/unlike/comment/report/pin/comment like/edit comment/delete comment/filter/ search working fine
For RICO (post_type=USER_CREATED_APPRECIATION or nomination_status=Approved):
Case-1: if appreciation is shared_with = self_department (departments only Or Teams)
a) If the user is an admin they can see all the posts which are not belongs to them of
Their ORG/DEPT/post created by Themselve
`b) Normal user must belongs to creator's Department or receiver of that post or creator or cc_user then only he can access that post
Case-2: if post is shared_with = ADMIN_ONLY (private) (N/A)
a) If the user is an admin they can see all the posts which are not belongs to them of
Their ORG/DEPT/post created by Themselves
b) Normal user must be creator or admin can see the post
Case-3: if post is shared_with = ALL_DEPARTMENTS (public)
a) If the user is an admin they can see all the posts which are not belongs to them of
their ORG/DEPT/post created by Themselves
b) Normal user must be creator’s ORG is same can access
Server-jack.skordev Device-iOS
Case-1: if post is shared_with = self_department (my departments only)
a) Admin from creator's ORG can access this post
b) Normal user must belongs to creator/ creator's department can access the post.
[x] ORG-Parent (Post type -My department) -Created post from parent Org [user1@nuhs.edu.sg] (pharmacy dept)and login with same Org but different dept user [user4@nuhs.org] ( Dept Diagnostics) post is not displaying and with other dept
[x] ORG- Parent (Admin post) Created post from [user3@nuhs.edu.sg](Diagonist dept) login with different dept user [user2@nuhs.edu.sg] (Pharmancy)post is not showing and login with same dept user (Diagonist) user[user4@nuhs.org] post is showing ( when admin post to there own dept that dept users only can see the post and another dept admins also can see the post in same Org)
[x] ORG-Child (Post type -My department) -Created post from child Org (naveen@child.org) (clinical dept)and login with same Org but different dept user [ naveen@dept2.org] ( Dept Cardiac ) post is not displaying and with same dept user [clinic@nuhs.org] post is showing pass
[x] ORG- child (Admin post) Created post from [admin2@nuhs.org](clinical dept) login with [naveen@dept2.org] post is not showing and login with admin user with another dept (cardiac) user[admin@nuhs.org] post is showing ( when admin post to there own dept that dept users only can see the post and another dept admins also can see the post in same Org)
Case-2: if post is shared_with = ALL_DEPT (My ORG)
a) Admin from creator's ORG can access this post
b) Normal user can access the post if he belongs to same ORG of the post/creator
[x] ORG-Parent (Post type-My ORG) -Created post from parent Org [user1@nuhs.edu.sg](pharmacy dept)and login with same Org but different dept user [user4@nuhs.org] ( Dept Diagnostics) post is displaying to all users in ORG
[x] ORG-Child (Post type-My ORG) -Created post from parent Org [naveen@child.org](clinical dept)and login with same Org but different dept user [naveen@dept2.org] ( Dept cardic) post is displaying to all users in ORG
Case-3: if post is shared_with = ORGANIZATION_DEPARTMENTS (custom) a) Admin from creator's ORG can access this post b) Normal user can access the post if his dept belongs to post's shared Department or he is a creator
[x] ORG-Parent (Post type-Custom) -Created post from parent Org [user1@nuhs.edu.sg](pharmacy dept) to Child Org Cardiac dept ,login with child Org cardiac normal user and admin user post Is showing and admin user with different dept post is not showing and from user created post from another dept user, [user4@nuhs.org] post is not showing ( with same Org different dept user post is not showing )
[x] ORG-child (Post type-Custom) -Created post from child Org naveen@child.org to parent Org [user1@nuhs.edu.sg] (Pharmacy) login with [user4@nuhs.org] (diagonist dept )post is not displaying to pharmacy users and only displaying and child Org also not displaying to another dept , admin users in both Org can see the post
[x] ORG-Parent(Post type-custom )-Created multiple dept post from Parent Org[user1@nush.edu.sg] to child Org depts Cardiac and Clinic and verify the post with child Org users post is displaying for all the uses with this depts and admins in both child and parent can see the post
I have tried to create feedback from NUHS App both in Android and IOS and it is working Fine
Users: NUHS Parent Org:user3@nuhs.edu.sg/pass NUHS Child Org: testnuhs103@nuhs.edu.sg/pass
I have verified login into the Microsite with admin user [user2@nuhs.edu.sg/testnuhs101@nuhs.edu.sg] and able to see the feedback posts created by the NUHS Parent Org users and as well as NUHS Child Org Users.
Closed
.Date-28-4-23 Server-Skordev.com
@yatishTrootech @suryaiiit @SteffiVinod5
For the feeds repo Post/polls, Appreciations, Rico, and Feedback posts sometimes fail and have issues with visibility according to shared with the flag of that post So prepare a document covering all the scenarios and test cases which is helpful for QA team to complete test covering all the scenarios for that
DOC: https://docs.google.com/document/d/1Lja7CVrivNseWvfdVszlvgEAMTNXA1BVu2rquKI-uBo/edit?usp=sharing
Linked Issues: [Feedback] Closed feedbacks are throwing errors #4832
Top Hero Api Changes #4777
[McD] In Profile Appreciation for Receive , Given ,post &poll count is displaying wrong #4763
[IFZA]User tag in comment notification is getting as feed not found #4750
organization recognition search only searches the start of name #127
[Feedback] User Unable to access comments and post detail #129
Issue With shared with "ORGANIZATION_DEPARTMENTS" posts/polls #122
NUHS app post/polls List issue with self department and ORGANIZATION_DEPARTMENT Post #125
Don't use affiliated Orgs to get posts everywhere #4569
[BOUS- M2]- Send Greetings with attachments #4026
[MCD]Backend issues #4377
Feedback List API - Affiliated Orgs #4224
[McD] Client feedback shared by Sudhanshu(Backend issues) #4235
[NUHS] Multi-org Post - User who created the post should be able to view #3855