View Issue Details

IDProjectCategoryView StatusLast Update
0012521mantisbtfeaturepublic2024-01-27 11:18
Reportercas Assigned To 
PrioritynormalSeverityfeatureReproducibilityN/A
Status newResolutionopen 
Summary0012521: Script to automatically change status
Description

When an issue is fixed, we give the issue status Resolved.
We then allow the "customer" one week to provide us from any comment.
No comments after one week, this script changes the status to Closed.

Additional Information

This script updates issues with a new status if a certain status is there for more than a number of days

parameters

  • days => number of days to take into account to raise warning
  • fromstat => Status that needs to be checked
  • tostat => Status to be set
  • muser => Userid from mantis (Integer)

if not passed as parameter, default values 7,80,90,1 are being used

Should run versions 1.0 and above

TagsNo tags attached.
Attached Files

Relationships

has duplicate 0016709 closeddregad Need facility to convert the resolve ticket into the close status balsed on the time . 
has duplicate 0020343 closedatrol close resolved incidents automatically 
has duplicate 0010304 closedatrol Automatic adjustment of status 
has duplicate 0020831 closedatrol Auto closing the Issues with No Response on Status Feedbac- requested 
has duplicate 0026100 closedatrol Auto closure of calls 

Activities

mk

mk

2016-04-20 02:11

reporter   ~0052982

Dear,

Thank you Very much for the Instant Reply & Support.
I shall be going through the Script and provide the feedback.

Many thanks
MK

e_kesaf

e_kesaf

2020-12-25 06:29

reporter   ~0064843

Hi,
Where should I need to add this php file.
Is there a plugin for this feature?

thanks

cas

cas

2020-12-25 10:42

reporter   ~0064844

This script could be stored in the root of your mantis and next it needs to be scheduled to run automatically every day or whatever you like.
Be aware this is an old script, no clue if it runs on newer versions of Mantis.
The correct way of handling this would to turn it into a plugin.

cas

cas

2023-07-30 05:57

reporter   ~0067941

Added an updated version which runs under 2.x

pikachurus

pikachurus

2024-01-26 07:01

reporter   ~0068468

Last edited: 2024-01-26 07:01

@cas, $t_days = 60, using DD/MM/YYYY date format

and...

image.png (2,960 bytes)   
image.png (2,960 bytes)   
cas

cas

2024-01-26 08:22

reporter   ~0068469

Theis script does not adjust datess, it only changes the status. So your comment is not clear to me.

pikachurus

pikachurus

2024-01-26 13:18

reporter   ~0068470

with variable $t_days = 60 (in my case) this script closes today's issues and it makes a strange 'date_modified' column in database (4294967295 -> 07.02.2106 09:28:15)

image-2.png (55,814 bytes)   
image-2.png (55,814 bytes)   
pikachurus

pikachurus

2024-01-27 06:52

reporter   ~0068471

@cas, can you add a variable for project selection in script?

cas

cas

2024-01-27 11:09

reporter   ~0068472

No problem, see attached.
parameters
days => number of days to take into account to raise warning
fromstat => Status that needs to be checked
tostat => Status to be set
muser => Userid from mantis (Integer)
project => project-id from mantis (Integer)
if not passed as parameter, default values 7,80,90,1,all are being used

cas

cas

2024-01-27 11:18

reporter   ~0068473

As for the date issue, it simply uses the current date from your system. So in case database and webserver are on the same system, check system time etcetera.
This script updates the history tabel with the valye NOW() for the date_modified field.