bcgov / bcgov/STRR

CR: Assigning/Unassigning an Examiner in a Registration needs popup when 2 examiners try to assign or unassign the same registration

Open
#1,696 0 comments 0 reactions 0 assignees View on GitHub
STR
Dominant language
Python
Stars
2
Forks
22
Avg merge
2d 35m
Merged PRs (30d)
11

Description

**Description:
From Darius:**
The 'Unassign' button no longer triggers a confirmation pop-up. We need the pop-up back for when we unassign ourselves/other examiners from a file
Verified in new application pages and registration pages
**Additional note from Analyst:**
E.g., 2 examiners click into an unassigned Registration (renewal)
Examiner 1 assigns themselves to the Registration first
Examiner 2's Registration page has not updated with this information yet. Examiner 2 also assigns themselves to the Registration
Examiner 1 being assigned to the Registration is overwritten. Examiner 2 is now assigned to the Registration while Examiner 1 unknowingly continues to review the same Registration.

**What is the expected behaviour?:** 
If an examiner goes into a registration and clicks either 'Assign to Me' or 'Unassign';
If the assignee on that record is now different that what it was when they originally entered the page;
There is a pop-up notification that says 'The assignee on this record has changed. Refresh?' and when they select OK, the page refreshes and shows who is currently assigned to the record.

**Who is affected?:** 
Examiners

**How does the bug/issue affect your work as an
examiner?:**
Can cause overlap in work between Examiners

## Acceptance Criteria
> Generated by [Zenhub AI](https://www.zenhub.com/ai)

### Acceptance Criteria

**Scenario 2: Concurrency conflict when assigning a registration**
- **Given** Examiner A and Examiner B have both opened the same unassigned registration page
- **And** Examiner A clicks "Assign to Me" and successfully becomes the assignee
- **When** Examiner B clicks "Assign to Me" without having refreshed their page
- **Then** the system should detect that the assignee state has changed since the page was loaded
- **And** a pop-up notification must appear with the message: "The assignee on this record has changed. Refresh?"
- **And** no change to the database assignee should occur at this moment

**Scenario 3: Concurrency conflict when unassigning a registration**
- **Given** Examiner A and Examiner B have both opened the same registration page where Examiner A is currently assigned
- **And** Examiner B (or a system process) unassigns Examiner A or changes the assignee
- **When** Examiner A clicks "Unassign" on their stale page
- **Then** the system should detect that the assignee state has changed since the page was loaded
- **And** a pop-up notification must appear with the message: "The assignee on this record has changed. Refresh?"

**Scenario 4: Refreshing the page from the conflict popup**
- **Given** the conflict pop-up "The assignee on this record has changed. Refresh?" is currently displayed
- **When** the user selects "OK"
- **Then** the page should perform a full refresh
- **And** the registration page should now display the most current assignee information

**Scenario 5: Successful assignment when no conflict exists**
- **Given** I am an Examiner on a registration page
- **And** the assignee has not changed since I loaded the page
- **When** I click "Assign to Me"
- **Then** the registration should be successfully assigned to me without the conflict popup appearing

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.