openlibhums / openlibhums/janeway

Add a structure system to Repositories

Open
#4,338 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

new feature Priority medium Repositories Size XL
Dominant language
Python
Stars
238
Forks
97
Avg merge
9d 1h
Merged PRs (30d)
8

Description

Is your feature request related to a problem? Please describe.
Users managing repositories would like to replicate real world hierarchies with a Repository for each of their organisational units. This gives each unit freedom to setup their repository differently from others.

Describe the solution you'd like

  • Add a new RepositoryOrganisationalUnit model
  • Add a new view that lets staff manage the structure of their ROUs but moving them between parents
  • Add a new view at the press level that displays the ROU structure for that press
  • Repositories that do not have an ROU should be listed under an "Other" section
class RepositoryOrganisationalUnit(models.Model):
    repository = models.OnetoOneField(
        Repository,
        on_delete=models.CASCADE,
        related_name='organisational_units'
    )
    parent = models.ForeignKey(
        'self',
        on_delete=models.SET_NULL,
        blank=True,
        null=True,
        related_name='sub_units'
    )

Alternative discussed with @mauromsl: Simply at the parent field onto the Repository model itself.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing Repository model and the repository and press views. Define how the proposed RepositoryOrganisationalUnit relationship or the alternative Repository parent field should support staff-managed nesting. Done means staff can move units between parents, the press view displays the structure, and unassigned repositories appear under “Other”.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, database
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.