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

Allow everyone to view all evaluations #592

Merged
merged 1 commit into from
Sep 8, 2021

Conversation

maiaht
Copy link
Contributor

@maiaht maiaht commented Sep 3, 2021

Changes in this PR:

  • A participant who is not a part of an evaluation is now undefined. This means that useParticipant() now returns either a Participant or an undefined.
  • Some of the functions that have had azureUniqueId as an argument now has a participant as an argument. This makes it possible to check if a participant is undefined before the id of the participant is being used.
  • There has been created functions that deal with access to various components and operations. Some of these functions replace boolean expressions that were difficult to read, and some of them present new functionality that ensure that an undefined participant cannot do any operations in an evaluation. For instance, an undefined participant cannot delete, add or edit actions.
  • Everyone, including the undefined participants, can view the content of the workshop summary tab on the workshop stage, but only facilitators can edit the summary.

Potential test cases

  • A user that is not a member of an evaluation, aka an undefined participant, should be able to view the content of the evaluation which means that the user can:

    • click on the evaluation and not get an error
    • display the content of all of the tabs on all stages of the evaluation
    • click on an action, and display the content
  • The undefined user should not be able to:

    • answer any questions
    • add, edit or delete actions
    • add notes to actions
    • view the answers in the AnswerSummarySidebar
    • edit the workshop summary on the workshop stage
    • progress the evaluation to the next stage
    • check the complete switch on different stages of the evaluation
  • The workshop summary tab on the workshop stage

    • a facilitator is the only one who can edit the workshop summary on the workshop stage
    • all other roles can only view the summary.
  • Facilitators, OrgLeads and Participants can create, edit and delete actions

  • Only Facilitators can click "Finish stage" and progress the evaluation. This only applies if the progress of the evaluation is the same as the stage in the current view

  • If the progression of the evaluation and the user is on the Individual stage, then on the Individual stage Facilitators, OrgLeads and Participants can write answers. Facilitators can also write answers on the Workshop stage even if the progression of the evaluation and the user is not on the Individual stage.

  • If the progression of the evaluation and the user is on the Preparation stage, then on the Preparation stage Facilitators and OrgLeads can write answers.

  • Facilitators are the only ones who can write answers on the Workshop stage. Facilitators can also write answers on the Workshop stage even if the progression of the evaluation and the user is not on the Workshop stage.

  • If the progression of the evaluation and the user is on the Follow up stage, then on the Follow up stage only Facilitators can write answers.

  • If the progression of the evaluation and the user is on the Individual stage, then on the Individual stage Facilitators, OrgLeads and Participants can click the complete switch.

  • If the progression of the evaluation and the user is on the Preparation stage, then on the Preparation stage Facilitators and OrgLeads can click the complete switch.

  • If the progression of the evaluation and the user is on the Workshop stage, then on the Workshop stage Facilitators can click the complete switch.

@maiaht maiaht self-assigned this Sep 3, 2021
@maiaht maiaht linked an issue Sep 3, 2021 that may be closed by this pull request
@maiaht maiaht force-pushed the view-evaluations branch 3 times, most recently from 8b13389 to 3c8b523 Compare September 3, 2021 11:57
@maiaht maiaht marked this pull request as ready for review September 3, 2021 13:03
@maiaht maiaht marked this pull request as draft September 6, 2021 05:54
@maiaht maiaht marked this pull request as ready for review September 6, 2021 05:59
@maiaht maiaht force-pushed the view-evaluations branch 2 times, most recently from 4834ecb to 46e3acc Compare September 6, 2021 11:09
Copy link
Contributor

@petterwildhagen petterwildhagen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cypress test 'Action can be completed without writing a reason' is now failing when I run it locally. It is easier to fix this if this PR is merged in #586.
I created tasks for the behaviour listed in the description of this PR

@maiaht maiaht merged commit 5c137bc into equinor:master Sep 8, 2021
@maiaht maiaht deleted the view-evaluations branch September 8, 2021 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Everyone should be able to display all evaluations
3 participants