Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • D deichman
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 16
    • Issues 16
    • List
    • Boards
    • Service Desk
    • Milestones
  • Jira
    • Jira
  • Merge requests 5
    • Merge requests 5
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • digibib
  • deichman
  • Merge requests
  • !512

Merged
Created Jan 21, 2022 by Petter Goksøyr Åsen@boutrosOwner

DEICH-6097 DEICH-6149 make events cancellable

  • Overview 23
  • Commits 4
  • Changes 18

Migration SPARQLs for existing events:

Set cancelled prop to true/false:

PREFIX : <https://tjenester.deichman.no/ontology/>
WITH <https://tjenester.deichman.no>
INSERT {
  ?id :cancelled ?cancelled .
} WHERE {
  ?id a :LibraryEventInstance ; :title ?title .
  FILTER NOT EXISTS { ?id :cancelled ?cancelled }
  BIND(IF(regex(?title, "avlyst", "i"), true, false) AS ?cancelled)
}

Remove "AVLYST" variants from beginning title:

PREFIX : <https://tjenester.deichman.no/ontology/>
WITH <https://tjenester.deichman.no>
DELETE { ?id :title ?old_title }
INSERT { ?id :title ?new_title }
 WHERE {
  ?id a :LibraryEventInstance ; :title ?old_title .
  BIND(REPLACE(?old_title, "^\\s?avlyst[!:.]*(\\s*)?-?\\s?", "", "i") AS ?new_title)
  FILTER(REGEX(?old_title, "avlyst", "i"))
}

Closes DEICH-6097 Closes DEICH-6149

Edited Jan 24, 2022 by Petter Goksøyr Åsen
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: DEICH-6097