Skip to content

Include whether allocation's project is externally funded#69

Open
QuanMPhm wants to merge 1 commit into
nerc-project:mainfrom
QuanMPhm:funding
Open

Include whether allocation's project is externally funded#69
QuanMPhm wants to merge 1 commit into
nerc-project:mainfrom
QuanMPhm:funding

Conversation

@QuanMPhm

@QuanMPhm QuanMPhm commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Closes #70. Part of letting Coldfront projects show whether they are externally funded. I've added the boolean field in the API

@QuanMPhm QuanMPhm requested review from knikolla and naved001 June 4, 2026 18:47
Comment thread src/coldfront_plugin_api/serializers.py Outdated
pi = serializers.SerializerMethodField()
field_of_science = serializers.SerializerMethodField()
status = serializers.SerializerMethodField()
is_externally_funded = serializers.SerializerMethodField()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This approach would require explicitly adding every Project Attributes type individually to the API which is not scalable.

Why are you not outputting all Project Attributes The same way we do with Allocation Attributes?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

From local testing, it seems the API would output this if the Is Externally Funded attribute is not defined:

'attributes' : {
  'Is Externally Funded': None
}

But I can see the appeal of just not having the field appear at all, and to just copy how allocation attributes are handled

Updated test cases to work with the latest version of
`coldfront-plugin-cloud`, as changes to the quota
system [1] broke the tests.

[1] nerc-project/coldfront-plugin-cloud#287
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.

Making project Is externally funded boolean field availabe in API

2 participants