Skip to content

In Development

M. Drew LaMar edited this page May 11, 2022 · 2 revisions

Project membership refactoring

Main issue thread

GitHub Project

Main issues

Project membership is a bit of a confusing mess. The following is a list of current idiosyncracies with the system:

  1. All authors of a project publication, if not currently members of the project, will be automatically invited to be a project member (even if no email is supplied)
  2. If no email was provided:
    1. the author is still listed as invited in the team member list view (even though they clearly haven't been invited!)
    2. there is no way to add an email later and re-invite them
    3. come to think of it, there is no way to re-invite (or un-invite) any project invitee
  3. If an author is later deleted from a publication, they are kept in the jos_publication_authors database with a status of 0 (and remain a member or invitee of the project)
  4. There is no way to un-invite a previously invited project member (or as mentioned in 2.3, re-invite)
  5. If you select a member from QUBES when choosing publication authors and then make a change to their name or organization, it disconnects the reference to the QUBES id
    1. This happens a lot since the current code does not pull from jos_user_profiles with updated profile information (pulls from depricated jos_xprofiles instead), forcing users to input their organization, thereby unlinking them from their profile
    2. This leads to confusion, such as if a user updates their organization in their profile and then expects the change to take effect in their publications
  6. There is no way to assign a non-ID publication author (id=0 in jos_publication_authors database) to an existing QUBES member
  7. Project membership view is very different from Group membership view
  8. You can only change role of project member in the Edit Project Team view
  9. CourseSource has A LOT of authors with no QUBES id (or email) and thus overwhelm the project member view

Main extensions affected

  • Component: com_projects
  • Plugin: projects/team

Main tables used

  • jos_project_owners
  • jos_publication_authors
  • jos_user_profiles

Suggestions

  1. Hide authors-only with no email in project member/owner view
  2. If user is chosen from list of QUBES members, never unlink it!
    1. Show "Pull from profile" if name or organization different from profile (id not zero)
    2. Allow submitter ability to associate authors to existing users (if unassociated)
    3. Show "Update profile" if logged in user matches profile (i.e. can update within authors list)
    4. Note: Profile has first, middle and last names, but publication author only has first and last names. Code combines first and middle into first.
  3. Have project member view match group member view as much as possible (e.g. tabs to show members vs. invited vs. not invited)
  4. Include ability to add email to non-invited members (authors-only)
  5. Include ability to resend invitation to project

To-Dos

  • Override core/components/com_projects
  • Make sure possible publication author list is pulling from jos_user_profiles
    • Change query in getOwners function, which gets called here. The following two additions should work:
      SELECT ...,
      IF (up.organization IS NOT NULL, up.organization, x.organization) AS organization,
      ...
      left join (SELECT user_id,
                       profile_value AS organization
                FROM   jos_user_profiles
                WHERE  profile_key = 'organization') AS up
            ON o.userid = up.user_id

Clone this wiki locally