Manage Group has no section for FILE instruments, so they cannot be enabled or disabled for a group
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 85/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- react, typescript
- Ambito
- frontend
Direzione di ricerca
Inizia in apps/web/src/routes/_app/group/manage.tsx, soprattutto dal tipo CategorizedInstruments e dal ciclo di categorizzazione intorno alle righe 885–917; poi confronta la gestione di FILE in admin/instruments.tsx:169. Esegui quindi i casi indicati di manage.test.tsx e la specifica group-manage. Il lavoro è completato quando gli strumenti FILE vengono visualizzati con controlli di selezione funzionanti e il salvataggio di uno strumento non selezionato lo rimuove da Administer Instrument.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The Manage Group page lists a group's instruments in three sections: Forms, Interactive and Series. It has no section for FILE instruments. The page builds those sections from GET /v1/instruments/info, which does return FILE instruments, but the categorising loop only has branches for FORM, INTERACTIVE and SERIES, so a FILE instrument is counted as visible and then pushed nowhere. A group manager can therefore neither see nor change whether a FILE instrument is available to their group. FILE instruments that exist when a group is created are connected to it automatically (GroupsService.create connects every non-repo instrument), and stay switched on with no way to turn them off. A FILE instrument imported from a repository, or uploaded after the group was created, can never be switched on, so it never appears in Administer Instrument for that group. The admin Instruments page (admin/instruments.tsx:169) already handles FILE, so this page is the odd one out.
Where
apps/web/src/routes/_app/group/manage.tsx:58-62:
type CategorizedInstruments = {
form: InstrumentItem[];
interactive: InstrumentItem[];
series: SeriesInstrumentItem[];
};
and manage.tsx:885-917, where visibleIds.add(instrument.id) runs for every kind but the item is pushed only for three of them:
visibleIds.add(instrument.id);
// ...
if (instrument.kind === 'FORM') {
instruments.form.push(item);
} else if (instrument.kind === 'INTERACTIVE') {
instruments.interactive.push(item);
} else if (instrument.kind === 'SERIES') {
instruments.series.push({ ...item, seriesItems: instrument.seriesItems });
}
Reproduce
- Run a development instance with demo data (it seeds the built-in MRI Scan Session and Arbitrary File Upload FILE instruments before creating the demo groups).
- As a group manager, start a session and open Administer Instrument: MRI Scan Session is offered.
- Open Manage Group.
Actual: MRI Scan Session and Arbitrary File Upload appear in none of the sections, so they cannot be unticked. Likewise, a FILE instrument from a repository assigned to the group is never listed and cannot be ticked.
Expected: a "File" section (or FILE instruments within an existing section) lists them with the same checkbox, repository badge and preview as the other kinds, and saving honours the selection.
Tests
apps/web/src/routes/_app/group/__tests__/manage.test.tsx:it('should list FILE instruments so a group manager can enable or disable them')andit('should remove a FILE instrument from the group when it is unticked and saved').testing/src/specs/group-manage.spec.ts: untick MRI Scan Session, save, and assert it no longer appears in Administer Instrument.
Suggested fix
Add a file bucket to CategorizedInstruments, push kind === 'FILE' items into it, and render it with InstrumentSection under a translated "File" heading. Ending the chain with an exhaustive match / satisfies never would make the next new kind fail to compile instead of disappearing silently.
- Lingua principale
- TypeScript
- Stelle
- 119
- Fork
- 19
- Merge medio
- 4g 11h
- PR unite (30g)
- 35
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di DouglasNeuroInformatics/OpenDataCapture
-
Area: Infrastructure Chore Difficulty: Low Good First Issue Priority: Low
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
DouglasNeuroInformatics/OpenDataCapture#1836 ·
I maintainer di solito rispondono entro 1 giorno
-
Area: Infrastructure Chore Difficulty: Low Priority: Medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
DouglasNeuroInformatics/OpenDataCapture#1835 ·
I maintainer di solito rispondono entro 1 giorno
-
Area: Playground Bug Difficulty: Low Good First Issue Priority: Medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
DouglasNeuroInformatics/OpenDataCapture#1833 ·
I maintainer di solito rispondono entro 1 giorno
-
Area: Instruments Bug Difficulty: Low Priority: Low
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
DouglasNeuroInformatics/OpenDataCapture#1824 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Area: Shared Bug Difficulty: Low Priority: Low
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
DouglasNeuroInformatics/OpenDataCapture#1813 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di DouglasNeuroInformatics/OpenDataCapture
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
marmelab/react-admin#11431 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
db-ux-design-system/core-web#8655 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
stripe/react-stripe-js#728 ·
-
[Upload Grade C dataset] the pop-up changes it's size while uploading the document => Jumping effectApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
epam/statgpt-admin-frontend#305 ·
I maintainer di solito rispondono entro 1 giorno