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

Add reference to resources #954

Closed
oriolgual opened this issue Feb 14, 2017 · 2 comments
Closed

Add reference to resources #954

oriolgual opened this issue Feb 14, 2017 · 2 comments
Assignees

Comments

@oriolgual
Copy link
Contributor

This is a Feature Proposal

🎩 Description

Users and admins need an easy way to refer to a unique resource (proposal, meeting, result, etc) in a friendly way (without having to know the ID). This could be useful when linking resources or just referring to them.

We need to add a method so that every resource has its unique reference, it could be something like this:

BCN-DPP-2017-02-6589 which translates to:

  • BCN: A setting configured at the organization to be prepended to each reference.
  • DPP: Unique name identifier for a resource: Decidim::Proposals::Proposal (DMM for meetings or DBP for projects).
  • 2017-02: Year-Month of the resource creation date
  • 6589: ID of the resource

After this, users should be able to see the reference in proposals, meetings, results and projects.

📌 Related issues

📋 Additional Data

@mrcasals
Copy link
Contributor

The DPP part can be non-unique in some installations and it might be weird. What about taking the first 4 letters of the resource name? Meeting => MEET, Projects => PROJ, Proposals => PROP.

Also, I'm thinking about external resources. In L'Hospitalet installation, custom resources will be scoped in DecidimHospitalet::EngineName::ResourceName, so whoever implements this needs to take this capitalization into account with the model @oriolgual suggested.

@oriolgual
Copy link
Contributor Author

@mrcasals we delegate this to the ResourceManifest and when you register a new resource it gets validated that it's unique. Ok with the 4 letter approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants