Giter Site home page Giter Site logo

mantis-triggerclose's Introduction

  • ๐Ÿ‘‹ Hi, Iโ€™m @fmancardi
  • ๐Ÿ‘€ Iโ€™m interested in test automation, SDLC Processes, Continuous Improvement of Software Development Quality
  • ๐ŸŒฑ Iโ€™m currently learning node.js, testcafe, Grafana

mantis-triggerclose's People

Contributors

chelmertz avatar

Watchers

 avatar  avatar

mantis-triggerclose's Issues

Set Resolution on Close

It should be possible to select what you want the resolution set to when being auto-closed. I have noticed at the moment some issues have been closed but "Resolution: Open"

Query in close_issues_matching_criteria is incorrect

Hi,
In close_issues_matching_criteria the query is incorrect, it should be something like this:

$sql = sprintf("
SELECT
bht.bug_id,
bt.summary
FROM
".db_get_table('mantis_bug_table')." AS bt
INNER JOIN
".db_get_table('mantis_bug_history_table')." AS bht
ON
bht.bug_id = bt.id
INNER JOIN
".db_get_table('mantis_user_table')." AS ut
ON
bt.handler_id = ut.id
AND
ut.access_level IN (%s)
WHERE
bt.status IN (%s)
AND
bt.category_id IN (%s)
GROUP BY
bht.bug_id
HAVING
max(bht.date_modified) < %d

",
"'".implode("', '", $privileges)."'",
"'".implode("', '", $statuses)."'",
"'".implode("', '", $categories)."'",
time() - $after_seconds
);

Status Selection box shows default statuses only

The status selection box shows the default mantis names "feedback, confirmed" etc. Would be much better UX if they displayed the ones set by $s_status_enum_string

For example, my feedback status is renamed to Need More Info

it also does not show any custom statuses

Bug in close logic?

The current logic to identify what to close does this

SELECT
				bht.bug_id,
				bt.summary
			FROM
				".db_get_table('mantis_bug_table')." AS bt
			INNER JOIN
				".db_get_table('mantis_bug_history_table')." AS bht
				ON
					bht.bug_id = bt.id
				AND
					bht.date_modified < %d
			INNER JOIN
				".db_get_table('mantis_user_table')." AS ut
				ON
					bt.handler_id = ut.id
				AND
					ut.access_level IN (%s)
			WHERE
				bt.status IN (%s)
				AND
				bt.category_id IN (%s)
			GROUP BY
				bht.bug_id",

But this will find any bug that is in a closable state that has an entry in the history table that pre-dates the cutoff date.

We only want to find bugs where the last history timestamp is before the cut off date because if we take a bug from out of closed into a closable state (such as feedback) we create a new history record but the code as is will close the bug the next time it runs because it's in a closable state and has an history timestamp that pre-dates the cut off date

So I think this code needs to be

				$sql = sprintf("
			SELECT
				bt.id as bug_id,
				bt.summary
			FROM
				".db_get_table('mantis_bug_table')." AS bt
			INNER JOIN
				".db_get_table('mantis_user_table')." AS ut
				ON
					bt.handler_id = ut.id
				AND
					ut.access_level IN (%s)
			WHERE
				bt.status IN (%s)
				AND
				bt.category_id IN (%s)
				and %d >  (select max(bht.date_modified) from mantis_bug_history_table bht
					where
					bht.bug_id = bt.id
					)
			GROUP BY
				bh.id",

So basically only find records where the last date modified is before the cut off date.

Invalid user given

Trying to update settings after plugin installation and got this error.
How to set user to this plugin?

Not closing issues

Does not seem to be closing issues. I have tried by using cron option and also the page load option but it is not closing issues.

Example:

Close a ticket that has not been modified after (value in seconds) is set to:
604800 (7 Days)

Issues with these statuses will be checked for inactivity set to:
Need More Info

I have 52 open issues in Need More Info status, that are older than 7 days, but they are not closed.

I created a user account called "System" (added as a moderator) and set the plugin to Close as this user as i do not want the bugs closed in my name.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.