Edgewall Software
Modify

Opened 11 years ago

Last modified 3 years ago

#10948 new enhancement

[PATCH] Clone functionality should also be available for users with TICKET_CREATE permission

Reported by: franz.mayer@… Owned by:
Priority: normal Milestone: next-dev-1.7.x
Component: ticket system Version: 1.0
Severity: normal Keywords: patch ticketclone
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

As described in ticket 4686#comment:14, it would be nice to enable clone functionality also for "normal" users, which have TICKET_CREATE permission. As you could copy / clone a ticket manually with TICKET_CREATE permission (by copy-paste) it should be sufficient to check TICKET_CREATE permission in clone.py.

As described in 10856#comment:6 it would also make more sense to put the clone-button on top of the properties table, since when you clone a ticket you clone all properties and not only the description.

Attachments (5)

t10948-clone-permission.patch (716 bytes ) - added by franz.mayer@… 11 years ago.
Possible patch for checking TICKET_CREATE permission and adjusting position of clone button
t10948-klonen.patch (406 bytes ) - added by franz.mayer@… 11 years ago.
Renaming German wording from noun "Klon" to verb "Klonen", which is more consistent (and looks better)
t10948-clone-permission_v1_1_1.diff (1.8 KB ) - added by franz.mayer@… 11 years ago.
patch adjusted to new position of edit links (see also #10856)
ticket-topactions-captioned.png (12.6 KB ) - added by Christian Boos 11 years ago.
ticket actions in the upper right corner of the yellow box (captioned buttons)
ticket-topactions-uisymbols.png (12.7 KB ) - added by Christian Boos 11 years ago.
ticket actions in the upper right corner of the yellow box (symbols only)

Download all attachments as: .zip

Change History (37)

by franz.mayer@…, 11 years ago

Possible patch for checking TICKET_CREATE permission and adjusting position of clone button

by franz.mayer@…, 11 years ago

Attachment: t10948-klonen.patch added

Renaming German wording from noun "Klon" to verb "Klonen", which is more consistent (and looks better)

comment:1 by franz.mayer@…, 11 years ago

Summary: Make Clone functionality also available for users with `TICKET_CREATE` permission[PATCH] Clone functionality should also be available for users with TICKET_CREATE permission

See 5475#comment:119 for German translation improvement.

comment:2 by Christian Boos, 11 years ago

Milestone: 1.0.2
Owner: set to Christian Boos
Status: newassigned

Will check.

by franz.mayer@…, 11 years ago

patch adjusted to new position of edit links (see also #10856)

comment:3 by franz.mayer@…, 11 years ago

I adjusted the patch, so it fits to new position of modify link (see also #10856). Works well with Trac 1.1.1.

comment:4 by Christian Boos, 11 years ago

By the way, what's your take on ticket:4686#comment:22?

comment:5 by franz.mayer@…, 11 years ago

Well, cloning is in 98% of all cases just an organizatorial thing: As we have the same bug / topic in two milestones / versions we need a clone (this would be obsolete when #4298 has been realized). In the rest of the 2% there is a bug, which was fixed, but occurs again slightly different. Say, most of the cloning it's just a developer and manager thing.

For our (closed) invironment it's no problem permitting clone-functionality with TICKET_CREATE. But I understand ecarter's point. Is it a big deal having a new permission TICKET_CLONE?

Otherwise you could permit cloning only if a user has TICKET_CREATE and TICKET_MODIFY (as you would modify an existing ticket). But it surely is not as clean as a separate TICKET_CLONE.

in reply to:  5 ; comment:6 by Christian Boos, 11 years ago

Replying to franz.mayer@…:

But I understand ecarter's point. Is it a big deal having a new permission TICKET_CLONE?

No probably not, it seems like the best compromise.

But I tried the patch and I'm definitely against the new proposed placement.

The "Modify ↓" link is only there lacking a better visual alternative for jumping directly to the edit form, I'm not that happy with it either so I won't start to expand upon that, rather find a way to "fix" it.

So I went ahead an pushed an alternative (repos:cboos.git:t10948-rework-clone):

So we have something which looks like this:

ticket actions in the upper right corner of the yellow box (captioned buttons)

Or this (if only icons are shown):

ticket actions in the upper right corner of the yellow box (symbols only)

by Christian Boos, 11 years ago

ticket actions in the upper right corner of the yellow box (captioned buttons)

by Christian Boos, 11 years ago

ticket actions in the upper right corner of the yellow box (symbols only)

in reply to:  6 comment:7 by franz.mayer@…, 11 years ago

Replying to cboos:

Replying to franz.mayer@…:

But I understand ecarter's point. Is it a big deal having a new permission TICKET_CLONE?

No probably not, it seems like the best compromise.

Agree. It's the most flexible way of permitting clone functionality.

So we have something which looks like this:

ticket actions in the upper right corner of the yellow box (captioned buttons)

I like that, looks good and saves space!

in reply to:  4 ; comment:8 by Ryan J Ollos, 11 years ago

Replying to cboos:

By the way, what's your take on ticket:4686#comment:22?

I tend to think the additional complexity of TICKET_CLONE outweighs the other arguments. For the case of public facing sites, we could require authenticated users + TICKET_CREATE, but requiring authentication might be unexpected for administrator. A trac.ini option such as require authentication for ticket clone also gets around this, but also increases the complexity of the system. I think that what I ultimately favor is pushing the changes to milestone:1.1.2 without the addition of TICKET_CLONE, and let user feedback determine whether additional restrictions are needed for allowing users to clone tickets. As hinted at in comment:23:ticket:4686, I also think that issues such as this can eventually be dealt with by some sort of fine-grained permissions that don't pollute the existing permissions system, but expose the fine-grained control to users that prefer to go that route. So far, from reading #4686, the majority seems to be against adding the TICKET_CLONE action.

Regarding attachment:t10948-klonen.patch​, I suspect it would be easier to create a new ticket for the German translation change, that way the ticket can be routed to the German translation team. IIRC, Steffen is doing the German translation these days.

Christian, I'd be willing to test and then push the changes if no issues are found, provided you don't have time to complete the ticket in the near future. Since it involves a change to the user interface and potentially the addition of a permission, would it make sense to move this to milestone:1.1.2? This would give us time to get feedback on the repositioning of the buttons before the release of 1.2.

Last edited 11 years ago by Ryan J Ollos (previous) (diff)

in reply to:  8 ; comment:9 by Christian Boos, 11 years ago

Milestone: 1.0.21.1.2

Replying to rjollos:

Replying to cboos:

By the way, what's your take on ticket:4686#comment:22?

[…] I think that what I ultimately favor is pushing the changes to milestone:1.1.2 without the addition of TICKET_CLONE, and let user feedback determine whether additional restrictions are needed for allowing users to clone tickets.

Together with removing the need for TICKET_ADMIN and only requiring TICKET_CREATE? Yes, we could try that.

Christian, I'd be willing to test and then push the changes if no issues are found, provided you don't have time to complete the ticket in the near future.

I'll try to find it somewhere ;-)

in reply to:  9 comment:10 by Ryan J Ollos, 11 years ago

Replying to cboos:

Together with removing the need for TICKET_ADMIN and only requiring TICKET_CREATE? Yes, we could try that.

Right, that's what I had in mind.

comment:11 by Ryan J Ollos, 10 years ago

Milestone: 1.1.21.1.3

comment:12 by Christian Boos, 9 years ago

Rebased the branch on trunk… more precisely on the branch for #11835. The changes happen to be independent so they're easy to rebase on trunk if needed, but I thought it would be nicer to look at them with newer ticket style.

Changes on cboos.git@t10948-rework-clone-1.1dev, in chronological order:

comment:13 by Ryan J Ollos, 9 years ago

Milestone: 1.1.31.1.4

comment:14 by Ryan J Ollos, 9 years ago

Milestone: 1.1.41.1.5

comment:15 by Ryan J Ollos, 9 years ago

Milestone: 1.1.51.1.6

Retargeting tickets that I think won't be completed for 1.1.5, but please move back if I'm incorrect.

comment:16 by Ryan J Ollos, 9 years ago

Milestone: 1.1.6next-dev-1.1.x
Owner: Christian Boos removed
Status: assignednew

comment:17 by Ryan J Ollos, 9 years ago

Milestone: next-dev-1.1.xnext-dev-1.3.x

Narrowing focus for milestone:1.2. Please move ticket to milestone:1.2 if you intend to fix it.

comment:18 by figaro, 8 years ago

Keywords: patch added

comment:19 by Christian Boos, 7 years ago

Owner: set to Christian Boos
Status: newassigned

Related to #12685.

comment:20 by Ryan J Ollos, 6 years ago

Milestone: next-dev-1.3.x1.3.4

comment:21 by Ryan J Ollos, 6 years ago

TICKET_CLONE permission is needed to resolve spam issue described in #13076.

comment:22 by Ryan J Ollos, 6 years ago

Milestone: 1.3.41.3.5

comment:23 by Ryan J Ollos, 5 years ago

Milestone: 1.3.51.3.6

in reply to:  12 ; comment:24 by Ryan J Ollos, 5 years ago

Replying to Christian Boos:

Rebased the branch on trunk… more precisely on the branch for #11835. The changes happen to be independent so they're easy to rebase on trunk if needed, but I thought it would be nicer to look at them with newer ticket style.

The changes need a lot of work to rebase on trunk. Would you have time to rebase them?

in reply to:  24 comment:25 by Christian Boos, 5 years ago

Replying to Ryan J Ollos:

Replying to Christian Boos:

Rebased the branch on trunk… more precisely on the branch for #11835. The changes happen to be independent so they're easy to rebase on trunk if needed, but I thought it would be nicer to look at them with newer ticket style.

The changes need a lot of work to rebase on trunk. Would you have time to rebase them?

Yes, I'll look into it.

comment:26 by Ryan J Ollos, 5 years ago

Milestone: 1.3.61.4

Thanks. I'm planning to release 1.3.6 soon, and we can move the ticket back if the changes are ready.

comment:27 by Ryan J Ollos, 5 years ago

Milestone: 1.41.5.1

comment:28 by Ryan J Ollos, 5 years ago

Milestone: 1.5.1next-dev-1.5.x

comment:29 by Ryan J Ollos, 5 years ago

Owner: Christian Boos removed
Status: assignednew

comment:30 by fschricker@…, 4 years ago

tbh I do not understand the current situation wrt this patch here. What patch can I apply to an existing 1.0 trac? And is it compatible with 1.4 (we're moving soon)?

in reply to:  30 comment:31 by Jun Omae, 4 years ago

Replying to fschricker@…:

tbh I do not understand the current situation wrt this patch here. What patch can I apply to an existing 1.0 trac? And is it compatible with 1.4 (we're moving soon)?

The patch is not compatible with Trac 1.4+.

Clone button is always shown since Trac 1.4 if the TicketCloneButton component is enabled. As the result, TICKET_CREATE is required to create new ticket by /newticket page.

comment:32 by Ryan J Ollos, 3 years ago

Milestone: next-dev-1.5.xnext-dev-1.7.x

Milestone renamed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.