forked from evrenvarol/outlook-taskboard
-
Notifications
You must be signed in to change notification settings - Fork 9
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 support to order tasks by drag drops and dragging mail items #22
Open
ErikLevin
wants to merge
15
commits into
maltehi:master
Choose a base branch
from
ErikLevin:drag-to-sort
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When an item is dropped, will now set the Ordinal property of all items in that column. This only works in to do-list mode... maybe? For now, this feature is always enabled when INCLUDE_TODOS is, and all columns are then sorted on Ordinals always, overriding sorting config.
Added configuration parameter USE_ORDINALS which if set will allow drag and drop to sort issues in columns (and ignore any other sorting settings). Added filter for completed tasks to default config. This is to prevent e-mails flagged as completed to show up in those columns. Reverted unrelated change.
Ordinal property does not exist for MailItems, but ToDoTaskOrdinal exists for both TaskItems and MailItems and can be used.
It now works to add new tasks to the board when using INCLUDE_TODOS. It didn't work before because that folder is not allowed to Add to. Sometimes the new task does not appear without a manual reload. Perhaps it is a race condition between the reload on event AfterWrite and the addition of the task to the To-Do List. Not sure. I have tried using other events like Items.ItemAdd but have not managed to make it work.
Don't attempt to set status for MailItem objects, it is not possible.
It is now possible to drag flagged mail items between the columns and they will stick to the dropped column. This is accomplished by setting the FlagRequest property. It is possible to drag it to and from the Completed column as well with expected results. Renamed config parameter INCLUDE_TODOS_STATUS to INITIAL_MAIL_STATUS.
ErikLevin
changed the title
Add possibility to drag tasks in columns to sort them
Add support to order tasks by drag drops and dragging mail items
Sep 4, 2021
Thanks, that looks really good! Will hopefully get to try it out and merge it next week. |
When an item is dropped, will now set the Ordinal property of all items in that column. This only works in to do-list mode... maybe? For now, this feature is always enabled when INCLUDE_TODOS is, and all columns are then sorted on Ordinals always, overriding sorting config.
Added configuration parameter USE_ORDINALS which if set will allow drag and drop to sort issues in columns (and ignore any other sorting settings). Added filter for completed tasks to default config. This is to prevent e-mails flagged as completed to show up in those columns. Reverted unrelated change.
Ordinal property does not exist for MailItems, but ToDoTaskOrdinal exists for both TaskItems and MailItems and can be used.
It now works to add new tasks to the board when using INCLUDE_TODOS. It didn't work before because that folder is not allowed to Add to. Sometimes the new task does not appear without a manual reload. Perhaps it is a race condition between the reload on event AfterWrite and the addition of the task to the To-Do List. Not sure. I have tried using other events like Items.ItemAdd but have not managed to make it work.
Don't attempt to set status for MailItem objects, it is not possible.
It is now possible to drag flagged mail items between the columns and they will stick to the dropped column. This is accomplished by setting the FlagRequest property. It is possible to drag it to and from the Completed column as well with expected results. Renamed config parameter INCLUDE_TODOS_STATUS to INITIAL_MAIL_STATUS.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New features and bug fixes related to drag and drop, and to having INCLUDE_TODOS (mail items enabled).
With this change. task cards (both tasks and e-mail items) can be dragged within a column, and make the resulting order stick. This was done by setting the ToDoTaskOrdinal property of the TaskItem.
Added a new config parameter to enable or disable this feature, "USE_ORDINALS". If this is true, sorting on ordinals is forced and the other sorting config of individual columns will be ignored (it doesn't make sense to set ToDoTaskOrdinal and then sort on something else).
It is also possible to drag flagged mail items between the columns, as was suggested in #5. This is accomplished by setting the FlagRequest property. It is possible to drag it to and from the Completed column as well with expected results.
Renamed config parameter INCLUDE_TODOS_STATUS to INITIAL_MAIL_STATUS.
Fixed script errors with dragging a task item to another column, and dragging a mail item at all. Don't attempt to move tasks at all when INCLUDE_TODOS is set since all tasks come from the same "folder" in this case and it is not possible to have different subfolders when using this feature anyway. Don't attempt to set status for MailItems since that property does not exist for them.
Fixed so the buttons to add tasks work when INCLUDE_TODOS is set.
Changed default config slightly to avoid e-mails flagged as completed to appear in columns when INCLUDE_TODOS is enabled.
Some other small fixes.