To configure time sharing for a set of jobs, we add the types :
timesharing=user,name or timesharing=user,* or timesharing=*,name or timesharing=*,*.
This is extracted and saved as job.ts_user and job.ts_name here using:
job.ts_user, job.ts_name = j_type.type.split("=")[1].split(",")
To track timesharing, slots contain an attribute ts_itvs which is a mapping: (user_name or *) -> (job_name or *) -> ProcSet with ProcSet being the resources claimed by a job that is time-shareable with the job name job_name or any if * of the user job_user or any if *.
The bug is that job.ts_user and job.ts_name contains the keyword user or name (or *) instead of the actual job user and job name.
Then, when a job is scheduled and sub_slot_during_job is called, we use
slot.ts_itvs[job.ts_user][job.ts_name] = copy.copy(job.res_set) without replacing name and user by the actual job name and user name.
Then, unless the replacement is already done by oarsub, which seems not to be the case (see the tests here), the time_shared intervals will be common to all jobs.
To fix this, either job.ts_user should store the actual user name, or ts_user should be replaced by the job user name in sub_slot_during_job. Same for job.ts_name.