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 organization attribute to Task (and subclasses) #72

Closed
jc0n opened this issue Jan 11, 2012 · 5 comments
Closed

Add organization attribute to Task (and subclasses) #72

jc0n opened this issue Jan 11, 2012 · 5 comments

Comments

@jc0n
Copy link
Member

jc0n commented Jan 11, 2012

In summary, from our discussion over email:

From: @mhrivnak

When a task is created, an owning organization must be chosen. From
then on, the task may only be modified by admins from that
organization. However, any organization may assign that task to
users.

We will also want to verify that the task creator only specifies an organization to which he belongs and has sufficient privileges to create the Task.

@jc0n
Copy link
Member Author

jc0n commented Mar 6, 2012

What is the best way to handle the exam XML files? I assume we will need to include an attribute for organization_id in the XML file? The only alternative that I can think of is passing in the organization_id when we call create_from_xml or the like.

@mhrivnak
Copy link
Member

mhrivnak commented Mar 6, 2012

In general, when importing data via CSV or XML, we try to define foreign relationships based on something human-readable whenever possible. I think it would be fine to specify an "organization" attribute of the exam node which is the name of an org.

It would be a good idea to document that somewhere, although I'm not sure where is best. We definitely want to update the schema definition, and also perhaps the docblock for exam_manager.create_from_xml.

@jc0n
Copy link
Member Author

jc0n commented Mar 6, 2012

In general, when importing data via CSV or XML, we try to define foreign relationships based on something human-readable whenever possible. I think it would be fine to specify an "organization" attribute of the exam node which is the name of an org.

Sounds good to me.

@jc0n
Copy link
Member Author

jc0n commented Mar 6, 2012

Will this pose a problem for organizations that have a parent? It looks like it may since the name attribute alone is not unique.

@mhrivnak
Copy link
Member

mhrivnak commented Mar 6, 2012

Ugh, good question. We already made an assumption in pr_services.import_manager.import_users that an org name is unique. While it seems like a nice idea for more than one organization to have the same name, I don't see it being used in practice any time soon. I think this is a case where we should keep it simple and do a great job of meeting our current use cases, so I suggest removing that "unique_together" constraint and making an org name unique by itself.

jc0n added a commit that referenced this issue Mar 9, 2012
jc0n added a commit that referenced this issue Mar 16, 2012
jc0n added a commit that referenced this issue Mar 16, 2012
mhrivnak added a commit that referenced this issue Mar 18, 2012
Please Review: Issue #72: Add organization attribute to Task
@jc0n jc0n closed this as completed Mar 18, 2012
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

2 participants