ErwinKomen / RU-passim

0 stars 0 forks source link

Authority File: approval bug #736

Closed ErwinKomen closed 7 months ago

ErwinKomen commented 7 months ago

Ik kwam een bug tegen in de research tool: het is niet mogelijk om de status van AF’s op ‘approved’ te zetten (ongeacht project label, zo lijkt het).

ErwinKomen commented 7 months ago

Investigation

  1. The traffic light is determined by EqualGold method get_stype_light()
  2. What it shows is the value of field stype. For 'approved', that should be app
  3. Seemingly the job is done, because the select box can be put to 'approved'
  4. The form SuperSermonGoldForm is a model form and it simply uses field stype in a select box
  5. Okay, I found where it happens: while going through passim_action_add()
    1. Apparently the projlist is marked as adapted, changed, while that should not be the case
    2. Since the projlist is one of stype_edi_fields, the stype can not be put to approved
    3. So: how come that the projlist is not really altered, but does get on the changed section of the SuperSermonGoldForm?
      1. Well, to start with, the projlist contains two elements (Passim and HUWA), and it ends up somewhere with just one (only Passim). So that's the problem...
      2. The problem is that in SuperSermonGoldForm the queryset for field projlist does not necessarily include all the projects it is part of, because some of those projects may be excluded from the user's rights. Reference is made to issue #576 for that. Well, I suppose that all 'currently attached' projects should be included there...

The changes: image

The stype_edi_fields image