You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently a lot of logic is duplicated between multiple modules, a noticeable example for this are checks for whether a comment has been written by staff or is staff restricted.
Additionally the checks are not consistent, some compare values case insensitively, others check for special values such as "Undefined".
Possible Solution
Every complex check which is performed by at least two modules, and every occurrence of String literals in two or more classes somehow related to Mojira should be refactored to common functions, reducing code duplication and making them more consistent.
This could be solved for example by adding functions such as:
Issue.hasModTag(String)
Comment.isStaffRestricted()
Comment.isWrittenByStaff()
...
I have started doing some of the refactoring on a local branch, but I will likely not continue on that any time soon. Though if you want to have a look at it or continue based on that work I can push the branch.
The text was updated successfully, but these errors were encountered:
The Problem
Currently a lot of logic is duplicated between multiple modules, a noticeable example for this are checks for whether a comment has been written by staff or is staff restricted.
Additionally the checks are not consistent, some compare values case insensitively, others check for special values such as "Undefined".
Possible Solution
Every complex check which is performed by at least two modules, and every occurrence of String literals in two or more classes somehow related to Mojira should be refactored to common functions, reducing code duplication and making them more consistent.
This could be solved for example by adding functions such as:
Issue.hasModTag(String)
Comment.isStaffRestricted()
Comment.isWrittenByStaff()
I have started doing some of the refactoring on a local branch, but I will likely not continue on that any time soon. Though if you want to have a look at it or continue based on that work I can push the branch.
The text was updated successfully, but these errors were encountered: