#1395 Allow custom fields for issues
Merged by pingou. Opened by pingou.
custom_fields  into  master

Download 1395.patch
  • Define the fields in the settings of the project
  • Set their values in the issue page as for other metadata (but in another field)
  • Filter the issues using them via the arguments: ckeys=bugzilla&cvalue=*/12345

Fixes https://pagure.io/pagure/issue/1308

So it's possible to have an IssueKey not attached to a project? That doesn't sound like something we'd want.

Maybe name this key_type?

Why do you have a primary key? The (key_id, issue_uid) combination should be unique and can be used as primary key.

I'm missing any kind of uniqueness constraint on (project_id, name)

+1 and I also need to implement this in the UI

1 new commit added

  • Adjust the database model with the feedback from @puiterwijk

You know this doesn't have ondelete='CASCADE'?

3 new commits added

  • Make the UI reflects the key_type (text/boolean)
  • Ensure when the project is deleted, its custom fields are as well
  • Fix setting custom fields for the adjusted DB model

We might want to add some test cases, but the code looks good to me.

:thumbsup:

Thanks :)

rebased

Pull-Request has been merged by pingou

Metadata