bcgov / entity

ServiceBC Registry Team working on Legal Entities
Apache License 2.0
23 stars 57 forks source link

Legal API: filings show as Filed by Registry Staff even after filing/paying using BCSC user #6814

Closed riyazuddinsyed closed 2 years ago

riyazuddinsyed commented 3 years ago

Describe the bug When a user files an Alteration Filing using a BCSC user id then after the successful CC payment the dashboard shows filed by REGISTRY STAFF

To Reproduce Steps to reproduce the behavior:

  1. Go to 'https://dev.bcregistry.ca/business/BC1230109'
  2. File an Alteration Filing
  3. Return to Dashboard
  4. See error

Screenshots/ Visual Reference/ Source Screen Shot 2021-03-16 at 3.47.05 PM.png

severinbeauvais commented 3 years ago

This is because the API is returning "" in header.certifiedBy -- the UI falls back to "Registry Staff" if falsy.

@thorwolpert @lmcclung The Certified By field is blank in these examples because it is not a required field (yet) in the alteration UI. So should we worry about it? Or would you like to see a different fallback string if this field is blank?

severinbeauvais commented 3 years ago

What is the expected behaviour?

lmcclung commented 3 years ago

I thought it's a required field that the user complete the 'certify' section with their name.

Expected behavior: If a BSCS/BCeID user was filing this they'dbe required to enter their name in the certify section and that name would appear on the ledger in the filing history. When staff file it, even though they enter the applicant's name in the certify section, the name on the ledger in the filing history should be Registry Staff.

@severinbeauvais Do we already have a ticket in our epic which would address this, or do I need to make a new one?

severinbeauvais commented 3 years ago

Yes, the Certify section is mandatory... but it wasn't in the early days of Alteration filings (which is the subject of this ticket). So this should not happen for new alterations.

One thing I don't understand is, it looks like the certifiedBy field is always part of the filing, so how can it ever be blank so that the Filing History List displays "Registry Staff" instead? (This is the way we identify staff vs user filings.) Maybe we should come up with a new way to identify filings by registry staff. @thorwolpert Thoughts?

Also, maybe we need another ticket to update the alterations schema and/or the API validations so that a filing without the certifiedBy field is rejected. Thoughts?

As for this ticket, I am confident it is not a bug, but rather simply that those earlier alteration filings did not have a certifiedBy value, which the Filing History List interprets as a "Staff Filing".

severinbeauvais commented 3 years ago

I am not aware of any other ticket related to the Certified By field or the display of "Registry Staff".

severinbeauvais commented 3 years ago

I think we can go one of two ways with this ticket:

  1. Accept the current behaviour. The Certified By field is mandatory so the right value should always display in the ledger. (The filings in this ticket were under development and are missing this required field.)

  2. Decide whether we want a different display if, for any reason, the Certified By field is missing. Currently this displays "Registry Staff". and maybe we could handle this better. This might involve the API sending something different if the subject filing is indeed by Registry Staff, and the UI having a different fallback value.

Thoughts?

severinbeauvais commented 3 years ago

@lmcclung Could you give me your thoughts on the comment above? Thanks!

lmcclung commented 3 years ago

@severinbeauvais I like option 1 - but I have a question. If staff filed the alteration, and in the certify section they entered the name of the person who filled out the form, then what will the ledger say? Registry staff or the certify name? If the certify name, then we need to change this so that the ledger still shows 'Registry staff' which means another ticket. Let me know and I can make one.

severinbeauvais commented 3 years ago

this comment was edited for brevity

The filings history shows whatever was entered in the Certify component:

image

In my test, I was logged in using IDIR and I completed an AR. The filing history list does not show "Registry Staff".

The UI cannot easily tell that staff submitted a filing. There is a "submitter" field but I don't know if we can depend on that value to determine if it's staff, eg

@sumesh-aot ^^ ?

severinbeauvais commented 3 years ago

obsolete comment deleted

severinbeauvais commented 3 years ago

this comment was edited for brevity

Sumesh replied:

when the user is logged in there is a role staff which will be there for our internal staff

we cannot decide staff based on the authentication type, because there will be government accounts which would use IDIR to login

so going with role is the best way

Hence, we will have to capture role when a filing is saved/filed (if we don't already).

severinbeauvais commented 3 years ago

obsolete comment deleted

severinbeauvais commented 3 years ago

obsolete comment deleted

lmcclung commented 3 years ago

@severinbeauvais sounds like a good approach. Can you do that all in this ticket?

severinbeauvais commented 3 years ago

obsolete comment deleted

severinbeauvais commented 3 years ago

obsolete comment deleted

severinbeauvais commented 2 years ago

obsolete comment deleted

severinbeauvais commented 2 years ago

obsolete comment deleted

sienna-oldaccountdontuse commented 2 years ago
severinbeauvais commented 2 years ago

Based on the above, the UI only has to display whatever the API provides in the header.submitter property.

severinbeauvais commented 2 years ago

Display "Filed by ${header.submitter}".

severinbeauvais commented 2 years ago

Blocked - waiting for reponse from Policy group.

severinbeauvais commented 2 years ago

This will be fixed by #7357.

I am moving this to Staging for now and will move then it along with 7357.

lmcclung commented 2 years ago

Changed estimate to fib

severinbeauvais commented 2 years ago

TO DO:

  1. as a regular user, I see "filed by" other regular users
  2. as a regular user, I see "filed by staff" when staff did it
  3. as a staff user, I can see "filed by" any user
severinbeauvais commented 2 years ago

I removed this ticket from epic 6969 since it is now in epic 9625.

severinbeauvais commented 2 years ago

Should the Filed By be the user's name rather than their id?

image.png

severinbeauvais commented 2 years ago

Likewise, I would expect that, as a regular user who filed a couple of changes, they would indicate Filed By <my name> instead of what is now there:

image.png

severinbeauvais commented 2 years ago

I think this ticket should be kept open (or a new, simpler ticket, opened). I think the Filed By should be the user's name (or staff's name when logged in as staff).

severinbeauvais commented 2 years ago

Also, this Director Change Correction shows the staff's IDIR (even though I am logged in as BCSC). (I am not sure if this a data issue; if it is, please fix the metadata in the db.)

image.png

sienna-oldaccountdontuse commented 2 years ago

Moving to ready for QA for Linda and Riyaz to test

lmcclung commented 2 years ago

@severinbeauvais you asked: as a regular user who filed a couple of changes, the ledger would indicate Filed By - yes, not their long ID.

TO DO:

  1. as a regular user, I see "filed by" other regular users
  2. as a regular user, I see "filed by staff" when staff did it - this works right - tested in test with bcreg2029 and looked at director change.
  3. as a staff user, I can see "filed by" any user - this isn't working. See two examples below...

This IA was filed using bcsc, but when I search as staff it shows Registry Staff image.png

This was filed using staff IDIR, but staff just see "Registry Staff" in the ledger when I am logged in as staff with my idir. It should show my idir. image.png