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

Revamp of mscolab operation menu and addition of "archive" operation #1782

Merged
merged 1 commit into from
May 17, 2023

Conversation

joernu76
Copy link
Member

No description provided.

@joernu76 joernu76 changed the title Revamp of mscolab operation menu and addition of "archive" operation Draft: Revamp of mscolab operation menu and addition of "archive" operation May 16, 2023
@joernu76 joernu76 requested a review from ReimarBauer May 16, 2023 14:34
@@ -59,6 +59,8 @@
migrate = Migrate(APP, db, render_as_batch=True)
auth = HTTPBasicAuth()

ARCHIVE_THRESHOLD = 30
Copy link
Member

Choose a reason for hiding this comment

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

we should maybe make this configurable.

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe. 30 days seems a tad short for me as a typical campaign may run longer.
New issue?

Copy link
Member

Choose a reason for hiding this comment

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

yes, this needs also a documentation

db.session.commit()
# Reload Operation List
if not temp_operation_active:
if temp_operation_active != operation.active:
Copy link
Member

Choose a reason for hiding this comment

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

the wording maybe can be changed to archived, unarchived etc.

Copy link
Member Author

Choose a reason for hiding this comment

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

changing operation.active requires changes to the DB, I guess?

Copy link
Member

Choose a reason for hiding this comment

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

yes, in the models.

and on staging you could do this by
https://mss.readthedocs.io/en/stable/mscolab.html#data-base-migration

Copy link
Member

Choose a reason for hiding this comment

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

review and also add new parts to the section Operation based features in

https://github.com/Open-MSS/MSS/blob/develop/docs/mscolab.rst#operation-based-features

Copy link
Member Author

Choose a reason for hiding this comment

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

I am not convinced that we should change the DB format to be more consistent in a part that is not user-visible.

Copy link
Member

@ReimarBauer ReimarBauer May 17, 2023

Choose a reason for hiding this comment

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

We can do this when we need another change. It is not needed now, but at the moment we introduce something new we anyways have to do a server database migration.

@joernu76 joernu76 force-pushed the i1753 branch 3 times, most recently from db7a0f9 to 46acf06 Compare May 16, 2023 19:05
@joernu76 joernu76 changed the title Draft: Revamp of mscolab operation menu and addition of "archive" operation Revamp of mscolab operation menu and addition of "archive" operation May 16, 2023
@joernu76 joernu76 requested a review from ReimarBauer May 17, 2023 06:05
self.listOperationsMSC.setToolTip(_translate("MSUIMainWindow", "List of mscolab operations.\n"
"Double click a operation to activate and view its description."))
self.activeOperationDesc.setText(_translate("MSUIMainWindow", "Select Operation to View Description"))
self.activeOperationsLabel.setText(_translate("MSUIMainWindow", "Operations"))
self.pbOpenOperationArchive.setText(_translate("MSUIMainWindow", "Operation Archive"))
Copy link
Contributor

Choose a reason for hiding this comment

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

plural?

on the upper list it is also plural and a : is missing on upper one.

Copy link
Member Author

Choose a reason for hiding this comment

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

singular in front of "archive" seems to be slightly more common than plural according to google

Copy link
Member

@ReimarBauer ReimarBauer left a comment

Choose a reason for hiding this comment

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

tried few functions, seems that the archive button does not update the lists or is not working? Likly there an event trigger missing.
archive_problem

else:
self.ui.activeOperationDesc.setText(
"Description is too long to show here, for long descriptions go "
"to operations menu.")

def update_description_handler(self):
def change_category_handler(self):
# only after login
Copy link
Member

Choose a reason for hiding this comment

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

just seen that the comment is on two places in the source

the verification "after login" is done on the server.

verify_user_token is a debugging feature which is skipped by default user configuration. When it is not skipped it forces each request to be checked with the server alive and this slows down any event and helps to debug some problems.

Copy link
Member Author

Choose a reason for hiding this comment

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

No idea, I copy pasted that comment in changing category over from the changing of description. I am still not 100% sure about how that authentification and verification works.

Copy link
Member

Choose a reason for hiding this comment

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

I'ver overseen that there, the server has to do all that verification.

@@ -59,6 +59,8 @@
migrate = Migrate(APP, db, render_as_batch=True)
auth = HTTPBasicAuth()

ARCHIVE_THRESHOLD = 30
Copy link
Member

Choose a reason for hiding this comment

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

yes, this needs also a documentation

db.session.commit()
# Reload Operation List
if not temp_operation_active:
if temp_operation_active != operation.active:
Copy link
Member

Choose a reason for hiding this comment

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

yes, in the models.

and on staging you could do this by
https://mss.readthedocs.io/en/stable/mscolab.html#data-base-migration

db.session.commit()
# Reload Operation List
if not temp_operation_active:
if temp_operation_active != operation.active:
Copy link
Member

Choose a reason for hiding this comment

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

review and also add new parts to the section Operation based features in

https://github.com/Open-MSS/MSS/blob/develop/docs/mscolab.rst#operation-based-features

@joernu76
Copy link
Member Author

tried few functions, seems that the archive button does not update the lists or is not working? Likly there an event trigger missing.

This works, when the mscolab server has been updated. I just hot-patched the mss-stage server for testing and it works.

@ReimarBauer
Copy link
Member

When a category is changed, other users have the old entry in theire opened "Manage Users" - "Clone operation" list selection. We maybe should update this too.
On the one who does the category change the window of "Manage Users" gets closed.

@joernu76
Copy link
Member Author

When a category is changed, other users have the old entry in theire opened "Manage Users" - "Clone operation" list selection. We maybe should update this too. On the one who does the category change the window of "Manage Users" gets closed.

My Manage User window does not get closed. The behaviour should be the same as with a changed description. With all the category filtering etc. there may be a trigger missing that changes the visible operations. I think that is fine, currently, as this feature will be used seldomly but offers the option to correct for e.g. typo and will sort itself out eventually.

Should be fixed eventually, obviously.

@ReimarBauer
Copy link
Member

ReimarBauer commented May 17, 2023

On archive we should not allow further changes, by someone else having the operation open

archive_should_not_allwow_changes

I think in this case we should close the views on other users or go to the local flightpath

Copy link
Member

@ReimarBauer ReimarBauer left a comment

Choose a reason for hiding this comment

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

This is a step further. We can improve always a few more parts. But it is also a lot changes already.

@joernu76 joernu76 merged commit 050e7c7 into develop May 17, 2023
@joernu76 joernu76 deleted the i1753 branch June 13, 2023 10:46
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.

3 participants