#3406 Cannot set tags such as `isa::bug` from UI
Closed: Fixed 2 years ago Opened 2 years ago by netvor.

I'm trying to set debtags-like tags (Faceted Classification) for my project; the tags have form like

isa::bug
isa::rfe
severity::high
severity::low

Project settings allowed me to define them, they appear in Issues UI, but when I select rhem from Edit Metadata form and Update, the tags are not saved.

I suspect it's because of the double colon.

Pagure should allow tags like that (or at least it should not allow defining them).


Turns out that if I go back to settings and try to edit tag (which is done via other form than adding new tags), a tag with double-colon is already refused as "Invalid input." (I've made mistake when defining them so I wanted to go back and change isa:bug to isa::bug but now the WUI won't let me).

IOW, the tag validation is already a bit inconsistent. (Although I'd still expect Pagure to allow colons.)

To me the bug is that it let you set these tags in the first place, thanks for the report

Metadata Update from @pingou:
- Issue tagged with: bug

2 years ago

Metadata Update from @pingou:
- Issue assigned to pingou

2 years ago

Is it, though? I mean, is it possible for Pagure to just allow tags with colon(s)? And what are other disallowed characters?

I'm OK with "no"--I can do away withisa--bug, I'm just curious. Also I think it would be nice to inform about the limitations right away in the form (or by making the validation error message more helpful).

We are basically validating which tags we support via this regex: https://pagure.io/pagure/blob/master/f/pagure/forms.py#_36

The PR #3427 which addresses this ticket ensure we are consistently using this regex, so while we don't support colons currently, adding support for it should be rather trivial. Would you like to try doing it?

Thanks for explanation. I'll post PR in a minute to allow : in tags.

Commit ad64a1d relates to this ticket

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #3427 Merged 2 years ago