Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DG-29 User admin update/Reports #603

Merged
merged 20 commits into from
Jun 17, 2024
Merged

Conversation

cdausmus
Copy link
Collaborator

DG-29 User labels and Reporting

Labels

  • Refactored labels/tags; Label, LabelCategory
  • Stored label colour
  • Added system level status (country, field and new user category), updated Bootstrap class
  • Fixed LandingPageAdmin bug with labels (Cannot save tags to landing page #533/DG-60)
  • Updated Project settings to use new labels
  • Added new user admin with ability to add user label

Reports

  • Added Report queue system (queue report, quartz job processes and runs behind the scenes)
  • Deprecated browser-run project summary report (migrated to report request)
  • Added new admin for reports
  • Quartz job to clean up old report files

@cdausmus cdausmus added this to the 6.1.9 milestone Jun 10, 2024
@cdausmus cdausmus requested review from temi and sbearcsiro June 10, 2024 04:49
@cdausmus cdausmus self-assigned this Jun 10, 2024
Copy link
Contributor

@temi temi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of it looks good to me. Noticed there is only one unit test file. Are all testing done manually?

Copy link
Contributor

@sbearcsiro sbearcsiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM just a couple of nits if you can bothered


class LabelController {

static allowedMethods = [save: "POST", update: "PUT", delete: "POST"]
// static allowedMethods = [saveNewLabel: "POST", updateCategory: "POST", saveCategory: "POST", createCategory: "POST",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove or fix?

def categoryId = params.long('id')
def category = LabelCategory.get(categoryId)
if (!category) {
log.info("No category found, redirecting back to index.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Feels like debug logging not info?

* @return a Map of user activity for a given date range.
*/
def getUserActivityBetweenDates(Date startDate, Date endDate) {
String query = """\
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like you don't need to select to_timestamp(max(vt.lastView)/1000) as it's not used?

Also this could be done with jooq for typesafe queries, etc?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was in case Alex wanted date parameters on the existing User summary report, in the end he decided against. I'm tempted to leave it in if that requirement changes, if you're happy with it.

@cdausmus cdausmus merged commit 8030dcd into develop Jun 17, 2024
2 checks passed
@cdausmus cdausmus deleted the feature/dg-29-user-admin-update branch September 30, 2024 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants