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

BXC-4719 archive project #109

Merged
merged 9 commits into from
Sep 25, 2024
Merged

BXC-4719 archive project #109

merged 9 commits into from
Sep 25, 2024

Conversation

krwong
Copy link
Contributor

@krwong krwong commented Sep 23, 2024

https://unclibrary.atlassian.net/browse/BXC-4719

  • add archive service and command to archive a list of chompb projects, which moves said projects to an "archived" folder
  • modify list_projects service and command to count the number of archived projects

int numberArchivedProjects = countArchivedProjects(directory);
ObjectNode objectNode = mapper.createObjectNode();
objectNode.put(ARCHIVED_PROJECTS, numberArchivedProjects);
arrayNode.add(objectNode);
Copy link
Member

Choose a reason for hiding this comment

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

Hm, i think it's going to be confusing if the result from this service is a list of projects, and then one of the entries in the list is just a count archived projects. Will probably also mess up the table in the admin UI. Maybe we can add this count to one of the status commands instead?

I'm also wondering if this service should know how to list archived projects in the .archived subdirectory, and include them in the regular results. Otherwise it seems like we'll never have any results with status = archived. It'd probably just mean making lines 60-81 into a helper method and then calling it on both the base directory and the archived subdirectory. If we do that, we might want to add an option so that archived projects only get included if the option is set, like --include-archived.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I ended up removing the countArchivedProjects method. I don't know if it would work in one of the status commands since I think those commands get the status for one project and not multiple. We probably don't need the archived project count anymore now that we added an --include-archived option?

Copy link
Member

Choose a reason for hiding this comment

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

yes you're right, it wouldn't make sense in the status commands, so removing the stat makes sense

…chiveProject to archiveProjects, throw error, remove countArchivedProjects method, add --include-archived option to listProjects cmd
@bbpennel bbpennel merged commit 24729bd into main Sep 25, 2024
2 checks passed
@bbpennel bbpennel deleted the BXC-4719-archive-project branch September 25, 2024 13:53
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.

2 participants