Opened 6 years ago

Closed 4 years ago

# Trac users with permission TICKET_ADD_HOURS can't change his hours

Reported by: Owned by: m.maak@… rjollos normal TracHoursPlugin normal permission problem kai 0.12

### Description

A normal trac user with the right permission (TICKET_ADD_HOURS) can't change his hours. Only a user with the permission "TRAC_ADMIN" can change it.

### comment:1 Changed 6 years ago by anonymous

• Trac Release changed from 0.11 to 0.12

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

• Owner changed from k0s to rjollos

This is working fine for me. In testing it out, I also granted TICKET_MODIFY permission to anonymous, and was able to add hours to a ticket. Can you provide any other details? What other permissions have you granted to the user that isn't able to change their hours?

### comment:4 Changed 6 years ago by m.maak@…

The following permissions i have granted to the user that isn't able to change their hours.

BROWSER_VIEW
CHANGESET_VIEW
FILE_VIEW
LOG_VIEW
MILESTONE_VIEW
REPORT_SQL_VIEW
REPORT_VIEW
SEARCH_VIEW
TICKET_CREATE
TICKET_EDIT_CC
TICKET_EDIT_COMMENT
TICKET_EDIT_DESCRIPTION
TICKET_MODIFY
TICKET_VIEW
TIMELINE_VIEW
WIKI_CREATE
WIKI_MODIFY
WIKI_VIEW


### comment:5 follow-up: ↓ 6 Changed 6 years ago by m.maak@…

User can add hours, but the user can't change or remove it!

### comment:6 in reply to: ↑ 5 Changed 6 years ago by rjollos

• Status changed from new to assigned

User can add hours, but the user can't change or remove it!

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

I can't reproduce with the lastest version of TracHoursPlugin. I fixed up some permission check today, but can't immediately think of how those changes might have resolved this issue.

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

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

I've tested with Trac 0.12.2dev-r10331 and r9606 of branches/0.12 and can't reproduce the issue. I suspect it has been fixed in the time since you reported it. Please reopen if you continue to see the problem after upgrading.

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

• Cc kai added; anonymous removed
• Resolution worksforme deleted
• Status changed from closed to reopened

Posting on behalf of Stefano Cailotto:

Hello, I've more or less the same problem... even as TRAC_ADMIN (TICKET_ADD_HOURS), I can only add hours but I can't remove them. I'm using trac 0.12.4 (tar archive from edgewall site).

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

• Status changed from reopened to new

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

• Status changed from new to assigned

### comment:12 follow-up: ↓ 13 Changed 4 years ago by rjollos

Hi Stefano, I haven't been able to reproduce. What happens when you try to remove hours while on the /hours/id page? Which database are you using?: SQLite, MySQL, or PostgreSQL?

### comment:13 in reply to: ↑ 12 ; follow-up: ↓ 14 Changed 4 years ago by kai

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

Hi Stefano, I haven't been able to reproduce. What happens when you try to remove hours while on the /hours/id page? Which database are you using?: SQLite, MySQL, or PostgreSQL?

Hi Ryan, I updated the plugin to the last revision (I was using 0.6.0dev-r12031) and now I can see the "apply changes" button under hours list for the ticket, so I consider the problem was mine. Thanks for your help!

### comment:14 in reply to: ↑ 13 ; follow-up: ↓ 15 Changed 4 years ago by rjollos

Hi Ryan, I updated the plugin to the last revision (I was using 0.6.0dev-r12031) and now I can see the "apply changes" button under hours list for the ticket, so I consider the problem was mine.

There were some recent changes with the plugin, but I can't say specifically what could have fixed your issue. Please don't hesitate to raise another ticket if you find other problems. I think the code needs a bit of work, but this plugin is a priority for me, and I appreciate the feedback and testing.

### comment:15 in reply to: ↑ 14 ; follow-up: ↓ 16 Changed 4 years ago by anonymous

Hi Ryan, I updated the plugin to the last revision (I was using 0.6.0dev-r12031) and now I can see the "apply changes" button under hours list for the ticket, so I consider the problem was mine.

There were some recent changes with the plugin, but I can't say specifically what could have fixed your issue. Please don't hesitate to raise another ticket if you find other problems. I think the code needs a bit of work, but this plugin is a priority for me, and I appreciate the feedback and testing.

It happened that once the button "disappeared" again, especially with Chrome, but I guess it's due to caching...

One thing that I noticed is that total hours count is not reported as time units, i.e 1:15 hour + 12:30 hours is reported as 13.8 hours, while it should be imho 13:45 h.

This would be very useful to be used as a sort of timesheet. Also the capability to export a report in xls/csv would be very appreciated.

Thank you, S.

### comment:16 in reply to: ↑ 15 Changed 4 years ago by rjollos

One thing that I noticed is that total hours count is not reported as time units, i.e 1:15 hour + 12:30 hours is reported as 13.8 hours, while it should be imho 13:45 h.

=> #10554.

This would be very useful to be used as a sort of timesheet. Also the capability to export a report in xls/csv would be very appreciated.

=> #10553.