Skip to content

Commit 14b20f8

Browse files
committed
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.
1 parent 974ca28 commit 14b20f8

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

CHANGES.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,13 @@ Fixed:
135135
still supported. (John Rouillard)
136136
- Use roundup-demo -p option to set listening port. Was ignored
137137
before. (John Rouillard)
138+
- issue2551346 - Classic tracker's statusauditor raises error if
139+
detectors/config.ini missing
140+
STATUSAUDITOR_CHATTING_REQUIRES_TWO_USERS. The statusauditor.py for
141+
jinja2 and classic templates has been changed to assume that this
142+
option is off when the setting is missing from
143+
detectors/config.ini. Other templates do not implement this option.
144+
(John Rouillard)
138145

139146
Features:
140147

share/roundup/templates/classic/detectors/statusauditor.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ def chatty(db, cl, nodeid, newvalues):
4343
'STATUSAUDITOR_CHATTING_REQUIRES_TWO_USERS' ]
4444
)
4545
except InvalidOptionError:
46-
raise InvalidOptionError("Option STATUSAUDITOR_CHATTING_REQUIRES_TWO_USERS not found in detectors/config.ini. Contact tracker admin to fix.")
46+
chatting_requires_two_users = False
47+
# NOTE if this is hit, detectors/config.ini needs to be updated with:
48+
# [statusauditor]
49+
# chatting_requires_two_users = yes
50+
# to enable or no to disable (same as default)
4751

4852
# don't fire if there's no new message (ie. chat)
4953
if 'messages' not in newvalues:

share/roundup/templates/jinja2/detectors/statusauditor.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ def chatty(db, cl, nodeid, newvalues):
4343
'STATUSAUDITOR_CHATTING_REQUIRES_TWO_USERS' ]
4444
)
4545
except InvalidOptionError:
46-
raise InvalidOptionError("Option STATUSAUDITOR_CHATTING_REQUIRES_TWO_USERS not found in detectors/config.ini. Contact tracker admin to fix.")
46+
chatting_requires_two_users = False
47+
# NOTE if this is hit, detectors/config.ini needs to be updated with:
48+
# [statusauditor]
49+
# chatting_requires_two_users = yes
50+
# to enable or no to disable (same as default)
4751

4852
# don't fire if there's no new message (ie. chat)
4953
if 'messages' not in newvalues:

0 commit comments

Comments
 (0)