Task #11385

Allow slug regeneration for all entities with slugs

Added by José Raddaoui Marín almost 3 years ago. Updated almost 3 years ago.

Status:VerifiedStart date:07/26/2017
Priority:MediumDue date:
Assignee:-% Done:

0%

Category:CLI tools
Target version:Release 2.4.0
Google Code Legacy ID: Tested version:2.3, 2.4
Sponsored:No Requires documentation:

Description

Currently, the generate slugs task only takes in consideration the following classes:

- QubitActor
- QubitTerm
- QubitInformationObject
- QubitPhysicalObject
- QubitEvent
- QubitAccession

But the following ones also have slugs:

- QubitDigitalObject
- QubitFunction
- QubitRelation
- QubitRights
- QubitStaticPage
- QubitTaxonomy
- QubitDeaccession

This first came up in a user forum thread where the user couldn't delete a relation because of a malformed slug.

History

#1 Updated by José Raddaoui Marín almost 3 years ago

  • Status changed from New to Code Review
  • Assignee changed from José Raddaoui Marín to Nick Wilkinson

Ready for code review in PR 588

#2 Updated by Dan Gillean almost 3 years ago

  • Requires documentation set to Yes

#3 Updated by José Raddaoui Marín almost 3 years ago

  • Status changed from Code Review to QA/Review
  • Assignee changed from Nick Wilkinson to Dan Gillean

Merged in qa/2.4.x

#4 Updated by Dan Gillean almost 3 years ago

Hey Radda,

Can you give me a query or two to delete a couple of the new slug types from the DB so i can try running the task and seeing if they are restored? Or, whatever method you think will be best to test this :)

Thanks!

#5 Updated by Dan Gillean almost 3 years ago

  • Status changed from QA/Review to Feedback
  • Assignee changed from Dan Gillean to José Raddaoui Marín

#6 Updated by José Raddaoui Marín almost 3 years ago

  • Status changed from Feedback to QA/Review
  • Assignee changed from José Raddaoui Marín to Dan Gillean

Hi Dan!

To see the data first:

SELECT * FROM slug JOIN object ON object.id=slug.object_id WHERE class_name="QubitRelation" LIMIT 10;

To remove one:

DELETE FROM slug WHERE object_id=36423;

To remove all:

DELETE FROM slug WHERE object_id IN (SELECT id FROM object WHERE class_name="QubitRelation");

To see if one is generated:

SELECT * FROM slug WHERE object_id=36423;

And the first query could be used to check if all where created. Change the class_name and ids as you want ;)

#7 Updated by Dan Gillean almost 3 years ago

  • Status changed from QA/Review to Verified

#8 Updated by Dan Gillean almost 3 years ago

  • Assignee deleted (Dan Gillean)
  • Requires documentation deleted (Yes)

Also available in: Atom PDF