In Trac, is there a way to globally reassign all of a given user's tickets to another user? - trac

The title pretty much sums up the question. One of our developers is leaving, and we would like to reassign all of his tickets. Is there a way to do it in the proverbial "one swell foop"? Or failing that, what would be the quickest, easiest way?
And if it's a matter of RTFM, please point me in the right direction.

Trac has a Batch modify feature for the query module. It was added in Trac 1.0. If you have an earlier version, there is batch modify plugin.
The standard workflow only allows open tickets to be reassigned:
reassign = new,accepted,assigned,reopened -> assigned
reassign.operations = set_owner
reassign.permissions = TICKET_MODIFY
To change the owner of closed tickets you may need another action:
set_owner = closed -> closed
set_owner.name = set owner
set_owner.operations = set_owner
set_owner.permissions = TICKET_MODIFY

Related

Optaplanner:Add Dynamic visits without changing the already created visits

I am saving the best solution into the DB, and we display that on the web page. I am looking for some solution where a user can add more visits, but that should not change already published trips.
I have checked the documentation and found ProblemFactChange can be used, but only when the solver is already running.
In my case solver is already terminated and the solution is also published. Now I want to add more visits to the vehicle without modifying the existing visits of the Vehicle. Is this possible with Optaplanner? if yes any example of documentation would be very helpful.
You can use PlanningPin annotation for avoiding unwanted changes.
Optaplanner - Pinned planning entities
If you're not looking for pinning (see Ismail's excellent answer), take a look at the OptaPlanner School Timetabling example, which allows adding lessons between solver runs. The lessons simply get stored in the database and then get loaded when the solver starts.
The difficulty with VRP is the chained model complexity (we're working on an alternative): If you add a visit X between A and B, then make sure that afterwards A.next = X, B.previous = X, X.previous = A, X.next = B and X.vehicle = A.vehicle. Not the mention the arrival times etc.
My suggestion would be to resolve what is left after the changes have been introduced. Let's say you are you visited half of your destinations (A -> B -> C) but not yet (C - > D -> E) when two new possible destinations (D' and E') are introduced. Would not this be the same thing as you are starting in C and trying plan for D, D', E and E'? The solution needs to be updated on the progress though so the remainder + changes can be input to the next solution.
Just my two cent.

How to find all enhancements in SAP system?

I need to prepare a document which includes all enhancements implemented in the SAP system of the company, what are all steps that I have to go through?
Another more comprehensive way to find all the enhancements is to (re)use the best practices.
A wonderful tool called ABAP Exit Ray Eye was developed yet in 2009 and though it is a bit forgotten now, it is still does the job.
Having different criteria
it can show you currently implemented enhancements in a very nifty and user-friendly way:
The source code of this tool can be grabbed in archive from Github repo and is installable by SAPLink.
Try running SAP Standard program SNIF in se38. It might help. For more information refer to this blog post. https://blogs.sap.com/2012/04/16/lets-find-enhancements/
All the enhancements reside in ENHINCINX table and can be searched by package like this:
PARAMETERS p_pack TYPE devclass.
"Accept wildcards for package
p_pack = COND #( WHEN p_pack IS INITIAL THEN '%' ELSE replace( val = p_pack sub = `*` with = `%` occ = 0 ) ).
SELECT e~*
FROM enhincinx AS e
INNER JOIN tadir AS t
ON 'R3TR' = t~pgmid
AND 'ENHO' = t~object
AND e~enhname = t~obj_name
WHERE t~devclass LIKE #p_pack
INTO TABLE #DATA(lt_enhincinx).
LOOP AT lt_enhincinx ASSIGNING FIELD-SYMBOL(<ls_enhincinx>).
WRITE: / |{ <ls_enhincinx>-programname } / { <ls_enhincinx>-enhname }:|.
ENDLOOP.

How to list all topics created by me

How can I get a list of all topics that I created?
I think it should be something like
%SEARCH{ "versions[-1].info.author = '%USERNAME%" type="query" web="Sandbox" }%
but that returns 0 results.
With "versions[-1]" I get all topics, and with "info.author = '%USERNAME%'" a list of the topics where the last edit was made by me. Having a list of all topics where any edit was made by me would be fine, too, but "versions.info.author = '%USERNAME%'" again gives 0 results.
I’m using Foswiki-1.0.9. (I know that’s quite old.)
The right syntax would be
%SEARCH{ "versions[-1,info.author='%USERNAME%']" type="query" web="Sandbox"}%
But that's not performing well, i.e. on your old Foswiki install.
Better is to install DBCacheContrib and DBCachePlugin and use
%DBQUERY{"createauthor='%WIKINAME%'"}%
This plugin caches the initial author in a way it does not have to retrieve the information from the revision system for every topic under consideration during query time.

Need to get issuelinks types with Jira python

I am writing a script with Jira python and I have encountered a big obstacle here.
I need to access to one of the issuelinks under "is duplicated by" but I don't have any idea about the attributes I can use.
I can get to the issuelinks field but I can't go further from here.
This is I've got so far:
issue = jira.issue(ISSUE_NUM) #this is the issue I am handling
link = issue.fields.issuelinks # I 've accessed to the issuelinks field
if hasattr(link, "inwardIssue"):
inwardIssue = link.inwardIssue
and I want to do this from here :
if(str(inwardIssue.type(?)) == "is duplicated by"):
inward Issues can be
is cloned by
is duplicated by
and so on.
how can I get the type of inward Issues??
There seem to be a few types of issue links. So far I've seen: Blocker, Cause, Duplicate and Reference.
In order to identify the type that the IssueLink is you can do the following:
issue = jira.issue(ISSUE_NUM)
all_issue_links = issue.fields.issuelinks
for link in all_issue_links:
if link.type.name == 'Duplicate':
inward_issue = link.inwardIssue
# Do something with link

UniFile ReadNamedFields

I'm currently using IBM's UniObjects and I trying to retrieve multiple fields from a UniFile at once to increase efficiency.
UniFile uFile = uSession.CreateUniFile("fileName");
uFile.RecordID = inputID;
string[] fieldNames = {"I_Field_1", "D_Field_1", "I_Field_2", "D_Field_2"};
UniDynArray uFields = uFile.ReadNamedFields(fieldNames);
uFields value:
þvalue1þþvalue2
þ = delimiter for the UniDynArray
The problem is that half of these fields are I-descriptors and half are D-descriptors. The I-descriptors will not output unless only a single one of them is in the array fieldNames like so:
string[] fieldNames = {"I_Field_1"};
UniDynArray uFields = uFile.ReadNamedFields(fieldNames);
So I guess my question is why are the I-descriptor fields not being displayed and if there is a way they can be using this or a similar method.
I'm new to stackoverflow as well as an entry-level developer so thank you for any help you can provide.
It sounds like an defect with UniObject's. Since you say it is IBM's UniObject's, you most likely have an old version (UniData/UniVerse is owned by Rocket Software now).
Assuming you are on an old version, it is possible this works in a newer version. You should look into scheduling an update of your UniData server and hence client software such as UniObjects.
Outside of this, you can probably raise a bug with your VAR/Support Provider or Rocket Software directly.