#1308 Arbitrary ticket metadata
Closed: Fixed 7 years ago Opened 7 years ago by tibbs.

I was looking at a ticket in the sssd trac instance: https://fedorahosted.org/sssd/ticket/3080

Note how they have a large amount of project specific metadata: Coverity Bug:, Red Hat Bugzilla:, Design review:, Texts Updated:, Patch Submitted:, Candidate to push out:.

I don't see any reasonable way to support that kind of thing besides allowing a project to add arbitrary ticket metadata. Even just allowing the addition of named plain text fields would help, though trac allows at least checkboxes as well.


Good timing, we are evaluating now if migrating to pagure would be a possibility for the sssd trac instance.

And the metadata is somethig we really use all the time and absolutely need. Especially a link to RHBZ is critical for us.

FreeIPA team is in the same situation - we use a lot of Trac custom fields . Basically we have very similar process as SSSD. Therefore this issue looks as a blocker for us to migrate to Pugure issues.

This is an issue that I have on my roadmap and hoping to get done. The main issue I have with it is: How to allow filtering/querying using these keywords.

At first I was thinking to use a similar approach as the one used in milestones or priority (store the info in a JSON blob in the db), but it will not allow to easily filter the tickets using these fields.

So if filtering using these custom fields is important, then we'll need to consider how to do this properly.

I would say it would be nice to add two types of custom fields at least a "tick" (with boolean set/unset value) and a free-form field.

The filtering on the boolean fields would be just set/unset. Currently we use that for a 'patch submitted' field and I think IPA also has "design approved".

The free-form fields could just be matched for exact or substring matches and for being empty or non-empty. We use free-form fields for storing URLs to downstream bugzillas and to store keywords (that's where the non-empty and substring matches would come handy).

By the way, do you have some estimate when this work might be included?

Just curious, what difference do you make between keywords and tags? (since we already have tags)

do you have some estimate when this work might be included?

Nothing concrete, hopefully by the end of October we should have something.

Thank you very much for implementing this. How can we test this new feature?

ah, looks like it's not merged yet..

@jhrozek - It's currently in 2.7 that's deployed to stg.pagure.io,

Just tried this out in staging and it does found a couple of issues. If you'd prefer separate tickets for these, let me know.

  • There's no way to delete custom fields (though you can rename them).
  • If you make the description of a custom field empty (or click the "add new custom field" button when you really meant to click the Update button, then you get a 500 error with the text "Not all the custom fields have a type specified ". Which is mildly confusing, I guess.
  • I can't figure out how to actually edit the fields I've created when looking at a ticket. There's an edit button, but clicking it doesn't give me any fields I can change.

Edit: I found that I can change boolean fields, just not text fields.

Edit2: But it appears that once I toggle a boolean field on, it will always show as being "on" even after I later turn it off.

There's no way to delete custom fields (though you can rename them).

Ok, that's bug, got a fix.

Basically to remove a field, you should just make it empty but then you were running into the bug below.

If you make the description of a custom field empty (or click the "add new custom field" button when you really meant to click the Update button, then you get a 500 error with the text "Not all the custom fields have a type specified ". Which is mildly confusing, I guess.

Same as above, got a fix for it :)

I can't figure out how to actually edit the fields I've created when looking at a ticket. There's an edit button, but clicking it doesn't give me any fields I can change.

Ok, bug in the html.

Thanks for the report!

2.7.1 in stg should improve the situation and I'm considering doing a 2.7.2 once #1402 is merged

2.7.2 has been released and now deployed, so let's close this ticket and make new ones if needed.

@pingou changed the status to Closed

7 years ago

I tried the metadata fields when trying to see if it could work for the FreeIPA/SSSD/... Ticket Tool for synchronizing upstream tickets and Bugzilla (we are very interested in this RFE), but I found 2 issues with it. One blocking and one UX:

1) BLOCKER: I can create the issue and fill the metadata: https://pagure.io/ipatool-test/issue/1. However, I could not retrieve the value neither via libpagure, nor via API directly:

s = requests.Session()
...
r = s.get('https://pagure.io/api/0/ipatool-test/issue/1')
print r.text
{
"assignee": null,
"blocks": [],
"close_status": null,
"closed_at": null,
"comments": [
{
"comment": "test comment",
"date_created": "1478178733",
"edited_on": null,
"editor": null,
"id": 39391,
"notification": false,
"parent": null,
"user": {
"fullname": "Martin Kosek",
"name": "mkosek"
}
}
],
"content": "First Pagure issue",
"date_created": "1478177960",
"depends": [],
"id": 1,
"milestone": "Backlog",
"priority": null,
"private": false,
"status": "Open",
"tags": [],
"title": "First issue",
"user": {
"fullname": "Martin Kosek",
"name": "mkosek"
}
}
My "rhbz" field is not there. Did I do something wrong or is this really a bug? If the field is not exposed via API for retrieval and also for update, it is a showstopper.

  1. UX bug:
    When I edit the metadata in the browser and click Update, I keep seeing the old value. I have to refresh the whole screen to get the new value.

Next blocker: I cannot update metadata for a ticket that is blocking other ticket (which is strange). When I added a value to rhbz metadata of
https://pagure.io/ipatool-test/issue/2
I get error "You cannot close a ticket that has ticket depending that are still open.". Also, I think the logic is reversed anyway, 1 depends on 2 and thus I should be able to close 2 to unblock 1.

1) BLOCKER: I can create the issue and fill the metadata: https://pagure.io/ipatool-test/issue/1. However, I could not retrieve the value neither via libpagure, nor via API directly:

This is indeed something that is currently lacking but the work to fix this has
started in https://pagure.io/pagure/pull-request/1474

So hopefully it will be in the next release.

  1. UX bug:
    When I edit the metadata in the browser and click Update, I keep seeing the old value. I have to refresh the whole screen to get the new value.

The server-sent-event likely needs to be adjusted for this, would you mind
opening a ticket for this?

I cannot update metadata for a ticket that is blocking other ticket (which is
strange). When I added a value to rhbz metadata of
https://pagure.io/ipatool-test/issue/2
I get error "You cannot close a ticket that has ticket depending that are
still open."

Seems like a bug as well, could you open a ticket for this one as well?

Thanks for all these :)

As you wish! I filed #1506, #1507, #1508, #1509.

#1506 is a real blocker for our potential migration, others can be worked around for a while.

Thanks for help!

For the record, I did not meant to "yell" in the above comment, it is just that hash character in the beginning of the line is not a good idea :-)

Login to comment on this ticket.

Metadata