Mercurial > p > roundup > code
changeset 7929:5ac2af6c7f97
fix: issue2551346, assume statusauditor chatting_requires_two_user off
This option of the statusauditor.py detector prevents a ticket from
going into chatting state if the same user posts multiple updates.
If the setting that controls this was missing from
detector/config.ini, it would generate an error to the user.
Now it just assumes the option is off and doesn't give a big red
banner to the user who can't do anything about it.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Thu, 02 May 2024 22:36:31 -0400 |
| parents | c05ea62b4c7a |
| children | 0127045f573b |
| files | CHANGES.txt share/roundup/templates/classic/detectors/statusauditor.py share/roundup/templates/jinja2/detectors/statusauditor.py |
| diffstat | 3 files changed, 17 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/CHANGES.txt Thu May 02 22:11:37 2024 -0400 +++ b/CHANGES.txt Thu May 02 22:36:31 2024 -0400 @@ -135,6 +135,13 @@ still supported. (John Rouillard) - Use roundup-demo -p option to set listening port. Was ignored before. (John Rouillard) +- issue2551346 - Classic tracker's statusauditor raises error if + detectors/config.ini missing + STATUSAUDITOR_CHATTING_REQUIRES_TWO_USERS. The statusauditor.py for + jinja2 and classic templates has been changed to assume that this + option is off when the setting is missing from + detectors/config.ini. Other templates do not implement this option. + (John Rouillard) Features:
--- a/share/roundup/templates/classic/detectors/statusauditor.py Thu May 02 22:11:37 2024 -0400 +++ b/share/roundup/templates/classic/detectors/statusauditor.py Thu May 02 22:36:31 2024 -0400 @@ -43,7 +43,11 @@ 'STATUSAUDITOR_CHATTING_REQUIRES_TWO_USERS' ] ) except InvalidOptionError: - raise InvalidOptionError("Option STATUSAUDITOR_CHATTING_REQUIRES_TWO_USERS not found in detectors/config.ini. Contact tracker admin to fix.") + chatting_requires_two_users = False + # NOTE if this is hit, detectors/config.ini needs to be updated with: + # [statusauditor] + # chatting_requires_two_users = yes + # to enable or no to disable (same as default) # don't fire if there's no new message (ie. chat) if 'messages' not in newvalues:
--- a/share/roundup/templates/jinja2/detectors/statusauditor.py Thu May 02 22:11:37 2024 -0400 +++ b/share/roundup/templates/jinja2/detectors/statusauditor.py Thu May 02 22:36:31 2024 -0400 @@ -43,7 +43,11 @@ 'STATUSAUDITOR_CHATTING_REQUIRES_TWO_USERS' ] ) except InvalidOptionError: - raise InvalidOptionError("Option STATUSAUDITOR_CHATTING_REQUIRES_TWO_USERS not found in detectors/config.ini. Contact tracker admin to fix.") + chatting_requires_two_users = False + # NOTE if this is hit, detectors/config.ini needs to be updated with: + # [statusauditor] + # chatting_requires_two_users = yes + # to enable or no to disable (same as default) # don't fire if there's no new message (ie. chat) if 'messages' not in newvalues:
