Modify

Opened 13 years ago

Closed 5 years ago

#9977 closed defect (wontfix)

A ticket not created when disabled/hiden field has a default value.

Reported by: skyrat@… Owned by: obs
Priority: normal Component: BlackMagicTicketTweaksPlugin
Severity: normal Keywords:
Cc: redkrieg@…, olstounas@… Trac Release: 0.12

Description

I wanted to make the field "reporter" readonly for all users (a.k.a. disabling it) and it worked well - visually. The field was grayed out and its value was set to my username (not changeable), which I expected and wanted.

The problem appeared when I submitted the ticket. It didn't go well and a warning was shown, saying that reporter field was modified and I don't have permissions to save it.

I hacked the code and removed the check whether the field is modified or not, it works well now, but it is ugly.

Is it an intended behavior that the disabled field cannot have a default or an automatic value?

Thanks. Rene

Attachments (0)

Change History (4)

comment:1 Changed 13 years ago by redkrieg@…

I'm also experiencing this problem. I don't want users to be able to modify a checkbox, but I want the box checked by default for unauthenticated users.

I turned on debug logging and found this:

2012-05-09 20:46:46,506 Trac[blackmagic] DEBUG: {'notice': None, 'hide': False, 'permission': u'TRAC_ADMIN', 'tip': None, 'label': None, 'ondenial': u'hide', 'disable': False}
2012-05-09 20:46:46,507 Trac[blackmagic] DEBUG: {'notice': None, 'hide': False, 'permission': u'TRAC_ADMIN', 'tip': None, 'label': None, 'ondenial': u'hide', 'disable': False}
2012-05-09 20:46:46,507 Trac[blackmagic] DEBUG: Checking permission TRAC_ADMIN
2012-05-09 20:46:46,507 Trac[blackmagic] DEBUG: is_milestone disabled or hidden 
2012-05-09 20:46:46,508 Trac[blackmagic] DEBUG: OT: 1
2012-05-09 20:46:46,509 Trac[blackmagic] DEBUG: NEW: 0
2012-05-09 20:46:46,509 Trac[blackmagic] DEBUG: Denied access to: is_milestone
2012-05-09 20:46:46,509 Trac[blackmagic] DEBUG: {'notice': None, 'hide': False, 'permission': u'TRAC_ADMIN', 'tip': None, 'label': None, 'ondenial': u'hide', 'disable': False}
2012-05-09 20:46:46,509 Trac[blackmagic] DEBUG: {'notice': None, 'hide': False, 'permission': u'TRAC_ADMIN', 'tip': None, 'label': None, 'ondenial': u'hide', 'disable': False}

If I'm not mistaken, this means that my field is being reported as having a 'new' value of 0, though the default is 1 and the field is hidden.

I haven't had a chance to dig through and figure out why this is yet, but I'll be special-casing the code to work around the issue for now.

comment:2 Changed 13 years ago by redkrieg@…

Cc: redkrieg@… added; anonymous removed

Added my address to the CC field here, sorry if that's not appropriate.

comment:3 Changed 12 years ago by anonymous

Cc: olstounas@… added

Well, same problem here. But solving it would require to analyse all the cases, so maybe youre better off with some hacks for the time being.

comment:4 Changed 5 years ago by Ryan J Ollos

Resolution: wontfix
Status: newclosed

This plugin is deprecated in Trac 1.4 and later. See migration tips on BlackMagicTicketTweaksPlugin page.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain obs.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.