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 created_by and modified_by fields in ScriptVersion #354

Merged
merged 5 commits into from
Aug 11, 2022

Conversation

Lioscro
Copy link
Collaborator

@Lioscro Lioscro commented Aug 3, 2022

  • Minor fix for Celery>=5 where the -A option usage changed by setting celery<5
  • Added created_by and modified_by fields for ScriptVersion
  • Admin page now displays the created and modified fields for ScriptVersion. Currently, I have all of them set to be read-only, but still a bit unsure if this is the best, or should we make these editable?
  • Display script version, iteration creator and modifier in UI script view.

image

Copy link
Member

@Chris7 Chris7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes! Some minor stuff

wooey/models/core.py Outdated Show resolved Hide resolved
setup.py Show resolved Hide resolved
@Lioscro Lioscro marked this pull request as ready for review August 4, 2022 15:04
@Lioscro Lioscro requested a review from Chris7 August 4, 2022 15:04
readonly_fields = ('created_date', 'created_by', 'modified_date', 'modified_by')

def save_model(self, request, obj, form, change):
if not change:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this already exists won't we always update created by with the last user? Seems like this should be checking if created by is empty

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope! change is True only when updating an existing entry and False when creating a new one.
image

@@ -14,6 +14,13 @@
<div class="page-header">
<h3 id="wooey-script-title">{{ script.script_name }}</h3>
<p id="wooey-script-description">{{ script.script_description }}</p>

<p id="wooey-script-info" style="color:gray"><small>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is ok, but I'll probably move it elsewhere. Seems like we're putting a lot of stuff above where users primarily interact with the script.

Copy link
Member

@Chris7 Chris7 Aug 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also should handle the none case better than just saying none since created by and modified by won't be filled out for existing scripts. I'd put it as unknown or omit it

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. Do you think somewhere a bit more discrete, like a footer?

Copy link
Member

@Chris7 Chris7 Aug 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking to put the information in the header, and only put the last modified/version stuff in. like:
image

And if the user is unknown -- omit it. The version is a combination of That would be {{ script_version }}.{{ script_iteration }}

Copy link
Collaborator Author

@Lioscro Lioscro Aug 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With modifier:

image

Without modifier:
image

@Chris7
Copy link
Member

Chris7 commented Aug 11, 2022

Great!

@Chris7 Chris7 merged commit 33b91db into wooey:master Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants