4680: Repository extra data doesn't save when entered

cyran.norbert

What version are you running?

3.0.4

What's the URL of the page containing the problem?

/admin/db/scmtools/repository/{id}

What steps will reproduce the problem?

  1. enter repository settings page
  2. enter some data in JSON format, i.e. {"test": ["test", "test2"]}
  3. save the form

What is the expected output? What do you see instead?

Repository's extra data should be saved into database, instead it's empty and after refresh extra data field shows empty dict {}.

What operating system are you using? What browser?

Ubuntu 17.10, Mozilla Firefox

Please provide any additional information below.

When entering extra data through rbsite manager, it all works well, the data is saved and shown in the form field, but after saving the form, it resets. Screenshot from terminal shows this behavior, between Repository.objects.first().extra_data calls, form is saved through the website.

theBoss
#1 theBoss

Any chances to have this fixed, or are we doing something wrong?

chipx86
#2 chipx86

This can be fixed, but needs to be thought through. We're clearing out the field on save, so that if you change (for example) the hosting service for a repository, the stale information isn't in there. That means you're losing your content so that we don't end up with stale, incorrect data in there. However, that's not at all ideal and it wasn't really intended in this way. We'll aim to fix this.

I'm curious about what data you're wanting to store in there. Can you go into your use case for this?

  • -New
    +Confirmed
  • +Release-3.0.x
  • +Component:Admin
    +Component:SCMTools
  • -Repository extra data doesn't save when entered
    +Repository extra data doesn't save when entered
cyran.norbert
#3 cyran.norbert

We're working on rbchecklist plugin from your rb-extension-pack repository (https://github.com/reviewboard/rb-extension-pack/tree/master/rbchecklist). Now we want to add a feature that every repository has a list of checklist items stored in settings (that's where extra_data seemed suitable). These checklist items then will appear on every review checklist in this repository.

When plugin is completed, it's planned to contribute to the main repo.