griffithlab / civic-client

Web client for CIViC: Clinical Interpretations of Variants in Cancer
MIT License
50 stars 28 forks source link

Variant groups not linked to anything plus no edit button? #1463

Closed jsaliba10 closed 4 years ago

jsaliba10 commented 4 years ago

When clicking on a Variant group name, an error pops up and you get redirected to the homepage. Also, I do not see a button to edit variant groups. I checked out both of these on NRG1 and [NTRK1](https://civicdb.org/events/genes/3983/summary/variants/1278/summary

Screen Shot 2020-08-12 at 7 57 54 PM Screen Shot 2020-08-12 at 8 43 36 PM

).

jsaliba10 commented 4 years ago

The same error pops on Staging.

jmcmichael commented 4 years ago

Looks like the server is throwing a 500 Error. From my dev install:

NoMethodError at /api/variant_groups/12
=======================================

> undefined method `organization' for #<Audited::Audit:0x00007ff3b2663a70>

app/presenters/lifecycle_presenter.rb, line 16
----------------------------------------------
   11           user = if event.respond_to?(:originating_user)
   12                    event.originating_user
   13                  else
   14                    event.user
   15                  end
>  16           organization = if event.organization.nil?
   17                            {}
   18                          else
   19                            OrganizationIndexPresenter.new(event.organization)
   20                          end
   21           h[event_name] = {

App backtrace

kkrysiak commented 4 years ago

Not sure it is helpful at this point but same for "Imatinib Resistance" under BCR. I first tried NRG1 then BCR.

Screen Shot 2020-08-12 at 9 15 32 PM Screen Shot 2020-08-12 at 9 17 36 PM
acoffman commented 4 years ago

This is related to the multiple organization support addition. In summary:

Variant groups don't don't have the normal lifecycle that say an evidence item or suggested change do, it was never made into a first class entity in CIViC. Its much more like a disease or a drug or source. No one proposes one and then has an editor approve it. For display purposes we show a "creation event" so its clear who made the group, but it doesn't actually have real events like evidence, assertions, etc.

The creation information is pulled from the audit log, which is the lower level history of what's happened than the event log which is what powers the various feeds on the website. This audit log is unaware of the idea of what org a user was acting on behalf of when they made the change. Now, when we try to display that history, the JSON presenter attempts to get the organization and include it, but it doesn't exist. That's what's causing the underlying error.