Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Added patch for NSF Bureau code. #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

achraf-jeday
Copy link
Contributor

@achraf-jeday achraf-jeday commented Jul 18, 2016

Ref https://github.com/NuCivic/usda-nal/issues/1000

Description (usda requirements)

We need to add a choice for the National Science Foundation (NSF) to our Bureau Code dropdown list.
We would like documentation on how to do this so we can add more in the future.

@achraf-jeday
Copy link
Contributor Author

achraf-jeday commented Aug 4, 2016

@dafeder

Inside docroot/sites/all/modules/contrib/open_data_federal_extras/open_data_federal_extras.module the function open_data_federal_extras_form_alter will alter dataset_node_form form. Actually it filters the options that will be available for the Bureau Code and Program Code fields.

The php function preg_match along side with a pattern string are used to detect the bureau codes that we want to display in the field select list. Same thing for program codes. You need to modify the pattern string to capture more codes or filter out some.

I modified the pattern string to capture the national science foundation bureau code (422).

You can find the complete list (before filtering) of bureau codes and program codes respectively here :

  • docroot/sites/all/modules/contrib/open_data_federal_extras/fed_bureau_code_list/omb-agency-bureau-treasury-codes.php
  • docroot/sites/all/modules/contrib/open_data_federal_extras/fed_program_code_list/federal_inventory_list.php

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant