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

BrAPI: Observation Units - fix duplicate plots due to Management Factors #5197

Merged
merged 2 commits into from
Nov 12, 2024

Conversation

dwaring87
Copy link
Member

Description

This removes the duplicate plots in the BrAPI /observationUnits endpoint due to management factors.

The response now looks like this:

{
  "result": {
    "data": [
      {
        "observationUnitName": "SAMPLE_EXANY_RW_2022-PLOT_101",
        "treatments": [
          {
            "modality": "Description of MF A",
            "factor": "SAMPLE_EXANY_RW_2022_MFA"
          },
          {
            "factor": "SAMPLE_EXANY_RW_2022_MFC",
            "modality": "Description of MF C"
          }
        ],
        ...
      },
   ]
  },
  "metadata": {
    "pagination": {
      "totalPages": 3,
      "pageSize": 10,
      "currentPage": 0,
      "totalCount": 30
    },
    "status": [
      {
        "messageType": "INFO",
        "message": "BrAPI base call found with page=0, pageSize=10"
      },
      {
        "messageType": "INFO",
        "message": "Loading CXGN::BrAPI::v2::ObservationUnits"
      },
      {
        "messageType": "INFO",
        "message": "Observation Units search result constructed"
      }
    ],
    "datafiles": []
  }
}

Fixes #5196

Checklist

  • Refactoring only
  • Documentation only
  • Fixture update only
  • Bug fix
    • The relevant issue has been closed.
    • Further work is required.
  • New feature
    • Relevant tests have been created and run.
    • Data was added to the fixture
      • Data was added via a patch in /t/data/fixture/patches/.
    • User-Facing Change
      • The user manual in /docs has been updated.
    • Any new Perl has been documented using perldoc.
    • Any new JavaScript has been documented using JSDoc.
    • Any new legacy JavaScript has been moved from /js to /js/source/legacy.

Copy link
Member

@lukasmueller lukasmueller left a comment

Choose a reason for hiding this comment

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

:-)

@lukasmueller lukasmueller merged commit 3ef6587 into master Nov 12, 2024
4 checks passed
@lukasmueller lukasmueller deleted the topic/brapi_observation_units_management_factors branch November 12, 2024 16:26
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.

BrAPI /observationUnits returning duplicate plots
3 participants