[Trac] Re: Can Trac ticket be closed by reporter only?

2018-01-24 Thread mamamia888
Yup, the new code works ... thanks!

RjOllos於 2018年1月23日星期二 UTC-8下午8時33分20秒寫道:
>
>
>
> On Tuesday, January 23, 2018 at 2:05:01 PM UTC-8, RjOllos wrote:
>>
>>
>>
>> On Tuesday, January 23, 2018 at 1:58:36 PM UTC-8, mamamia888 wrote:
>>>
>>>  Can Trac ticket be closed by "reporter" only? Based on what I checked,
>>>  it's only allowed to use the permissions(TICKET_MODIFY, etc.) to 
>>> control.
>>>  If it's possible, could you share the information to modify the ticket
>>>  work flow in order to enforce it?
>>>
>>
>> Similar requests arise fairly often so we've added a CookBook entry:
>>
>> https://trac.edgewall.org/wiki/CookBook/PermissionPolicies#RestrictaWorkflowActiontotheTicketOwner
>>
>> In the python code provided on that page, you just need to replace:
>> ticket['owner'] -> ticket['reporter']
>>
>> Let me know if anything is unclear. I will modify the page later today to 
>> describe how to enforce the permission policy for reporter rather than 
>> owner.
>>
>> - Ryan
>>
>
> Page updated:
>
> https://trac.edgewall.org/wiki/CookBook/PermissionPolicies?action=diff=16
>
> - Ryan 
>

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Re: Merging two Trac instances?

2018-01-24 Thread W. Martin Borgert

Hi,

reminder for myself and everybody else:
It is not very difficult to merge two Trac instances, but the
specific steps depend on your usage.
Thanks to Ryan for very useful hints!

Of course, the merge is not "perfect", because intertrac links
between the instances are not changed automatically, nor ticket
references in the wiki etc.

In my case I could leave out some things:

 - users were mostly identical (same team)
 - ticket custom fields, priorities, resolutions, severities, and
   ticket types, versions were default
 - no plugins, that are using the database

This leaves:
 - ticket components
 - ticket milestones
 - repositories
 - wiki

What I did:

 1. *Backup* everything, i.e. both instances

 2. Add useful prefixes to all ticket components in both instances
to avoid collision

 3. Add useful prefixes to all ticket milestones in both instances
to avoid collision

 4. In one of the two instances add an offset to all ticket numbers
to avoid collision (id in table "ticket", "ticket" in tables
"ticket_change" and "attachment")

UPDATE ticket SET id = id + 1;
UPDATE ticket_change SET ticket = ticket + 1;
UPDATE ticket_custom SET ticket = ticket + 1;
UPDATE attachment SET id = id + 1 WHERE type = 'ticket';

 5. Dump the relevant tables. To dump a single table:

pg_dump  --format plain --verbose --file ticket.sql \
--table ticket dbname1

And copy it to the merged database:

psql dbname2 < ticket.sql

I removed everything from those files, but the actual COPY
command. Not sure, whether this was needed.

Same process for all six or seven tables.

 6. Add the git repositories in the merged instance.

 7. Copy all attachments from one instance to the other, more or
less it is:

cd instance1/files/attachments;
tar cf - * | ( cd ../../../instance2/files/attachments;
   tar xf - )

I had to adjust minor things like git post-receive hooks, nginx
paths etc., but that's more or less it.

Many thanks again to Ryan!

Cheers

--
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Image with wiki hyperlinks

2018-01-24 Thread Joerg Pleumann
Hi,

sorry is this has been discussed before, but we cannot seem to make it 
work: We are using Trac 1.2.2 and want to display an image with clickable 
hyperlink regions that point to other Trac wiki pages. SVG is preferred 
because of scalability, but unfortunately the links got lost when rendering 
the SVG. We can choose between a link to the graphic itself (default 
behavior) or one that is not clickable at all (map/usemap, from here 
). A bitmap with HTML clickable 
regions would also be ok. I guess we could always try to express the whole 
thing as inline HTML code and use static resources from "somewhere", but 
that does not seem so maintainable/elegant.

Any hints are appreciated.

Cheers
Joerg

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.