Skip to content

Build collection page in catalog-next #4970

@FuhuXia

Description

@FuhuXia

User Story

In order to list all datasets of the same isPartOf value, data.gov team wants have a collection page.

Acceptance Criteria

[ACs should be clearly demoable/verifiable whenever possible. Try specifying them using BDD.]

  • GIVEN there are such three datasets from the same harvest source (id=my_sid)
    AND one dataset with identifier=my_pid, name=my_parent
    AND one dataset with identifier=my_cid1, name=my_child1, isPartOf=my_pid
    AND one dataset with identifier=my_cid2, name=my_child2, isPartOf=my_pid
    WHEN its collection page is loaded
    THEN datasets my_child1 and my_child2 are listed
    AND user can search within this collection.

Background

This can be done with Solr query using isPartOf and harvest_source_id as search terms, as in
https://catalog-next-dev-datagov.app.cloud.gov/dataset/?q=isPartOf:pid+AND+harvest_source_id:sid. But the resulted page has the search box prefilled with search terms that users do not understand, therefore users wont be able to perform their own search. We want a clean page starting with empty in the search box, and make it obvious that the current listing is a collection, same as how collection is represented in the current catalog.data.gov, such as this example.

Security Considerations (required)

[Any security concerns that might be implicated in the change. "None" is OK, just be explicit here!]

Sketch

[Notes or a checklist reflecting our understanding of the selected approach]
Instead of using raw SOLR query as q=isPartOf:pid+AND+harvest_source_id:sid, we can add a new term collection_info=sid+pid, CKAN will grab the collection_info value and split it into harvest_source_id and isPartOf to be used in the python code to find all datasets that belong to the collection.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

Status
🗄 Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions