project-lux / lux-marklogic

Code, issues, and resources related to LUX MarkLogic
Other
3 stars 2 forks source link

Add Related List Support for Events Related to Agents - supports FE 10 #93

Open clarkepeterf opened 3 months ago

clarkepeterf commented 3 months ago

Problem Description: https://github.com/project-lux/lux-middletier/issues/11 and https://github.com/project-lux/lux-frontend/issues/10 want to show related Events on Agent pages

Expected Behavior/Solution: Add an event relatedToAgent search term

Requirements:

Needed for promotion:

- [ ] Wireframe/Mockup - Mike - [ ] Committee discussions - Sarah - [ ] Feasibility/Team discussion - Sarah - [ ] Backend requirements - TBD - [ ] Frontend requirements- TBD - [ ] Questions - List of questions for discussions. Answers should be documented within the issue.

UAT/LUX Examples:

- Example endpoints from LUX to use for development and testing, if applicable.

Dependencies/Blocks:

Related Github Issues:

Related links:

Wireframe/Mockup:

clarkepeterf commented 2 months ago

With the present related list config generator, all of the relationScopes are "set". In order for search links to work on the frontend, we will have to make the criteria search for the Objects or Works in those Sets. This requires some modification of the related list code:

  "event": {
        "relatedToAgent": {
            "targetScope": "event",
            "searchConfigs": [
                {
                    "relationKey": "used-containing-carries-aboutAgent",
                    "relationScope": "set",
                    "mode": "search",
                    "criteria": {
                        "used": {
                            "containing": {
                                "carries": {
                                    "aboutAgent": {
                                        "iri": "@@RUNTIME_PARAM@@"
                                    }
                                }
                            }
                        }
                    }
                },
                {
                    "relationKey": "used-containing-carries-createdBy",
                    "relationScope": "set",
                    "mode": "search",
                    "criteria": {
                        "used": {
                            "containing": {
                                "carries": {
                                    "createdBy": {
                                        "iri": "@@RUNTIME_PARAM@@"
                                    }
                                }
                            }
                        }
                    }
                },
                {
                    "relationKey": "used-containing-carries-publishedBy",
                    "relationScope": "set",
                    "mode": "search",
                    "criteria": {
                        "used": {
                            "containing": {
                                "carries": {
                                    "publishedBy": {
                                        "iri": "@@RUNTIME_PARAM@@"
                                    }
                                }
                            }
                        }
                    }
                },
                {
                    "relationKey": "used-containing-encounteredBy",
                    "relationScope": "set",
                    "mode": "search",
                    "criteria": {
                        "used": {
                            "containing": {
                                "encounteredBy": {
                                    "iri": "@@RUNTIME_PARAM@@"
                                }
                            }
                        }
                    }
                },
                {
                    "relationKey": "used-containing-producedBy",
                    "relationScope": "set",
                    "mode": "search",
                    "criteria": {
                        "used": {
                            "containing": {
                                "producedBy": {
                                    "iri": "@@RUNTIME_PARAM@@"
                                }
                            }
                        }
                    }
                },
                {
                    "relationKey": "used-member-carries-aboutAgent",
                    "relationScope": "set",
                    "mode": "search",
                    "criteria": {
                        "used": {
                            "member": {
                                "carries": {
                                    "aboutAgent": {
                                        "iri": "@@RUNTIME_PARAM@@"
                                    }
                                }
                            }
                        }
                    }
                },
                {
                    "relationKey": "used-member-carries-createdBy",
                    "relationScope": "set",
                    "mode": "search",
                    "criteria": {
                        "used": {
                            "member": {
                                "carries": {
                                    "createdBy": {
                                        "iri": "@@RUNTIME_PARAM@@"
                                    }
                                }
                            }
                        }
                    }
                },
                {
                    "relationKey": "used-member-carries-publishedBy",
                    "relationScope": "set",
                    "mode": "search",
                    "criteria": {
                        "used": {
                            "member": {
                                "carries": {
                                    "publishedBy": {
                                        "iri": "@@RUNTIME_PARAM@@"
                                    }
                                }
                            }
                        }
                    }
                },
                {
                    "relationKey": "used-member-encounteredBy",
                    "relationScope": "set",
                    "mode": "search",
                    "criteria": {
                        "used": {
                            "member": {
                                "encounteredBy": {
                                    "iri": "@@RUNTIME_PARAM@@"
                                }
                            }
                        }
                    }
                },
                {
                    "relationKey": "used-member-producedBy",
                    "relationScope": "set",
                    "mode": "search",
                    "criteria": {
                        "used": {
                            "member": {
                                "producedBy": {
                                    "iri": "@@RUNTIME_PARAM@@"
                                }
                            }
                        }
                    }
                }
            ]
        }
    },
prowns commented 2 months ago

Note from 4/12: Can't do for this release - Events are related through Sets, which we can't use for frontend search links. Need to tweak Related List code to convert to an Objects/Works search.

clarkepeterf commented 2 months ago

@prowns @kamerynB Due to focusing on other issues this sprint, I don't think I'll be able to get this into this release. I will make sure to prioritize it next release

roamye commented 1 month ago

@clarkepeterf since the FE ticket this supports isn't being deployed till the 6-10 cycle, is there a UAT for this tix? Would a possible UAT be to look at the JSON record for each FE UAT example ( Person , Group ) and see that relatedToAgent is now within the json?

roamye commented 1 month ago

Approved by UAT

Note: Unreviewable

roamye commented 3 weeks ago

@clarkepeterf did this go out to DEV yet? there is no awaiting review label.