Previously there was a separate permissions check for
/api/v3/versions/:id. This check at least looked like it was
inconsistent with the visible-scope.
Using the scope both for /api/v3/versions and /api/v3/versions/:id
ensures that both will return results consistent with each other.
As part of this change, the manage_versions permission was also added into
the Version.visible scope and the Version#visible? method, because it was missing so far
from those places.
In the graph widget, the default subprojectId filter is limiting the
work packages shown to the ones belonging to the version's project and
its subprojects. This is not always the desired behavior, especially
when the version is shared with other projects with 'hierarchy',
'tree', or 'system' sharing.
The fix opts for a projects filter including all visible projects for
the version when sharing is 'tree' or 'hierarchy' (which may have a
performance penalty when there are many projects), and a global scope
when sharing is 'system'.
* Add ongoing flag to time_entries
* Add timer button
* Save another timer automagically once starting a new one
* Add button_flex class to override the spot handling of buttons
* Add stop icon and use it
* Show the work package link when outside active timer work package
* Add hotwire partial in the account menu
* Add stimulus controller for timer in menu
* add the timer to the details view
* add a basic helper for the timer
* make the button inline-flex
* add a function to show elapsed time in ruby
* show timer on user menu
* add a bubble over avatar
* Implement timer icon and dropdown item in top menu
* Show a "start" button even if there is an active entry
* align items in timer menu entry
* remove stop icon
* add time tracking running icon
* add time tracking stop icon
* add time tracking start icon
* Add StopExistingTimer modal
* stop timer in user menu
* Start the next timer when saving the first one
* remove timer button from split view
* use new icons
* Hide button when no permission
* Don't save before showing edit modal for active timer
* Fix action when to cancel
* Use service method in account item
* Add spec
* Fix permission checks when user has only partial permissions
The time_entries API requires us to have log_own_time,
view_own_logged_time and edit_own_logged time to get the timer
functionality
Linting
* Allow users with only log_time to access their ongoing timers
* Fix setting new values on timer
* Allow deletion of time entry when ongoing
* Extend API docs on time entries
* remaining UI changes requested by Parimal
* Update frontend/src/stimulus/controllers/dynamic/my/timers.controller.ts
Co-authored-by: Dombi Attila <83396+dombesz@users.noreply.github.com>
* Update modules/costs/app/helpers/timer_helper.rb
Co-authored-by: Dombi Attila <83396+dombesz@users.noreply.github.com>
* Review feedback
* Show warning when timer was already stopped in other tab, and refresh before saving
* Remove TimerHelper
* Add spec to handle two parallel window timers
* Fix api spec
* Update frontend/src/app/features/work-packages/components/wp-timer-button/wp-timer-button.component.ts
* Update frontend/src/stimulus/controllers/dynamic/my/timers.controller.ts
* Simplify time formatter helper
* Use the formatElapsedTime helper in the MyTimersController as well
* Fix formatter using milliseconds
* Subscribe to initial reload
* Restrict ongoing scope to own timers
* Show warning in account timer component too
* Move timer into async again
* Correctly remove timer at all times
* Add dependency on view time entries when logging
* Linting
* Fix form link error after saving time entry
* Fix time entries spec
* Fix change detection on members
---------
Co-authored-by: bsatarnejad <b.satarnejad@gmail.com>
Co-authored-by: Dombi Attila <83396+dombesz@users.noreply.github.com>
Updates the copyright to 2021 for all files that have a copyright. Files in our source code without the copyright header still do not receive one automatically. Additionally, backlisted files are also excluded.
Previously the copyright of chiliproject which references redmine stated a copyright of redmine up to and including 2017 which is not true for the code we have in here. Because of that I changed that to 2013
Replaces reform by a simple layer of Disposable +
ActiveModel::Validations for contracts.
Additionally removes the custom error handling where OpenProject added
symbols to keep the ability to identify faulty attributes while having
non standard format (deviates from `%{attribute} %{message}`).
Changes to active record now allow us to define the format of a message
on i18n level, e.g. `%{message}`. Therefore the patching can be removed.
Reform plans to remove support for ActiveModel::Validations in version
4.0 at the latest but even today, support for it is hapazard. As we do
not need the full stack of Reform anyway, we can solely rely on
Disposable.
Uses FactoryBot to keep and maintain specific records in a special transaction that does not get removed after each spec.
They automatically are created whenever first hitting them.
This makes an excellent time saver for items that are commonly used, such as an admin user account
- Adds a null_handling option to the property columns to allow `NULLS
FIRST/LAST` to be handled
- Adds a query specific SortCriteria that can work with null_handling
- Fixes sorting of allowed_versions to reuse that sort order
https://community.openproject.com/wp/32156
This reverts commit b05a8f7b54.
The release/10 branch received a revert that was applied after changes
from dev unwillingly where merged into it. But when merging release/10.0
back into dev, that revert was also applied to dev where the changes are
indeed wanted. So we revert the revert for dev.