Opened 6 years ago

Closed 6 years ago

# Allow the name of the custom due date field to be specified

Reported by: Owned by: rjollos hasienda normal WikiTicketCalendarMacro normal configurable ticket_custom field name 0.11

### Description

On the 0.11 branch, it appears that a custom field named due_close is required for ticket due on a certain day to be displayed on the calendar. On my Trac system, I've named my custom due-date field due_date. I could just change this in the WikiTicketCalendarMacro code, but it seems like this is a parameter that should be specified in trac.ini. To do so I believe would require creating a setup script, as has already been done for the version on the 0.12 branch.

Posting here to get feedback from hasienda.

### comment:1 in reply to: ↑ description Changed 6 years ago by hasienda

• Keywords configurable ticket_custom field name added
• Status changed from new to assigned

On the 0.11 branch, it appears that a custom field named due_close is required for ticket due on a certain day to be displayed on the calendar. On my Trac system, I've named my custom due-date field due_date. I could just change this in the WikiTicketCalendarMacro code, but it seems like this is a parameter that should be specified in trac.ini. To do so I believe would require creating a setup script, as has already been done for the version on the 0.12 branch.

Same situation here.

I happen to just do a major remake of the arguments parsing part, i.e. introducing keyword arguments. Making the hardcoded due date custom field name just another option was already on my list, but I didn't think about putting this into trac.ini before. However this seems like a better place than having to put it into each marco invocation, so thanks for the hint.

I feel much more encouraged now to do this, since I know this is a real issue not only to me. A setup script is definitely not required for reading from the to-be-introduced [wikiticketcalender] section, so I'm 100 % positive about doing a back-port from trunk to 0.11 branch as soon as I have code for a working solution.

### comment:2 Changed 6 years ago by hasienda

An implementation is introduced with changesets [8270:8272].

Once I'm reasonable confident that this does not break the plugin, I'll provide you a ported test version for 0.11 branch for review as done before.

Meanwhile I'll have to improve documentation explaining new features and keyword argument syntax for using old options as well as the new TracQuery support. This should certainly be possible without need to study the code.

### comment:3 Changed 6 years ago by hasienda

• Resolution set to fixed
• Status changed from assigned to closed

(In [8315]) WikiTicketCalendarMacro: Finish release of trunk features to maintained branches, closes #7172 #7390 #7410.

Release new ticket 'list_condense' function to 0.12 branch and backport it to 0.11 branch as well. Fix unreported bad inline CSS creation introduced with changeset [8263] for version 0.8.4 of 0.11 branch (0.8.5 was affected as well).

### comment:4 Changed 6 years ago by rjollos

I'm still not seeing ticket due dates displayed on the WikiTicketCalendar. Perhaps I am making an obvious error.

I have a custom field named duedate, with the following trac.ini configuration:

[ticket-custom]
duedate = text
duedate.date = true
duedate.date_empty = true
duedate.label = Due Date
duedate.order = 3


I have the following configuration for the wikiticketcalendar section:

[wikiticketcalendar]
ticket.due_field.format = %d/%m/%y
ticket.due_field.name = duedate


### comment:5 Changed 6 years ago by rjollos

It looks like my date field is stored internally as a timestamp using the DateFieldPlugin, so I might need: ticket.due_field.format = ts I will give that a try.

### comment:6 follow-up: ↓ 7 Changed 6 years ago by rjollos

Still doesn't seem to be working for me with:

[wikiticketcalendar]
ticket.due_field.format = ts
ticket.due_field.name = duedate


### comment:6 follow-up: ↓ 7 Changed 6 years ago by rjollos

Still doesn't seem to be working for me with:

[wikiticketcalendar]
ticket.due_field.format = ts
ticket.due_field.name = duedate


### comment:7 in reply to: ↑ 6 Changed 6 years ago by hasienda

Still doesn't seem to be working for me with:

[wikiticketcalendar]
ticket.due_field.format = ts
ticket.due_field.name = duedate


Never use ts format value, at least until you really use my patches for custom time field support (currently for Trac 0.12 only) as well.

Most probably you'll need a strftime style string like %m/%d/%Y.