Compare commits

...
126 Commits
Author SHA1 Message Date
Lauri Ojansivu c62396e389 v4.92 2021-02-03 02:32:00 +02:00
Lauri Ojansivu d52e85f298 Updated ChangeLog. 2021-02-03 02:27:18 +02:00
Lauri Ojansivu 05ebae7329 Updated dependencies.
Thanks to developers of dependencies !
2021-02-03 02:25:37 +02:00
Lauri Ojansivu b697bb656e Updated ChangeLog. 2021-02-03 01:50:52 +02:00
Lauri Ojansivu 4d7de2adce Merge pull request #3523 from mfilser/notifications_overlap_avatar_mobile_view
Notifications avatar overlaped at mobile view
2021-02-03 01:49:32 +02:00
Lauri Ojansivu 8a9528e787 Updated README 2021-02-03 01:45:52 +02:00
Martin Filser 6c6cba51fa Notification trash link was not visible if actifity text is too long 2021-02-03 00:20:56 +01:00
Martin Filser 28e23f9d87 Notification, each notification has now more space at top 2021-02-02 23:07:28 +01:00
Martin Filser e31192e97e Notification, split line was missing at mobile view 2021-02-02 23:02:45 +01:00
Martin Filser 26b7137b5c Notification, Avatar overlaped at mobile view 2021-02-02 23:02:33 +01:00
Lauri Ojansivu 912200a2ec Updated ChangeLog.
Related https://github.com/wekan/wekan/discussions/3496
2021-02-02 21:12:56 +02:00
Lauri Ojansivu c42d0d7423 Merge branch 'bronger-sorted-archives' 2021-02-02 21:09:41 +02:00
Lauri Ojansivu 3da66a0fe3 Sorted archives Part 2.
Thanks to xet7 !
2021-02-02 21:08:34 +02:00
Lauri Ojansivu 41e1f8fbc3 Merge branch 'sorted-archives' of https://github.com/bronger/wekan into bronger-sorted-archives 2021-02-02 20:56:09 +02:00
Lauri Ojansivu 130ac3c917 Updated ChangeLog. 2021-02-02 20:55:25 +02:00
Lauri Ojansivu 3774060d32 Createtoken API: Added better description and deleted extra file.
Thanks to magicbelette and xet7 !

Fixes #2887
2021-02-02 20:51:41 +02:00
Lauri Ojansivu d8c8856548 Merge pull request #3520 from messagerie-melanie2/master
Add createtoken API
2021-02-02 20:48:00 +02:00
Lauri Ojansivu efec00a550 Updated ChangeLog. 2021-02-02 20:30:22 +02:00
Lauri Ojansivu 3d3cf1d551 Merge pull request #3521 from mfilser/master
Cards, CustomFields sorted alphabetically, fixes #3517
2021-02-02 20:28:35 +02:00
Lauri Ojansivu c52d17b6fb Updated translations. 2021-02-02 18:47:08 +02:00
Martin Filser c0b9ef5990 Cards, CustomFields sorted alphabetically #3517
- last fix didn't work and disabled alphabetic sorting
- also works with linked cards
2021-02-02 17:45:43 +01:00
Lauri Ojansivu e303159b98 Updated ChangeLog. 2021-02-02 18:40:12 +02:00
Lauri Ojansivu f274b3c26b Try fix removed nonexistent document error.
Thanks to xet7 !

Related #3203,
related #3252,
related #2230
related #1629
2021-02-02 18:36:21 +02:00
Lauri Ojansivu 81fdc9a865 Updated ChangeLog. 2021-02-02 18:33:23 +02:00
Lauri Ojansivu f40c9804f8 Disable some console.log code, that is only needed while developing.
Thanks to xet7 !
2021-02-02 18:31:13 +02:00
Lauri Ojansivu 4d13d51038 Updated ChangeLog. 2021-02-02 18:14:18 +02:00
magicbelette 5c4421dc38 Delete test file 2021-02-02 17:12:57 +01:00
Lauri Ojansivu 76ef6a81ab Merge pull request #3519 from jrsupplee/issue-2074
Hopeful fix for i18n not working in `onRendered()`
2021-02-02 18:07:25 +02:00
magicbelette a7b43d5b57 Add createtoken API 2021-02-02 17:06:06 +01:00
John R. Supplee e4f50d4713 Hopeful fix for i18n not working in onRendered()
* Remove the i18n initialization code from an `autorun()` block
* Add some console statements to help with debugging production.
* Add functions to `Boards` for label colors and color mapping
2021-02-02 17:56:18 +02:00
Lauri Ojansivu 1e71237627 Merge pull request #3516 from mfilser/notifications_overlap_avatar
Avatar overlaped notifications
2021-02-02 16:50:24 +02:00
Torsten Bronger 678c8f6bf6 Printed archivedAt under every item in the archive. 2021-02-02 14:52:14 +01:00
Torsten Bronger 786c27bbec Added sorting by archivedAt in the archive.
I use modifiedAt as a fall back for legacy cards which don't have archivedAt
set yet.
2021-02-02 14:52:12 +01:00
Torsten Bronger 710643d8cb Added field archivedAt to cards, lists, swimlanes, and boards. 2021-02-02 14:52:08 +01:00
Martin Filser e595aba189 Minicard, assignee and red line now aligned again 2021-02-02 09:24:26 +01:00
Martin Filser ea67e94c47 Notification, fixed avatar icon (was an ellipse) 2021-02-02 08:45:37 +01:00
Martin Filser b2c2067f7d Avatar overlaped notifications #3515 2021-02-01 18:26:18 +01:00
Lauri Ojansivu 4fc2d7b935 Updated translations. 2021-01-31 01:26:51 +02:00
Lauri Ojansivu b1b9dd208b Updated ChangeLog. 2021-01-30 20:54:54 +02:00
Lauri Ojansivu ee2f7c077f Added badge for CII Best Practices.
Thanks to CII and xet7 !
2021-01-30 20:51:36 +02:00
Lauri Ojansivu a385d6f4fd Added PGP public key for sending security vulnerability reports. 2021-01-30 20:15:52 +02:00
Lauri Ojansivu 7031b7a3c7 Updated security report email address. 2021-01-30 20:07:03 +02:00
Lauri Ojansivu 0f0a5fba1f Merge branch 'master' of github.com:wekan/wekan 2021-01-30 18:23:00 +02:00
Lauri Ojansivu 1d7af3f011 Updated translations. 2021-01-30 18:22:40 +02:00
Lauri Ojansivu 6fd85f97b3 Updated ChangeLog. 2021-01-30 18:18:54 +02:00
Lauri Ojansivu a6d17f3813 Merge pull request #3509 from jrsupplee/fix-2
Don't reload page when returning default sort
2021-01-30 18:17:39 +02:00
Lauri Ojansivu 4e830ea416 Updated ChangeLog. 2021-01-30 18:15:48 +02:00
Lauri Ojansivu fc5c936272 Merge pull request #3510 from jrsupplee/import-user-mapping
Import user mapping
2021-01-30 18:04:30 +02:00
John R. Supplee b2af684c4d JSON import: add note about unmapped members 2021-01-30 11:44:53 +02:00
John R. Supplee 0446999c63 Add new importUsernames field for import user mapping 2021-01-30 02:35:29 +02:00
John R. Supplee 6920c39752 Don't reload page when returning default sort 2021-01-29 21:09:28 +02:00
Lauri Ojansivu 62ba8ed8d8 v4.91 2021-01-29 15:16:35 +02:00
Lauri Ojansivu 6eeef96886 Updated ChangeLog. 2021-01-29 15:11:02 +02:00
Lauri Ojansivu 4acf852650 Fixed typos in docker-compose.yml.
Thanks to farfoodyou and xet7 !

Fixes #3506
2021-01-29 15:09:11 +02:00
Lauri Ojansivu 9b3f1562a5 Updated translations. 2021-01-29 14:59:37 +02:00
Lauri Ojansivu 49774e46a3 Updated ChangeLog. 2021-01-29 14:57:02 +02:00
Lauri Ojansivu ae2447393d Merge pull request #3505 from jrsupplee/new-search
Use `new RegExp(...)` to define a regex
2021-01-29 13:55:01 +02:00
John R. Supplee 3435192640 only use new RegExp(...) to define regex (not slashes) 2021-01-29 13:15:53 +02:00
John R. Supplee 6ba4da9711 Remove added backticks from regex 2021-01-28 23:42:47 +02:00
Lauri Ojansivu 010a1d07d9 v4.90 2021-01-28 19:24:10 +02:00
Lauri Ojansivu 94d09b0014 Updated translations. 2021-01-28 19:16:53 +02:00
Lauri Ojansivu d6ff442622 Updated ChangeLog. 2021-01-28 19:11:01 +02:00
Lauri Ojansivu f7cc1abc8e Merge pull request #3500 from jrsupplee/patch-5
Fix some bugs when importing Wekan JSON
2021-01-28 19:08:34 +02:00
Lauri Ojansivu bf7b1789ec Added missing backtick quotes.
Thanks to xet7 !
2021-01-28 19:01:30 +02:00
Lauri Ojansivu cf9b482546 Merge pull request #3499 from jrsupplee/patch-6
Create unique board names when importing
2021-01-28 18:58:41 +02:00
John R. Supplee ad6da9bf37 Create unique board names when importing 2021-01-28 18:21:56 +02:00
John R. Supplee d647884b91 Make sure user data is retrieved before proceeding with import 2021-01-28 18:18:31 +02:00
Lauri Ojansivu 5adaaa7f22 v4.89 2021-01-28 18:03:24 +02:00
Lauri Ojansivu 5b77543ab5 Updated ChangeLog. 2021-01-28 17:57:43 +02:00
Lauri Ojansivu 0ff215f78f Try to fix quotes in Global Search.
Thanks to xet7 !

Related https://github.com/wekan/wekan/pull/3492
2021-01-28 17:51:35 +02:00
Lauri Ojansivu ff787bb6ca v4.88 2021-01-28 16:49:20 +02:00
Lauri Ojansivu 334dfa5cb6 Added back Global Search related code that caused Snap to not build.
Thanks to xet7 !

Related https://github.com/wekan/wekan/pull/3492
2021-01-28 16:31:49 +02:00
Lauri Ojansivu a17e628872 Updated translations. 2021-01-28 16:24:17 +02:00
Lauri Ojansivu e87ce4cac5 Updated ChangeLog. 2021-01-28 13:49:39 +02:00
Lauri Ojansivu 8678e77c65 Merge pull request #3497 from robert-scheck/fix-ldap-reject-unauthorized
Repair LDAP_REJECT_UNAUTHORIZED=false (broken by commit 31f8912, fixes #3493)
2021-01-28 13:48:03 +02:00
Lauri Ojansivu 66f99f9ad7 Updated ChangeLog. 2021-01-28 13:42:18 +02:00
Lauri Ojansivu b1cdcda8ed Removed quotes from docker-compose.yml settings.
Thanks to XL-Reaper, Vinc89 and xet7 !

Related #2490
2021-01-28 13:39:48 +02:00
Robert Scheck 4c6084ab68 Repair LDAP_REJECT_UNAUTHORIZED=false (broken by commit 31f8912, fixes #3493)
Previous commit 31f89121fe happened to fix
CVE-2021-3309, but unfortunately breaks LDAP_REJECT_UNAUTHORIZED=false.
2021-01-28 11:31:50 +01:00
Lauri Ojansivu fa51ce6fb0 Update: Docker image builds at Docker Hub work. At Quay does not work.
Thanks to xet7 !
2021-01-28 10:11:42 +02:00
Lauri Ojansivu 5708954268 Updated translations. 2021-01-28 03:32:25 +02:00
Lauri Ojansivu 5f23e9caa7 Updated ChangeLog. 2021-01-28 03:24:04 +02:00
Lauri Ojansivu 37372466cc Added many more fields to Export to Excel, and better formatting. Does not yet have all fields.
Thanks to xet7 !

Related #3173
2021-01-28 03:19:35 +02:00
Lauri Ojansivu 442a7b0fcd Removed Global Search related code that caused Snap to not build.
Thanks to xet7 !

Related https://github.com/wekan/wekan/pull/3492
2021-01-28 01:29:52 +02:00
John R. Supplee 0adde3e06d Fix Wekan JSON import bug
If not all users are mapped the import crashes.
2021-01-28 00:44:48 +02:00
Lauri Ojansivu e0576502d9 Updated translations. 2021-01-27 20:23:41 +02:00
Lauri Ojansivu f8e2fe5794 Updated ChangeLog. 2021-01-27 19:14:19 +02:00
Lauri Ojansivu c10f32cc30 Merge pull request #3492 from jrsupplee/new-search
Global Search Update
2021-01-27 19:11:21 +02:00
Lauri Ojansivu feb477ca48 Updated ChangeLog. 2021-01-27 19:05:24 +02:00
Lauri Ojansivu 2d1e4e8a1d Merge branch 'master' of github.com:wekan/wekan 2021-01-27 19:03:46 +02:00
Lauri Ojansivu ef166468e9 Merge pull request #3491 from mfilser/header_quick_access-scrollbar
Mobile and Desktop have now the same Quick Access view + scrollable
2021-01-27 19:03:39 +02:00
Lauri Ojansivu e58de99d0f Updated ChangeLog. 2021-01-27 18:51:21 +02:00
Lauri Ojansivu 56c7b7a8f1 Merge pull request #3489 from sato-64bit/fix-method-to-create-initials-on-oidc
changed method to create initials same as others for new user of oidc
2021-01-27 18:50:14 +02:00
John R. Supplee 2df0a54cb8 Return CustomFields data for display on minicard 2021-01-27 17:06:57 +02:00
John R. Supplee 78a1d08a17 Bug fixes and buttons for previous and next page
* Use buttons for next and previous page in search results
* Add custom routine for stringifying and parsing the selector to JSON
so RegExp objects are preserved
2021-01-27 16:57:31 +02:00
Martin Filser 4effccf96e Header, Quick Access, show boards at mobile view 2021-01-27 12:20:21 +01:00
Martin Filser 282505cde2 Header, Quick Access, Desktop and Mobile have now the same view 2021-01-27 12:20:06 +01:00
Martin Filser d2d4c19196 Header, Scrollbar now also at desktop version if needed 2021-01-27 12:20:06 +01:00
Martin Filser e6d42f21a2 Header, improve layout at Quick Access and Notifications on mobile view 2021-01-27 12:20:06 +01:00
Martin Filser 71483e8b04 Header, Notification doesn't overlap the avatar anymore at mobile view 2021-01-27 12:20:06 +01:00
Martin Filser 54a55a4a23 Header, Home-Button is now at the left of the Quick Access and not scrolled anymore 2021-01-27 12:20:06 +01:00
Martin Filser bad4cc12b4 Header, Quick Access Navigation now scrollable 2021-01-27 12:20:06 +01:00
sato-64bit 6289acd109 changed method to create initials same as others 2021-01-27 01:43:01 +00:00
John R. Supplee 4e8fc46475 Start work on paging search results 2021-01-27 02:21:12 +02:00
Lauri Ojansivu 4bd3329d07 Updated ChangeLog. 2021-01-26 19:56:41 +02:00
Lauri Ojansivu 4163841bcf Merge pull request #3487 from tod31/tod31-url-schemes
additional URL schemes #3218
2021-01-26 19:53:54 +02:00
John R. Supplee 7ad1171c5f Merge branch 'master' of https://github.com/wekan/wekan into new-search 2021-01-26 18:41:05 +02:00
John R. Supplee 6a32424a08 Add support for searching archived cards
* Add logic to search for archived or all cards
* Add icons to board, swimlane and list titles to indicate if they are archived
* Update search instructions
2021-01-26 18:39:09 +02:00
tod31 2c30714c6f Update editor.js
add custom URL schemes for SolidWorks PDM (conisio:) and abas ERP (abasurl:)
2021-01-26 13:54:22 +01:00
tod31 aa22d4e569 Update template-integration.js
add custom URL schemes for SolidWorks PDM (conisio:) and abas ERP (abasurl:)
2021-01-26 13:50:56 +01:00
John R. Supplee a9ceba690e Translatable predicates and UTF8 RegEx support
* Add support for recognizing UTF8 operators
* Make search predicates translatable
* Add translations for Egyptian Arabic based on standard Arabic
2021-01-25 19:01:07 +02:00
John R. Supplee f2e7296d19 Remove old session data 2021-01-25 16:12:33 +02:00
John R. Supplee 20ab2f039b Send more fields to client 2021-01-25 15:55:35 +02:00
John R. Supplee 158a0807d9 Development
* Generate error when a comment text is not found
* Save errors to SessionData as objects
* Move all search code to globalSearch publication
* Add more translation tags
2021-01-25 15:39:36 +02:00
John R. Supplee 211d27352a get input value from input, not reactive var 2021-01-25 01:35:44 +02:00
John R. Supplee c66a48e530 Move call to URL search to onRendered 2021-01-25 00:07:50 +02:00
John R. Supplee 91ef8ca1ae Make results a reactive var 2021-01-24 15:38:44 +02:00
John R. Supplee 9b6288e49c Add session id SessionData 2021-01-24 12:28:36 +02:00
John R. Supplee 9eca4566bf Merge branch 'master' of https://github.com/wekan/wekan into new-search 2021-01-24 02:35:31 +02:00
John R. Supplee 907bf4ffdc Pass found cards in sessionData cursor 2021-01-24 02:32:37 +02:00
John R. Supplee dd163b9923 start work on searching in comments 2021-01-23 18:04:26 +02:00
John R. Supplee b40d53df84 Merge branch 'master' of https://github.com/wekan/wekan into new-search 2021-01-23 17:36:09 +02:00
John R. Supplee c9db8e0a26 Escape regex strings 2021-01-23 12:02:51 +02:00
John R. Supplee 591a8cd807 Merge branch 'master' of https://github.com/wekan/wekan into new-search 2021-01-23 01:35:28 +02:00
John R. Supplee 9d2bb505ae Merge branch 'master' of https://github.com/wekan/wekan into new-search 2021-01-23 00:59:18 +02:00
John R. Supplee f56caa745a Merge branch 'master' of https://github.com/wekan/wekan into new-search 2021-01-22 00:51:29 +02:00
John R. Supplee fc0ee2e41b Global search add sort operator
* Add sort operator
* add 'overdue' value to 'due' operator
2021-01-22 00:37:16 +02:00
112 changed files with 61614 additions and 55418 deletions

No files matched your search

+112
View File
@@ -1,3 +1,115 @@
# v4.92 2021-02-03 Wekan release
This release adds the following improvements:
- [Import user mapping improvements](https://github.com/wekan/wekan/pull/3510).
Thanks to jrsupplee.
- Added Createtoken API.
[Part 1](https://github.com/wekan/wekan/pull/3520),
[Part 2](https://github.com/wekan/wekan/commit/3774060d32abcfee17dc1c31958d4673794d8619).
Thanks to magicbelette and xet7.
- Sorted archives.
[Part 1](https://github.com/wekan/wekan/pull/3518),
[Part 2](https://github.com/wekan/wekan/commit/3da66a0fe30c2b54b63e5d098232b375d899925e).
Thanks to bronger, jrsupplee and xet7.
and adds the following updates:
- [Updated dependencies](https://github.com/wekan/wekan/commit/05ebae7329ba0dd3fe9b04cd63b1f983830cdeee).
Thanks to developers of dependencies.
and fixes the following bugs:
- [Don't reload page when returning default sort](https://github.com/wekan/wekan/pull/3509).
Thanks to jrsupplee.
- [Avatar overlaped notifications](https://github.com/wekan/wekan/pull/3516).
Thanks to mfilser.
- [Hopeful fix for i18n not working in `onRendered()`](https://github.com/wekan/wekan/pull/3519).
Thanks to jrsupplee.
- [Disable some console.log code, that is only needed while developing](https://github.com/wekan/wekan/commit/f40c9804f848fdb91229c5718ad97495337109ba).
Thanks to xet7.
- [Try fix removed nonexistent document error](https://github.com/wekan/wekan/commit/f274b3c26be60813829dcf2b0e68a8dd876ff614).
Thanks to Brulf, TheMasterFX and xet7.
- [Fixed Cards and CustomFields sorted alphabetically](https://github.com/wekan/wekan/pull/3521).
Thanks to mfilser.
- [Notifications avatar overlaped at mobile view](https://github.com/wekan/wekan/pull/3523).
Thanks to mfilser.
and improves some security related info:
- [Added badge for CII Best Practices](https://github.com/wekan/wekan/commit/ee2f7c077fe56d6fedb8b75ae3cba6bab56f9363).
Thanks to CII and xet7.
- [Added PGP public key for sending security vulnerability reports](https://github.com/wekan/wekan/commit/a385d6f4fd76e2bb0f374963848513b9373d6b5a).
Thanks to xet7.
- [Updated security report email address](https://github.com/wekan/wekan/commit/7031b7a3c77acc0ddeabe436572dd4057001e9f5).
Thanks to xet7.
Thanks to above GitHub users for their contributions and translators for their translations.
# v4.91 2021-01-29 Wekan release
This release fixes the following bugs:
- [Use `new RegExp(...)` to define a regex](https://github.com/wekan/wekan/pull/3505).
Thanks to jrsupplee.
- [Fixed typos in docker-compose.yml](https://github.com/wekan/wekan/commit/4acf8526509ffe852e6e48e3503560448239d8cd).
Thanks to farfoodyou and xet7.
Thanks to above GitHub users for their contributions and translators for their translations.
# v4.90 2021-01-28 Wekan release
This release adds the following new features:
- [Create unique board names when importing](https://github.com/wekan/wekan/pull/3499).
Thanks to jrsupplee.
and fixes the following bugs:
- [Added missing backtick quotes](https://github.com/wekan/wekan/commit/bf7b1789ec16e3c52397318c799ec5a0fc2de3a5).
Thanks to xet7.
- [Fix some bugs when importing Wekan JSON](https://github.com/wekan/wekan/pull/3500).
Thanks to jrsupplee.
Thanks to above GitHub users for their contributions and translators for their translations.
# v4.89 2021-01-28 Wekan release
This release fixes the following bugs:
- [Try to fix quotes in Global Search](https://github.com/wekan/wekan/commit/0ff215f78f03c81d153dfc0ffa08fac94b542ec2).
Thanks to xet7.
Thanks to above GitHub users for their contributions and translators for their translations.
# v4.88 2021-01-28 Wekan release
This release adds the following new features:
- [Additional URL schemes: SolidWorks PDM (conisio:) and abas ERP (abasurl:)](https://github.com/wekan/wekan/pull/3487).
Thanks to tod31.
and adds the following improvements:
- [Mobile and Desktop have now the same Quick Access view + scrollable](https://github.com/wekan/wekan/pull/3491).
Thanks to mfilser.
- [Global Search Update](https://github.com/wekan/wekan/pull/3492).
Thanks to jrsupplee.
- [Added many more fields to Export to Excel, and better formatting. Does not yet have all
fields](https://github.com/wekan/wekan/commit/37372466ccd15c7d5d4a55510b349fac0953c425).
Thanks to xet7.
and fixes the following bugs:
- [Changed method to create initials same as others for new user of oidc](https://github.com/wekan/wekan/pull/3489).
Thanks to sato-64bit.
- [Removed quotes from docker-compose.yml settings](https://github.com/wekan/wekan/commit/b1cdcda8ed78d48505a8da5180d7aed46a24fd64).
Thanks to XL-Reaper, Vinc89 and xet7.
- [Repair LDAP_REJECT_UNAUTHORIZED=false CVE-2021-3309](https://github.com/wekan/wekan/pull/3497).
Thanks to robert-scheck.
Thanks to above GitHub users for their contributions and translators for their translations.
# v4.87 2021-01-26 Wekan release
This release fixes the following bugs:
+1
View File
@@ -12,6 +12,7 @@
[![Project Dependencies](https://david-dm.org/wekan/wekan.svg "Project Dependencies")](https://david-dm.org/wekan/wekan)
[![Code analysis at Open Hub](https://img.shields.io/badge/code%20analysis-at%20Open%20Hub-brightgreen.svg "Code analysis at Open Hub")](https://www.openhub.net/p/wekan)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fwekan%2Fwekan.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fwekan%2Fwekan?ref=badge_shield)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/4619/badge)](https://bestpractices.coreinfrastructure.org/projects/4619)
## [Translate Wekan at Transifex](https://transifex.com/wekan/wekan)
+3 -3
View File
@@ -1,10 +1,10 @@
Security is very important to us. If you discover any issue regarding security, please disclose
the information responsibly by sending an email to security (at) wekan.team and not by
the information responsibly by sending an email to support (at) wekan.team using
[this PGP public key](support-at-wekan.team_pgp-publickey.asc) and not by
creating a GitHub issue. We will respond swiftly to fix verifiable security issues.
We thank you with a place at our hall of fame page, that is
at https://wekan.github.io/hall-of-fame . Others have just posted public GitHub issue,
so they are not at that hall-of-fame page.
at https://wekan.github.io/hall-of-fame
## How should reports be formatted?
+1 -1
View File
@@ -1,5 +1,5 @@
appId: wekan-public/apps/77b94f60-dec9-0136-304e-16ff53095928
appVersion: "v4.87.0"
appVersion: "v4.92.0"
files:
userUploads:
- README.md
+1 -1
View File
@@ -11,7 +11,7 @@ BlazeComponent.extendComponent({
return Boards.find(
{ archived: true },
{
sort: { sort: 1 /* boards default sorting */ },
sort: { archivedAt: -1, modifiedAt: -1 },
},
);
},
+1 -1
View File
@@ -129,7 +129,7 @@ BlazeComponent.extendComponent({
{
sort: Boards.find({ archived: false }).count(),
type: 'board',
title: Boards.findOne(this.currentData()._id).copyTitle(),
title: Boards.findOne(this.currentData()._id).title,
},
(err, res) => {
if (err) {
+1
View File
@@ -176,6 +176,7 @@
border-radius: 50%
height: 28px
width: @height
margin: 0px 0px 4px 0px
.assignee
float: right
+15 -6
View File
@@ -5,19 +5,28 @@ template(name="resultCard")
//= card.title
ul.result-card-context-list
li.result-card-context(title="{{_ 'board'}}")
+viewer
= getBoard.title
.result-card-block-wrapper
+viewer
= getBoard.title
if getBoard.archived
i.fa.fa-archive
li.result-card-context.result-card-context-separator
= ' '
| {{_ 'context-separator'}}
= ' '
li.result-card-context(title="{{_ 'swimlane'}}")
+viewer
= getSwimlane.title
.result-card-block-wrapper
+viewer
= getSwimlane.title
if getSwimlane.archived
i.fa.fa-archive
li.result-card-context.result-card-context-separator
= ' '
| {{_ 'context-separator'}}
= ' '
li.result-card-context(title="{{_ 'list'}}")
+viewer
= getList.title
.result-card-block-wrapper
+viewer
= getList.title
if getList.archived
i.fa.fa-archive
+3
View File
@@ -19,3 +19,6 @@
.result-card-context-list
margin-bottom: 0.7rem
.result-card-block-wrapper
display: inline-block
+32 -27
View File
@@ -13,38 +13,43 @@ template(name="import")
template(name="importTextarea")
form
p: label(for='import-textarea') {{_ instruction}} {{_ 'import-board-instruction-about-errors'}}
textarea.js-import-json(placeholder="{{_ importPlaceHolder}}" autofocus)
textarea.js-import-json(id='import-textarea' placeholder="{{_ importPlaceHolder}}" autofocus)
| {{jsonText}}
input.primary.wide(type="submit" value="{{_ 'import'}}")
template(name="importMapMembers")
h2 {{_ 'import-map-members'}}
.map-members
p {{_ 'import-members-map'}}
.mapping-list
each members
a.mapping-item.js-select-member(class="{{#if wekanId}}filled{{/if}}")
.profile-source
.full-name= fullName
.username
| ({{username}})
.wekan
if wekanId
+userAvatar(userId=wekanId)
else
a.member.add-member
i.fa.fa-plus
//-
Due to the way the flewbox layout is working, we need to set some
invisible items so that the last row items have a consistent width.
See http://jsfiddle.net/Ln4h3c4n/ for an minimal example of the issue.
.mapping-item.ghost-item
.mapping-item.ghost-item
.mapping-item.ghost-item
.mapping-item.ghost-item
.mapping-item.ghost-item
form
input.primary.wide(type="submit" value="{{_ 'done'}}")
if usersLoaded.get
.map-members
p {{_ 'import-members-map'}}
p.import-members-map-note
| {{_ 'import-members-map-note' }}
.mapping-list
each members
a.mapping-item.js-select-member(class="{{#if wekanId}}filled{{/if}}")
.profile-source
.full-name= fullName
.username
| ({{username}})
.wekan
if wekanId
+userAvatar(userId=wekanId)
else
a.member.add-member
i.fa.fa-plus
//-
Due to the way the flewbox layout is working, we need to set some
invisible items so that the last row items have a consistent width.
See http://jsfiddle.net/Ln4h3c4n/ for an minimal example of the issue.
.mapping-item.ghost-item
.mapping-item.ghost-item
.mapping-item.ghost-item
.mapping-item.ghost-item
.mapping-item.ghost-item
form
input.primary.wide(type="submit" value="{{_ 'done'}}")
else
+spinner
template(name="importMapMembersAddPopup")
.select-member
+33 -5
View File
@@ -150,14 +150,42 @@ BlazeComponent.extendComponent({
BlazeComponent.extendComponent({
onCreated() {
this.usersLoaded = new ReactiveVar(false);
this.autorun(() => {
this.parentComponent()
.membersToMap.get()
.forEach(({ wekanId }) => {
if (wekanId) {
this.subscribe('user-miniprofile', wekanId);
const handle = this.subscribe(
'user-miniprofile',
this.members().map(member => {
return member.username;
}),
);
Tracker.nonreactive(() => {
Tracker.autorun(() => {
if (
handle.ready() &&
!this.usersLoaded.get() &&
this.members().length
) {
this._refreshMembers(
this.members().map(member => {
if (!member.wekanId) {
let user = Users.findOne({ username: member.username });
if (!user) {
user = Users.findOne({ importUsernames: member.username });
}
if (user) {
// eslint-disable-next-line no-console
// console.log('found username:', user.username);
member.wekanId = user._id;
}
}
return member;
}),
);
}
this.usersLoaded.set(handle.ready());
});
});
});
},
+4
View File
@@ -47,3 +47,7 @@
a.show-mapping
text-decoration underline
.import-members-map-note
font-size: 90%
font-weight: bold
+1 -1
View File
@@ -60,7 +60,7 @@ BlazeComponent.extendComponent({
dueCardsView() {
// eslint-disable-next-line no-console
console.log('sort:', Utils.dueCardsView());
//console.log('sort:', Utils.dueCardsView());
return Utils.dueCardsView();
},
+2
View File
@@ -278,6 +278,8 @@ function mySafeAttrValue(tag, name, value, cssFilter) {
/^aodroplink:/gi.test(value) ||
/^onenote:/gi.test(value) ||
/^file:/gi.test(value) ||
/^abasurl:/gi.test(value) ||
/^conisio:/gi.test(value) ||
/^mailspring:/gi.test(value)
) {
return value;
+12 -2
View File
@@ -30,13 +30,23 @@ template(name="globalSearch")
div
each msg in errorMessages
span.global-search-error-messages
| {{_ msg.tag msg.value }}
= msg
else
h1
= resultsHeading.get
a.fa.fa-link(title="{{_ 'link-to-search' }}" href="{{ getSearchHref }}")
each card in results
each card in results.get
+resultCard(card)
table.global-search-footer
tr
td.global-search-previous-page
if hasPreviousPage.get
button.js-previous-page
| {{_ 'previous-page' }}
td.global-search-next-page(align="right")
if hasNextPage.get
button.js-next-page
| {{_ 'next-page' }}
else
.global-search-instructions
h2 {{_ 'boards' }}
+299 -119
View File
@@ -45,19 +45,16 @@ BlazeComponent.extendComponent({
this.myLists = new ReactiveVar([]);
this.myLabelNames = new ReactiveVar([]);
this.myBoardNames = new ReactiveVar([]);
this.results = new ReactiveVar([]);
this.hasNextPage = new ReactiveVar(false);
this.hasPreviousPage = new ReactiveVar(false);
this.queryParams = null;
this.parsingErrors = [];
this.resultsCount = 0;
this.totalHits = 0;
this.queryErrors = null;
this.colorMap = null;
// this.colorMap = {};
// for (const color of Boards.simpleSchema()._schema['labels.$.color']
// .allowedValues) {
// this.colorMap[TAPi18n.__(`color-${color}`)] = color;
// }
// // eslint-disable-next-line no-console
// console.log('colorMap:', this.colorMap);
this.resultsPerPage = 25;
Meteor.call('myLists', (err, data) => {
if (!err) {
@@ -80,6 +77,13 @@ BlazeComponent.extendComponent({
onRendered() {
Meteor.subscribe('setting');
// eslint-disable-next-line no-console
//console.log('lang:', TAPi18n.getLanguage());
this.colorMap = Boards.colorMap();
// eslint-disable-next-line no-console
// console.log('colorMap:', this.colorMap);
if (Session.get('globalQuery')) {
this.searchAllBoards(Session.get('globalQuery'));
}
@@ -87,6 +91,7 @@ BlazeComponent.extendComponent({
resetSearch() {
this.searching.set(false);
this.results.set([]);
this.hasResults.set(false);
this.hasQueryErrors.set(false);
this.resultsHeading.set('');
@@ -96,79 +101,83 @@ BlazeComponent.extendComponent({
this.queryErrors = null;
},
results() {
getSessionData() {
return SessionData.findOne({
userId: Meteor.userId(),
sessionId: SessionData.getSessionId(),
});
},
getResults() {
// eslint-disable-next-line no-console
// console.log('getting results');
if (this.queryParams) {
const results = Cards.globalSearch(this.queryParams);
this.queryErrors = results.errors;
const sessionData = this.getSessionData();
// eslint-disable-next-line no-console
// console.log('errors:', this.queryErrors);
if (this.errorMessages().length) {
// console.log('selector:', sessionData.getSelector());
// console.log('session data:', sessionData);
const cards = Cards.find({ _id: { $in: sessionData.cards } });
this.queryErrors = sessionData.errors;
if (this.queryErrors.length) {
this.hasQueryErrors.set(true);
return null;
}
if (results.cards) {
const sessionData = SessionData.findOne({ userId: Meteor.userId() });
if (cards) {
this.totalHits = sessionData.totalHits;
this.resultsCount = results.cards.count();
this.resultsCount = cards.count();
this.resultsStart = sessionData.lastHit - this.resultsCount + 1;
this.resultsEnd = sessionData.lastHit;
this.resultsHeading.set(this.getResultsHeading());
return results.cards;
this.results.set(cards);
this.hasNextPage.set(sessionData.lastHit < sessionData.totalHits);
this.hasPreviousPage.set(
sessionData.lastHit - sessionData.resultsCount > 0,
);
}
}
this.resultsCount = 0;
return [];
return null;
},
errorMessages() {
const messages = [];
if (this.queryErrors) {
this.queryErrors.notFound.boards.forEach(board => {
messages.push({ tag: 'board-title-not-found', value: board });
});
this.queryErrors.notFound.swimlanes.forEach(swim => {
messages.push({ tag: 'swimlane-title-not-found', value: swim });
});
this.queryErrors.notFound.lists.forEach(list => {
messages.push({ tag: 'list-title-not-found', value: list });
});
this.queryErrors.notFound.labels.forEach(label => {
const color = Object.entries(this.colorMap)
.filter(value => value[1] === label)
.map(value => value[0]);
if (color.length) {
messages.push({
tag: 'label-color-not-found',
value: color[0],
});
} else {
messages.push({ tag: 'label-not-found', value: label });
}
});
this.queryErrors.notFound.users.forEach(user => {
messages.push({ tag: 'user-username-not-found', value: user });
});
this.queryErrors.notFound.members.forEach(user => {
messages.push({ tag: 'user-username-not-found', value: user });
});
this.queryErrors.notFound.assignees.forEach(user => {
messages.push({ tag: 'user-username-not-found', value: user });
});
if (this.parsingErrors.length) {
return this.parsingErrorMessages();
}
return this.queryErrorMessages();
},
parsingErrorMessages() {
const messages = [];
if (this.parsingErrors.length) {
this.parsingErrors.forEach(err => {
messages.push(err);
messages.push(TAPi18n.__(err.tag, err.value));
});
}
return messages;
},
queryErrorMessages() {
messages = [];
this.queryErrors.forEach(err => {
let value = err.color ? TAPi18n.__(`color-${err.value}`) : err.value;
if (!value) {
value = err.value;
}
messages.push(TAPi18n.__(err.tag, value));
});
return messages;
},
searchAllBoards(query) {
query = query.trim();
// eslint-disable-next-line no-console
//console.log('query:', query);
this.query.set(query);
this.resetSearch();
@@ -177,23 +186,21 @@ BlazeComponent.extendComponent({
return;
}
// eslint-disable-next-line no-console
// console.log('query:', query);
this.searching.set(true);
if (!this.colorMap) {
this.colorMap = {};
for (const color of Boards.simpleSchema()._schema['labels.$.color']
.allowedValues) {
this.colorMap[TAPi18n.__(`color-${color}`)] = color;
}
}
const reOperator1 = /^((?<operator>\w+):|(?<abbrev>[#@]))(?<value>\w+)(\s+|$)/;
const reOperator2 = /^((?<operator>\w+):|(?<abbrev>[#@]))(?<quote>["']*)(?<value>.*?)\k<quote>(\s+|$)/;
const reText = /^(?<text>\S+)(\s+|$)/;
const reQuotedText = /^(?<quote>["'])(?<text>\w+)\k<quote>(\s+|$)/;
const reOperator1 = new RegExp(
'^((?<operator>[\\p{Letter}\\p{Mark}]+):|(?<abbrev>[#@]))(?<value>[\\p{Letter}\\p{Mark}]+)(\\s+|$)',
'iu',
);
const reOperator2 = new RegExp(
'^((?<operator>[\\p{Letter}\\p{Mark}]+):|(?<abbrev>[#@]))(?<quote>["\']*)(?<value>.*?)\\k<quote>(\\s+|$)',
'iu',
);
const reText = new RegExp('^(?<text>\\S+)(\\s+|$)', 'u');
const reQuotedText = new RegExp(
'^(?<quote>["\'])(?<text>.*?)\\k<quote>(\\s+|$)',
'u',
);
const operators = {
'operator-board': 'boards',
@@ -210,20 +217,53 @@ BlazeComponent.extendComponent({
'operator-member-abbrev': 'members',
'operator-assignee': 'assignees',
'operator-assignee-abbrev': 'assignees',
'operator-is': 'is',
'operator-status': 'status',
'operator-due': 'dueAt',
'operator-created': 'createdAt',
'operator-modified': 'modifiedAt',
'operator-comment': 'comments',
};
const operatorMap = {};
for (const op in operators) {
operatorMap[TAPi18n.__(op).toLowerCase()] = operators[op];
}
const predicates = {
due: {
'predicate-overdue': 'overdue',
},
durations: {
'predicate-week': 'week',
'predicate-month': 'month',
'predicate-quarter': 'quarter',
'predicate-year': 'year',
},
status: {
'predicate-archived': 'archived',
'predicate-all': 'all',
'predicate-ended': 'ended',
},
sorts: {
'predicate-due': 'dueAt',
'predicate-created': 'createdAt',
'predicate-modified': 'modifiedAt',
},
};
const predicateTranslations = {};
Object.entries(predicates).forEach(([category, catPreds]) => {
predicateTranslations[category] = {};
Object.entries(catPreds).forEach(([tag, value]) => {
predicateTranslations[category][TAPi18n.__(tag)] = value;
});
});
// eslint-disable-next-line no-console
console.log('operatorMap:', operatorMap);
// console.log('predicateTranslations:', predicateTranslations);
const operatorMap = {};
Object.entries(operators).forEach(([key, value]) => {
operatorMap[TAPi18n.__(key).toLowerCase()] = value;
});
// eslint-disable-next-line no-console
// console.log('operatorMap:', operatorMap);
const params = {
limit: this.resultsPerPage,
boards: [],
swimlanes: [],
lists: [],
@@ -231,10 +271,11 @@ BlazeComponent.extendComponent({
members: [],
assignees: [],
labels: [],
is: [],
status: [],
dueAt: null,
createdAt: null,
modifiedAt: null,
comments: [],
};
let text = '';
@@ -253,50 +294,76 @@ BlazeComponent.extendComponent({
if (m.groups.operator) {
op = m.groups.operator.toLowerCase();
} else {
op = m.groups.abbrev;
op = m.groups.abbrev.toLowerCase();
}
if (op !== '__proto__') {
if (op in operatorMap) {
let value = m.groups.value;
if (operatorMap[op] === 'labels') {
if (value in this.colorMap) {
value = this.colorMap[value];
}
} else if (
['dueAt', 'createdAt', 'modifiedAt'].includes(operatorMap[op])
) {
const days = parseInt(value, 10);
if (isNaN(days)) {
if (
['day', 'week', 'month', 'quarter', 'year'].includes(value)
) {
value = moment()
.subtract(1, value)
.format();
} else {
this.parsingErrors.push({
tag: 'operator-number-expected',
value: { operator: op, value },
});
value = null;
}
if (operatorMap.hasOwnProperty(op)) {
let value = m.groups.value;
if (operatorMap[op] === 'labels') {
if (value in this.colorMap) {
value = this.colorMap[value];
// console.log('found color:', value);
}
} else if (
['dueAt', 'createdAt', 'modifiedAt'].includes(operatorMap[op])
) {
let days = parseInt(value, 10);
let duration = null;
if (isNaN(days)) {
if (predicateTranslations.durations[value]) {
duration = predicateTranslations.durations[value];
value = moment();
} else if (predicateTranslations.due[value] === 'overdue') {
value = moment();
duration = 'days';
days = 0;
} else {
value = moment()
.subtract(days, 'days')
this.parsingErrors.push({
tag: 'operator-number-expected',
value: { operator: op, value },
});
value = null;
}
} else {
value = moment();
}
if (value) {
if (operatorMap[op] === 'dueAt') {
value = value.add(days, duration ? duration : 'days').format();
} else {
value = value
.subtract(days, duration ? duration : 'days')
.format();
}
}
if (Array.isArray(params[operatorMap[op]])) {
params[operatorMap[op]].push(value);
} else if (operatorMap[op] === 'sort') {
if (!predicateTranslations.sorts[value]) {
this.parsingErrors.push({
tag: 'operator-sort-invalid',
value,
});
} else {
params[operatorMap[op]] = value;
value = predicateTranslations.sorts[value];
}
} else if (operatorMap[op] === 'status') {
if (!predicateTranslations.status[value]) {
this.parsingErrors.push({
tag: 'operator-status-invalid',
value,
});
} else {
value = predicateTranslations.status[value];
}
} else {
this.parsingErrors.push({
tag: 'operator-unknown-error',
value: op,
});
}
if (Array.isArray(params[operatorMap[op]])) {
params[operatorMap[op]].push(value);
} else {
params[operatorMap[op]] = value;
}
} else {
this.parsingErrors.push({
tag: 'operator-unknown-error',
value: op,
});
}
continue;
}
@@ -320,15 +387,83 @@ BlazeComponent.extendComponent({
params.text = text;
// eslint-disable-next-line no-console
// console.log('params:', params);
console.log('params:', params);
this.queryParams = params;
if (this.parsingErrors.length) {
this.searching.set(false);
this.queryErrors = this.parsingErrorMessages();
this.hasResults.set(true);
this.hasQueryErrors.set(true);
return;
}
this.autorun(() => {
const handle = subManager.subscribe('globalSearch', params);
const handle = Meteor.subscribe(
'globalSearch',
SessionData.getSessionId(),
params,
);
Tracker.nonreactive(() => {
Tracker.autorun(() => {
if (handle.ready()) {
this.getResults();
this.searching.set(false);
this.hasResults.set(true);
}
});
});
});
},
nextPage() {
sessionData = this.getSessionData();
const params = {
limit: this.resultsPerPage,
selector: sessionData.getSelector(),
skip: sessionData.lastHit,
};
this.autorun(() => {
const handle = Meteor.subscribe(
'globalSearch',
SessionData.getSessionId(),
params,
);
Tracker.nonreactive(() => {
Tracker.autorun(() => {
if (handle.ready()) {
this.getResults();
this.searching.set(false);
this.hasResults.set(true);
}
});
});
});
},
previousPage() {
sessionData = this.getSessionData();
const params = {
limit: this.resultsPerPage,
selector: sessionData.getSelector(),
skip:
sessionData.lastHit - sessionData.resultsCount - this.resultsPerPage,
};
this.autorun(() => {
const handle = Meteor.subscribe(
'globalSearch',
SessionData.getSessionId(),
params,
);
Tracker.nonreactive(() => {
Tracker.autorun(() => {
if (handle.ready()) {
this.getResults();
this.searching.set(false);
this.hasResults.set(true);
}
@@ -347,8 +482,8 @@ BlazeComponent.extendComponent({
}
return TAPi18n.__('n-n-of-n-cards-found', {
start: 1,
end: this.resultsCount,
start: this.resultsStart,
end: this.resultsEnd,
total: this.totalHits,
});
},
@@ -363,6 +498,7 @@ BlazeComponent.extendComponent({
operator_board: TAPi18n.__('operator-board'),
operator_list: TAPi18n.__('operator-list'),
operator_swimlane: TAPi18n.__('operator-swimlane'),
operator_comment: TAPi18n.__('operator-comment'),
operator_label: TAPi18n.__('operator-label'),
operator_label_abbrev: TAPi18n.__('operator-label-abbrev'),
operator_user: TAPi18n.__('operator-user'),
@@ -371,6 +507,18 @@ BlazeComponent.extendComponent({
operator_member_abbrev: TAPi18n.__('operator-member-abbrev'),
operator_assignee: TAPi18n.__('operator-assignee'),
operator_assignee_abbrev: TAPi18n.__('operator-assignee-abbrev'),
operator_due: TAPi18n.__('operator-due'),
operator_created: TAPi18n.__('operator-created'),
operator_modified: TAPi18n.__('operator-modified'),
operator_status: TAPi18n.__('operator-status'),
predicate_overdue: TAPi18n.__('predicate-overdue'),
predicate_archived: TAPi18n.__('predicate-archived'),
predicate_all: TAPi18n.__('predicate-all'),
predicate_ended: TAPi18n.__('predicate-ended'),
predicate_week: TAPi18n.__('predicate-week'),
predicate_month: TAPi18n.__('predicate-month'),
predicate_quarter: TAPi18n.__('predicate-quarter'),
predicate_year: TAPi18n.__('predicate-year'),
};
text = `# ${TAPi18n.__('globalSearch-instructions-heading')}`;
@@ -388,6 +536,10 @@ BlazeComponent.extendComponent({
'globalSearch-instructions-operator-swimlane',
tags,
)}`;
text += `\n* ${TAPi18n.__(
'globalSearch-instructions-operator-comment',
tags,
)}`;
text += `\n* ${TAPi18n.__(
'globalSearch-instructions-operator-label',
tags,
@@ -409,11 +561,27 @@ BlazeComponent.extendComponent({
'globalSearch-instructions-operator-assignee',
tags,
)}`;
text += `\n* ${TAPi18n.__('globalSearch-instructions-operator-due', tags)}`;
text += `\n* ${TAPi18n.__(
'globalSearch-instructions-operator-created',
tags,
)}`;
text += `\n* ${TAPi18n.__(
'globalSearch-instructions-operator-modified',
tags,
)}`;
text += `\n* ${TAPi18n.__(
'globalSearch-instructions-status-archived',
tags,
)}`;
text += `\n* ${TAPi18n.__('globalSearch-instructions-status-all', tags)}`;
text += `\n* ${TAPi18n.__('globalSearch-instructions-status-ended', tags)}`;
text += `\n## ${TAPi18n.__('heading-notes')}`;
text += `\n* ${TAPi18n.__('globalSearch-instructions-notes-1', tags)}`;
text += `\n* ${TAPi18n.__('globalSearch-instructions-notes-2', tags)}`;
text += `\n* ${TAPi18n.__('globalSearch-instructions-notes-3', tags)}`;
text += `\n* ${TAPi18n.__('globalSearch-instructions-notes-3-2', tags)}`;
text += `\n* ${TAPi18n.__('globalSearch-instructions-notes-4', tags)}`;
text += `\n* ${TAPi18n.__('globalSearch-instructions-notes-5', tags)}`;
@@ -435,10 +603,19 @@ BlazeComponent.extendComponent({
evt.preventDefault();
this.searchAllBoards(evt.target.searchQuery.value);
},
'click .js-next-page'(evt) {
evt.preventDefault();
this.nextPage();
},
'click .js-previous-page'(evt) {
evt.preventDefault();
this.previousPage();
},
'click .js-label-color'(evt) {
evt.preventDefault();
const input = document.getElementById('global-search-input');
this.query.set(
`${this.query.get()} ${TAPi18n.__('operator-label')}:"${
`${input.value} ${TAPi18n.__('operator-label')}:"${
evt.currentTarget.textContent
}"`,
);
@@ -446,8 +623,9 @@ BlazeComponent.extendComponent({
},
'click .js-board-title'(evt) {
evt.preventDefault();
const input = document.getElementById('global-search-input');
this.query.set(
`${this.query.get()} ${TAPi18n.__('operator-board')}:"${
`${input.value} ${TAPi18n.__('operator-board')}:"${
evt.currentTarget.textContent
}"`,
);
@@ -455,8 +633,9 @@ BlazeComponent.extendComponent({
},
'click .js-list-title'(evt) {
evt.preventDefault();
const input = document.getElementById('global-search-input');
this.query.set(
`${this.query.get()} ${TAPi18n.__('operator-list')}:"${
`${input.value} ${TAPi18n.__('operator-list')}:"${
evt.currentTarget.textContent
}"`,
);
@@ -464,8 +643,9 @@ BlazeComponent.extendComponent({
},
'click .js-label-name'(evt) {
evt.preventDefault();
const input = document.getElementById('global-search-input');
this.query.set(
`${this.query.get()} ${TAPi18n.__('operator-label')}:"${
`${input.value} ${TAPi18n.__('operator-label')}:"${
evt.currentTarget.textContent
}"`,
);
+12
View File
@@ -104,3 +104,15 @@ code
.list-title
background-color: darkgray
.global-search-footer
border: none
width: 100%
.global-search-next-page
border: none
text-align: right;
.global-search-previous-page
border: none
text-align: left;
+13 -10
View File
@@ -7,16 +7,21 @@ template(name="header")
if currentUser
#header-quick-access(class=currentBoard.colorClass)
if isMiniScreen
ul
li
a(href="{{pathFor 'home'}}")
span.fa.fa-home
span
a(href="{{pathFor 'home'}}")
span.fa.fa-home
ul
if currentList
each currentBoard.lists
li(class="{{#if $.Session.equals 'currentList' _id}}current{{/if}}")
a.js-select-list
= title
else
each currentUser.starredBoards
li(class="{{#if $.Session.equals 'currentBoard' _id}}current{{/if}}")
a(href="{{pathFor 'board' id=_id slug=slug}}")
= title
#header-new-board-icon
else
//-
@@ -32,18 +37,16 @@ template(name="header")
img(src="{{currentSetting.customTopLeftCornerLogoImageUrl}}" height="{{#if currentSetting.customTopLeftCornerLogoHeight}}#{currentSetting.customTopLeftCornerLogoHeight}{{else}}27{{/if}}" width="auto" margin="0" padding="0")
unless currentSetting.customTopLeftCornerLogoImageUrl
img(src="{{pathFor '/logo-header.png'}}" alt="")
span
a(href="{{pathFor 'home'}}")
span.fa.fa-home
| {{_ 'all-boards'}}
ul
li
a(href="{{pathFor 'home'}}")
span.fa.fa-home
| {{_ 'all-boards'}}
li.separator -
//li
// a(href="{{pathFor 'public'}}")
// span.fa.fa-globe
// | {{_ 'public'}}
each currentUser.starredBoards
li.separator -
li(class="{{#if $.Session.equals 'currentBoard' _id}}current{{/if}}")
a(href="{{pathFor 'board' id=_id slug=slug}}")
= title
+18 -16
View File
@@ -100,6 +100,7 @@
font-size: 12px
display: flex
z-index: 21
padding: 10px 0px
#header-user-bar,
#header-new-board-icon,
@@ -114,15 +115,22 @@
ul
transition: opacity 0.2s
margin: 4px 0 0 5px
overflow: hidden
overflow-x: auto
overflow-y: hidden
white-space: nowrap
padding: 10px
margin: -10px
li
display: block
float: left
display: inline
width: auto
color: darken(white, 15%)
padding: 2px 5px 0
padding: 12px 0px
margin: -10px 0px
a
padding: 12px 10px
margin: -10px 0px
&.current
color: darken(white, 5%)
@@ -186,37 +194,31 @@
#header-quick-access
transition: background-color 0.4s
width: 100%
padding: 10px 0px
z-index: 30
ul
width: calc(100% - 60px)
overflow: ellipsis
padding: 10px
margin: -10px
margin-right: 10px
li
height: 100%
padding: 12px 0px
margin: -10px 0px
a
height: 100%
padding: 12px 10px
margin: -10px 0px
.fa-home
span
.fa-home
font-size: 26px
margin-top: -2px
margin-right: 20px
#header-new-board-icon
display: none
#header-user-bar
position: absolute
right: 0px
padding: 10px
margin: -10px 0 -10px -10px
margin: -8px 0 -10px -10px
.announcement .viewer
display: inline-block
@@ -5,7 +5,7 @@
.notification
display: flex
float: none
padding: 12px 8px 8px
padding: 15px 8px 8px
color: black
border-bottom: 1px solid #dbdbdb
@@ -14,6 +14,7 @@
.read-status
width: 30px
padding: 0px 10px 0px 0px
input
width: 24px
@@ -28,13 +29,19 @@
color: #bbb
.details
width: calc(100% - 30px)
.activity
display: flex
a.member
margin: 0px 0px 0px 0px
padding: 0px
svg
padding: 3px
.activity-desc
width: 100%;
margin: 0px 0px 0px 5px
.activity-comment
display: block
@@ -55,3 +62,14 @@
.remove
a:hover
color #eb4646 !important
@media screen and (max-width: 800px)
#notifications-drawer
.notification
height: auto
.details
.activity
a.member
height: 36px
width: 36px
@@ -2,7 +2,7 @@ belize = #2980b9
section#notifications-drawer
position: fixed
top: 28px
top: 48px
right: 0
width: 400px
background-color: #fafafa
@@ -17,7 +17,7 @@ section#notifications-drawer
.header
position: fixed
top 28px
top 48px
right 0
width calc(400px - 32px)
padding: 8px 16px
@@ -63,7 +63,7 @@ section#notifications-drawer
ul.notifications
display: block
padding: 0px 16px
padding: 0px 16px 0px 16px
margin: 0
height: calc(100vh - 102px)
height: calc(100vh - 122px)
overflow-y: scroll
@@ -110,6 +110,7 @@ template(name="peopleGeneral")
th {{_ 'createdAt'}}
th {{_ 'active'}}
th {{_ 'authentication-method'}}
th {{_ 'import-usernames'}}
th
+newUserRow
each user in peopleList
@@ -257,6 +258,10 @@ template(name="peopleRow")
td <s>{{_ userData.authenticationMethod }}</s>
else
td {{_ userData.authenticationMethod }}
if userData.loginDisabled
td <s>{{ userData.importUsernamesString }}</s>
else
td {{ userData.importUsernamesString }}
td
a.edit-user
i.fa.fa-edit
@@ -346,6 +351,9 @@ template(name="editUserPopup")
input.js-profile-email(type="email" value="{{user.emails.[0].address}}" readonly)
else
input.js-profile-email(type="email" value="{{user.emails.[0].address}}" required)
label
| {{_ 'import-usernames'}}
input.js-import-usernames(type="text" value=user.importUsernames)
label
| {{_ 'verified'}}
select.select-verified.js-profile-email-verified
@@ -444,6 +452,9 @@ template(name="newUserPopup")
// input.js-profile-email(type="email" value="{{user.emails.[0].address}}" readonly)
//else
input.js-profile-email(type="email" value="" required)
label
| {{_ 'import-usernames'}}
input.js-import-usernames(type="text" value="")
label
| {{_ 'admin'}}
select.select-role.js-profile-isadmin
+9 -1
View File
@@ -143,7 +143,7 @@ BlazeComponent.extendComponent({
const orgs = Org.find(this.findOrgsOptions.get(), {
fields: { _id: true },
});
this.numberOrgs.set(org.count(false));
this.numberOrgs.set(orgs.count(false));
return orgs;
},
teamList() {
@@ -421,6 +421,9 @@ Template.editUserPopup.events({
const authentication = templateInstance
.find('.js-authenticationMethod')
.value.trim();
const importUsernames = templateInstance
.find('.js-import-usernames')
.value.trim();
const isChangePassword = password.length > 0;
const isChangeUserName = username !== user.username;
@@ -441,6 +444,7 @@ Template.editUserPopup.events({
isAdmin: isAdmin === 'true',
loginDisabled: isActive === 'true',
authenticationMethod: authentication,
importUsernames: Users.parseImportUsernames(importUsernames),
},
});
@@ -563,6 +567,9 @@ Template.newUserPopup.events({
const isAdmin = templateInstance.find('.js-profile-isadmin').value.trim();
const isActive = templateInstance.find('.js-profile-isactive').value.trim();
const email = templateInstance.find('.js-profile-email').value.trim();
const importUsernames = templateInstance
.find('.js-import-usernames')
.value.trim();
Meteor.call(
'setCreateUser',
@@ -572,6 +579,7 @@ Template.newUserPopup.events({
isAdmin,
isActive,
email.toLowerCase(),
importUsernames,
function(error) {
const usernameMessageElement = templateInstance.$('.username-taken');
const emailMessageElement = templateInstance.$('.email-taken');
@@ -14,6 +14,11 @@ template(name="archivesSidebar")
if currentUser.isBoardMember
unless isWorker
p.quiet
if this.archivedAt
| {{_ 'archived-at' }}
|
| {{ moment this.archivedAt 'LLL' }}
br
a.js-restore-card {{_ 'restore'}}
if currentUser.isBoardAdmin
| -
@@ -37,6 +42,11 @@ template(name="archivesSidebar")
if currentUser.isBoardMember
unless isWorker
p.quiet
if this.archivedAt
| {{_ 'archived-at' }}
|
| {{ moment this.archivedAt 'LLL' }}
br
a.js-restore-list {{_ 'restore'}}
if currentUser.isBoardAdmin
| -
@@ -58,6 +68,11 @@ template(name="archivesSidebar")
if currentUser.isBoardMember
unless isWorker
p.quiet
if this.archivedAt
| {{_ 'archived-at' }}
|
| {{ moment this.archivedAt 'LLL' }}
br
a.js-restore-swimlane {{_ 'restore'}}
if currentUser.isBoardAdmin
| -
@@ -34,6 +34,8 @@ BlazeComponent.extendComponent({
return Cards.find({
archived: true,
boardId: Session.get('currentBoard'),
}, {
sort: { archivedAt: -1, modifiedAt: -1 },
});
},
@@ -41,6 +43,8 @@ BlazeComponent.extendComponent({
return Lists.find({
archived: true,
boardId: Session.get('currentBoard'),
}, {
sort: { archivedAt: -1, modifiedAt: -1 },
});
},
@@ -48,6 +52,8 @@ BlazeComponent.extendComponent({
return Swimlanes.find({
archived: true,
boardId: Session.get('currentBoard'),
}, {
sort: { archivedAt: -1, modifiedAt: -1 },
});
},
+17 -17
View File
@@ -4,24 +4,24 @@
Meteor.startup(() => {
TAPi18n.conf.i18n_files_route = Meteor._relativeToSiteRootUrl('/tap-i18n');
Tracker.autorun(() => {
const currentUser = Meteor.user();
let language;
if (currentUser) {
language = currentUser.profile && currentUser.profile.language;
}
const currentUser = Meteor.user();
let language;
if (currentUser) {
language = currentUser.profile && currentUser.profile.language;
}
if (!language) {
if (navigator.languages) {
language = navigator.languages[0];
} else {
language = navigator.language || navigator.userLanguage;
}
if (!language) {
if (navigator.languages) {
language = navigator.languages[0];
} else {
language = navigator.language || navigator.userLanguage;
}
}
if (language) {
TAPi18n.setLanguage(language);
T9n.setLanguage(language);
}
});
if (language) {
TAPi18n.setLanguage(language);
// eslint-disable-next-line no-console
// console.log('language set!');
T9n.setLanguage(language);
}
});
-4
View File
@@ -48,8 +48,6 @@ Utils = {
let sort = window.localStorage.getItem('myCardsSort');
if (!sort || !['board', 'dueAt'].includes(sort)) {
window.localStorage.setItem('myCardsSort', 'board');
location.reload();
sort = 'board';
}
@@ -81,8 +79,6 @@ Utils = {
let view = window.localStorage.getItem('dueCardsView');
if (!view || !['me', 'all'].includes(view)) {
window.localStorage.setItem('dueCardsView', 'me');
location.reload();
view = 'me';
}
+13 -10
View File
@@ -95,7 +95,10 @@ services:
# 2020-12-03:
# - Mongo image copied from Docker Hub mongo:4.4.2-bionic to Quay
# to avoid Docker Hub rate limits.
image: quay.io/wekan/mongo:4.4.2-bionic
# Quay image does work:
# image: quay.io/wekan/mongo:4.4.2-bionic
# Docker Hub MongoDB image does work:
image: mongo:4.4
#-------------------------------------------------------------------------------------
container_name: wekan-db
restart: always
@@ -114,12 +117,12 @@ services:
wekan:
#-------------------------------------------------------------------------------------
# ==== MONGODB AND METEOR VERSION ====
# a) Quay automatic builds do work, https://quay.io/wekan7wekan
image: quay.io/wekan/wekan
# a) Quay automatic builds do work work, https://quay.io/wekan/wekan
# image: quay.io/wekan/wekan
# b) Using specific version tag:
# image: quay.io/wekan/wekan:v4.52
# c) Docker Hub builds work https://hub.docker.com/r/wekanteam/wekan
# image: wekanteam/wekan
# c) Docker Hub builds do work https://hub.docker.com/r/wekanteam/wekan
image: wekanteam/wekan
#-------------------------------------------------------------------------------------
container_name: wekan-app
restart: always
@@ -457,8 +460,8 @@ services:
#
# The search user DN - You need quotes when you have spaces in parameters
# 2 examples:
#- LDAP_AUTHENTIFICATION_USERDN="CN=ldap admin,CN=users,DC=domainmatter,DC=lan"
#- LDAP_AUTHENTIFICATION_USERDN="CN=wekan_adm,OU=serviceaccounts,OU=admin,OU=prod,DC=mydomain,DC=com"
#- LDAP_AUTHENTIFICATION_USERDN=CN=ldap admin,CN=users,DC=domainmatter,DC=lan
#- LDAP_AUTHENTIFICATION_USERDN=CN=wekan_adm,OU=serviceaccounts,OU=admin,OU=prod,DC=mydomain,DC=com
#
# The password for the search user
#- LDAP_AUTHENTIFICATION_PASSWORD=pwd
@@ -488,10 +491,10 @@ services:
#- LDAP_REJECT_UNAUTHORIZED=false
#
# Option to login to the LDAP server with the user's own username and password, instead of an administrator key. Default: false (use administrator key).
#- LDAP_USER_AUTHENTICATION="true"
#- LDAP_USER_AUTHENTICATION=true
#
# Which field is used to find the user for the user authentication. Default: uid.
#- LDAP_USER_AUTHENTICATION_FIELD="uid"
#- LDAP_USER_AUTHENTICATION_FIELD=uid
#
# Optional extra LDAP filters. Don't forget the outmost enclosing parentheses if needed
#- LDAP_USER_SEARCH_FILTER=
@@ -556,7 +559,7 @@ services:
#
#- LDAP_SYNC_USER_DATA_FIELDMAP={"cn":"name", "mail":"email"}
#
#- LDAP_SYNC_GROUP_ROLES=''
#- LDAP_SYNC_GROUP_ROLES=
#
# The default domain of the ldap it is used to create email if the field is not map correctly with the LDAP_SYNC_USER_DATA_FIELDMAP
# example :
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+32 -3
View File
@@ -384,6 +384,7 @@
"import-csv-placeholder": "Paste your valid CSV/TSV data here",
"import-map-members": "Map members",
"import-members-map": "Your imported board has some members. Please map the members you want to import to your users",
"import-members-map-note": "Note: Unmapped members will be assigned to the current user.",
"import-show-user-mapping": "Review members mapping",
"import-user-select": "Pick your existing user you want to use as this member",
"importMapMembersAddPopup-title": "Select member",
@@ -530,6 +531,7 @@
"custom-login-logo-link-url": "Custom Login Logo Link URL",
"text-below-custom-login-logo": "Text below Custom Login Logo",
"username": "Username",
"import-usernames": "Import Usernames",
"view-it": "View it",
"warn-list-archived": "warning: this card is in an list at Archive",
"watch": "Watch",
@@ -876,6 +878,7 @@
"label-not-found": "Label '%s' not found.",
"label-color-not-found": "Label color %s not found.",
"user-username-not-found": "Username '%s' not found.",
"comment-not-found": "Card with comment containing text '%s' not found.",
"globalSearch-title": "Search All Boards",
"no-cards-found": "No Cards Found",
"one-card-found": "One Card Found",
@@ -895,12 +898,29 @@
"operator-member-abbrev": "m",
"operator-assignee": "assignee",
"operator-assignee-abbrev": "a",
"operator-is": "is",
"operator-status": "status",
"operator-due": "due",
"operator-created": "created",
"operator-modified": "modified",
"operator-sort": "sort",
"operator-comment": "comment",
"predicate-archived": "archived",
"predicate-ended": "ended",
"predicate-all": "all",
"predicate-overdue": "overdue",
"predicate-week": "week",
"predicate-month": "month",
"predicate-quarter": "quarter",
"predicate-year": "year",
"predicate-due": "due",
"predicate-modified": "modified",
"predicate-created": "created",
"operator-unknown-error": "%s is not an operator",
"operator-number-expected": "operator __operator__ expected a number, got '__value__'",
"operator-sort-invalid": "sort of '%s' is invalid",
"operator-status-invalid": "'%s' is not a valid status",
"next-page": "Next Page",
"previous-page": "Previous Page",
"heading-notes": "Notes",
"globalSearch-instructions-heading": "Search Instructions",
"globalSearch-instructions-description": "Searches can include operators to refine the search. Operators are specified by writing the operator name and value separated by a colon. For example, an operator specification of `list:Blocked` would limit the search to cards that are contained in a list named *Blocked*. If the value contains spaces or special characters it must be enclosed in quotation marks (e.g. `__operator_list__:\"To Review\"`).",
@@ -908,20 +928,29 @@
"globalSearch-instructions-operator-board": "`__operator_board__:title` - cards in boards matching the specified title",
"globalSearch-instructions-operator-list": "`__operator_list__:title` - cards in lists matching the specified title",
"globalSearch-instructions-operator-swimlane": "`__operator_swimlane__:title` - cards in swimlanes matching the specified title",
"globalSearch-instructions-operator-comment": "`__operator_comment__:text` - cards with with a comment containing *text*.",
"globalSearch-instructions-operator-label": "`__operator_label__:color` `__operator_label__:name` - cards that have a label matching the given color or name",
"globalSearch-instructions-operator-hash": "`__operator_label_abbrev__label` - shorthand for `__operator_label__:label`",
"globalSearch-instructions-operator-user": "`__operator_user__:username` - cards where the specified user is a *member* or *assignee*",
"globalSearch-instructions-operator-at": "`__operator_user_abbrev__username` - shorthand for `user:username`",
"globalSearch-instructions-operator-member": "`__operator_member__:username` - cards where the specified user is a *member*",
"globalSearch-instructions-operator-assignee": "`__operator_assignee__:username` - cards where the specified user is an *assignee*",
"globalSearch-instructions-operator-due": "`__operator_due__:n` - cards which are due *n* days from now. `__operator_due__:__predicate_overdue__ lists all cards past their due date.",
"globalSearch-instructions-operator-created": "`__operator_created__:n` - cards which which were created *n* days ago",
"globalSearch-instructions-operator-modified": "`__operator_modified__:n` - cards which which were modified *n* days ago",
"globalSearch-instructions-status-archived": "`__operator_status__:__predicate_archived__` - cards that are archived.",
"globalSearch-instructions-status-all": "`__operator_status__:__predicate_all__` - all archived and unarchived cards.",
"globalSearch-instructions-status-ended": "`__operator_status__:__predicate_ended__` - cards with an end date.",
"globalSearch-instructions-notes-1": "Multiple operators may be specified.",
"globalSearch-instructions-notes-2": "Similar operators are *OR*ed together. Cards that match any of the conditions will be returned.\n`__operator_list__:Available __operator_list__:Blocked` would return cards contained in any list named *Blocked* or *Available*.",
"globalSearch-instructions-notes-3": "Differing operators are *AND*ed together. Only cards that match all of the differing operators are returned.\n`__operator_list__:Available __operator_label__:red` returns only cards in the list *Available* with a *red* label.",
"globalSearch-instructions-notes-3": "Differing operators are *AND*ed together. Only cards that match all of the differing operators are returned. `__operator_list__:Available __operator_label__:red` returns only cards in the list *Available* with a *red* label.",
"globalSearch-instructions-notes-3-2": "Days can be specified as an integer or using `__predicate_week__`, `__predicate_month__`, `__predicate_quarter__` or `__predicate_year__`",
"globalSearch-instructions-notes-4": "Text searches are case insensitive.",
"globalSearch-instructions-notes-5": "Currently archived cards are not searched.",
"link-to-search": "Link to this search",
"excel-font": "Arial",
"number": "Number",
"label-colors": "Label Colors",
"label-names": "Label Names"
"label-names": "Label Names",
"archived-at": "archived at"
}
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+953 -925
View File
File diff suppressed because it is too large. Load diff
+60 -36
View File
@@ -43,6 +43,13 @@ Boards.attachSchema(
}
},
},
archivedAt: {
/**
* Latest archiving time of the board
*/
type: Date,
optional: true,
},
createdAt: {
/**
* Creation time of the board
@@ -510,6 +517,7 @@ Boards.helpers({
const oldId = this._id;
delete this._id;
delete this.slug;
this.title = this.copyTitle();
const _id = Boards.insert(this);
// Copy all swimlanes in board
@@ -569,20 +577,7 @@ Boards.helpers({
* @returns {string|null}
*/
copyTitle() {
const m = this.title.match(/^(?<title>.*?)\s*(\[(?<num>\d+)]\s*$|\s*$)/);
const title = escapeForRegex(m.groups.title);
let num = 0;
Boards.find({ title: new RegExp(`^${title}\\s*\\[\\d+]\\s*$`) }).forEach(
board => {
const m = board.title.match(/^(?<title>.*?)\s*\[(?<num>\d+)]\s*$/);
if (m) {
const n = parseInt(m.groups.num, 10);
num = num < n ? n : num;
}
},
);
return `${title} [${num + 1}]`;
return Boards.uniqueTitle(this.title);
},
/**
@@ -1054,7 +1049,7 @@ Boards.helpers({
Boards.mutations({
archive() {
return { $set: { archived: true } };
return { $set: { archived: true, archivedAt: new Date() } };
},
restore() {
@@ -1274,45 +1269,74 @@ function boardRemover(userId, doc) {
);
}
Boards.uniqueTitle = title => {
const m = title.match(
new RegExp('^(?<title>.*?)\\s*(\\[(?<num>\\d+)]\\s*$|\\s*$)'),
);
const base = escapeForRegex(m.groups.title);
let num = 0;
Boards.find({ title: new RegExp(`^${base}\\s*\\[\\d+]\\s*$`) }).forEach(
board => {
const m = board.title.match(
new RegExp('^(?<title>.*?)\\s*\\[(?<num>\\d+)]\\s*$'),
);
if (m) {
const n = parseInt(m.groups.num, 10);
num = num < n ? n : num;
}
},
);
return `${base} [${num + 1}]`;
};
Boards.userSearch = (
userId,
selector = {},
projection = {},
includeArchived = false,
// includeArchived = false,
) => {
if (!includeArchived) {
selector.archived = false;
}
selector.$or = [
{ permission: 'public' },
{ members: { $elemMatch: { userId, isActive: true } } },
];
// if (!includeArchived) {
// selector.archived = false;
// }
selector.$or = [{ permission: 'public' }];
if (userId) {
selector.$or.push({ members: { $elemMatch: { userId, isActive: true } } });
}
return Boards.find(selector, projection);
};
Boards.userBoards = (userId, includeArchived = false, selector = {}) => {
check(userId, String);
if (!includeArchived) {
selector = {
archived: false,
};
Boards.userBoards = (userId, archived = false, selector = {}) => {
if (typeof archived === 'boolean') {
selector.archived = archived;
}
selector.$or = [
{ permission: 'public' },
{ members: { $elemMatch: { userId, isActive: true } } },
];
selector.$or = [{ permission: 'public' }];
if (userId) {
selector.$or.push({ members: { $elemMatch: { userId, isActive: true } } });
}
return Boards.find(selector);
};
Boards.userBoardIds = (userId, includeArchived = false, selector = {}) => {
return Boards.userBoards(userId, includeArchived, selector).map(board => {
Boards.userBoardIds = (userId, archived = false, selector = {}) => {
return Boards.userBoards(userId, archived, selector).map(board => {
return board._id;
});
};
Boards.colorMap = () => {
const colors = {};
for (const color of Boards.labelColors()) {
colors[TAPi18n.__(`color-${color}`)] = color;
}
return colors;
};
Boards.labelColors = () => {
return _.clone(Boards.simpleSchema()._schema['labels.$.color'].allowedValues);
};
if (Meteor.isServer) {
Boards.allow({
insert: Meteor.userId,
+23 -3
View File
@@ -1,3 +1,4 @@
const escapeForRegex = require('escape-string-regexp');
CardComments = new Mongo.Collection('card_comments');
/**
@@ -109,6 +110,28 @@ function commentCreation(userId, doc) {
});
}
CardComments.textSearch = (userId, textArray) => {
const selector = {
boardId: { $in: Boards.userBoardIds(userId) },
$and: [],
};
for (const text of textArray) {
selector.$and.push({ text: new RegExp(escapeForRegex(text)) });
}
// eslint-disable-next-line no-console
// console.log('cardComments selector:', selector);
const comments = CardComments.find(selector);
// eslint-disable-next-line no-console
// console.log('count:', comments.count());
// eslint-disable-next-line no-console
// console.log('cards with comments:', comments.map(com => { return com.cardId }));
return comments;
};
if (Meteor.isServer) {
// Comments are often fetched within a card, so we create an index to make these
// queries more efficient.
@@ -145,9 +168,6 @@ if (Meteor.isServer) {
listId: card.listId,
swimlaneId: card.swimlaneId,
});
});
CardComments.after.remove((userId, doc) => {
const activity = Activities.findOne({ commentId: doc._id });
if (activity) {
Activities.remove(activity._id);
+14 -259
View File
@@ -26,6 +26,13 @@ Cards.attachSchema(
}
},
},
archivedAt: {
/**
* latest archiving date
*/
type: Date,
optional: true,
},
parentId: {
/**
* ID of the parent card
@@ -724,9 +731,12 @@ Cards.helpers({
definition,
};
});
if (ret.definition !== undefined) {
ret.sort((a, b) => a.definition.name.localeCompare(b.definition.name));
}
ret.sort(
(a, b) =>
a.definition.name !== undefined &&
b.definition.name !== undefined &&
a.definition.name.localeCompare(b.definition.name),
);
return ret;
},
@@ -1446,6 +1456,7 @@ Cards.mutations({
return {
$set: {
archived: true,
archivedAt: new Date(),
},
};
},
@@ -1863,262 +1874,6 @@ Cards.mutations({
},
});
Cards.globalSearch = queryParams => {
const userId = Meteor.userId();
// eslint-disable-next-line no-console
// console.log('userId:', userId);
const errors = new (class {
constructor() {
this.notFound = {
boards: [],
swimlanes: [],
lists: [],
labels: [],
users: [],
members: [],
assignees: [],
is: [],
};
}
hasErrors() {
for (const prop in this.notFound) {
if (this.notFound[prop].length) {
return true;
}
}
return false;
}
})();
const selector = {
archived: false,
type: 'cardType-card',
boardId: { $in: Boards.userBoardIds(userId) },
swimlaneId: { $nin: Swimlanes.archivedSwimlaneIds() },
listId: { $nin: Lists.archivedListIds() },
};
if (queryParams.boards.length) {
const queryBoards = [];
queryParams.boards.forEach(query => {
const boards = Boards.userSearch(userId, {
title: new RegExp(query, 'i'),
});
if (boards.count()) {
boards.forEach(board => {
queryBoards.push(board._id);
});
} else {
errors.notFound.boards.push(query);
}
});
selector.boardId.$in = queryBoards;
}
if (queryParams.swimlanes.length) {
const querySwimlanes = [];
queryParams.swimlanes.forEach(query => {
const swimlanes = Swimlanes.find({
title: new RegExp(query, 'i'),
});
if (swimlanes.count()) {
swimlanes.forEach(swim => {
querySwimlanes.push(swim._id);
});
} else {
errors.notFound.swimlanes.push(query);
}
});
selector.swimlaneId.$in = querySwimlanes;
}
if (queryParams.lists.length) {
const queryLists = [];
queryParams.lists.forEach(query => {
const lists = Lists.find({
title: new RegExp(query, 'i'),
});
if (lists.count()) {
lists.forEach(list => {
queryLists.push(list._id);
});
} else {
errors.notFound.lists.push(query);
}
});
selector.listId.$in = queryLists;
}
if (queryParams.dueAt !== null) {
selector.dueAt = { $gte: new Date(queryParams.dueAt) };
}
if (queryParams.createdAt !== null) {
selector.createdAt = { $gte: new Date(queryParams.createdAt) };
}
if (queryParams.modifiedAt !== null) {
selector.modifiedAt = { $gte: new Date(queryParams.modifiedAt) };
}
const queryMembers = [];
const queryAssignees = [];
if (queryParams.users.length) {
queryParams.users.forEach(query => {
const users = Users.find({
username: query,
});
if (users.count()) {
users.forEach(user => {
queryMembers.push(user._id);
queryAssignees.push(user._id);
});
} else {
errors.notFound.users.push(query);
}
});
}
if (queryParams.members.length) {
queryParams.members.forEach(query => {
const users = Users.find({
username: query,
});
if (users.count()) {
users.forEach(user => {
queryMembers.push(user._id);
});
} else {
errors.notFound.members.push(query);
}
});
}
if (queryParams.assignees.length) {
queryParams.assignees.forEach(query => {
const users = Users.find({
username: query,
});
if (users.count()) {
users.forEach(user => {
queryAssignees.push(user._id);
});
} else {
errors.notFound.assignees.push(query);
}
});
}
if (queryMembers.length && queryAssignees.length) {
selector.$or = [
{ members: { $in: queryMembers } },
{ assignees: { $in: queryAssignees } },
];
} else if (queryMembers.length) {
selector.members = { $in: queryMembers };
} else if (queryAssignees.length) {
selector.assignees = { $in: queryAssignees };
}
if (queryParams.labels.length) {
queryParams.labels.forEach(label => {
const queryLabels = [];
let boards = Boards.userSearch(userId, {
labels: { $elemMatch: { color: label.toLowerCase() } },
});
if (boards.count()) {
boards.forEach(board => {
// eslint-disable-next-line no-console
// console.log('board:', board);
// eslint-disable-next-line no-console
// console.log('board.labels:', board.labels);
board.labels
.filter(boardLabel => {
return boardLabel.color === label.toLowerCase();
})
.forEach(boardLabel => {
queryLabels.push(boardLabel._id);
});
});
} else {
// eslint-disable-next-line no-console
// console.log('label:', label);
const reLabel = new RegExp(label, 'i');
// eslint-disable-next-line no-console
// console.log('reLabel:', reLabel);
boards = Boards.userSearch(userId, {
labels: { $elemMatch: { name: reLabel } },
});
if (boards.count()) {
boards.forEach(board => {
board.labels
.filter(boardLabel => {
return boardLabel.name.match(reLabel);
})
.forEach(boardLabel => {
queryLabels.push(boardLabel._id);
});
});
} else {
errors.notFound.labels.push(label);
}
}
selector.labelIds = { $in: queryLabels };
});
}
if (errors.hasErrors()) {
return { cards: null, errors };
}
if (queryParams.text) {
const regex = new RegExp(queryParams.text, 'i');
selector.$or = [
{ title: regex },
{ description: regex },
{ customFields: { $elemMatch: { value: regex } } },
];
}
// eslint-disable-next-line no-console
// console.log('selector:', selector);
const cards = Cards.find(selector, {
fields: {
_id: 1,
archived: 1,
boardId: 1,
swimlaneId: 1,
listId: 1,
title: 1,
type: 1,
sort: 1,
members: 1,
assignees: 1,
colors: 1,
dueAt: 1,
createdAt: 1,
modifiedAt: 1,
labelIds: 1,
},
limit: 50,
});
// eslint-disable-next-line no-console
//console.log('count:', cards.count());
return { cards, errors };
};
//FUNCTIONS FOR creation of Activities
function updateActivities(doc, fieldNames, modifier) {
+4
View File
@@ -69,24 +69,28 @@ CustomFields.attachSchema(
* should we show on the cards this custom field
*/
type: Boolean,
defaultValue: false,
},
automaticallyOnCard: {
/**
* should the custom fields automatically be added on cards?
*/
type: Boolean,
defaultValue: false,
},
alwaysOnCard: {
/**
* should the custom field be automatically added to all cards?
*/
type: Boolean,
defaultValue: false,
},
showLabelOnMiniCard: {
/**
* should the label of the custom field be shown on minicards?
*/
type: Boolean,
defaultValue: false,
},
createdAt: {
type: Date,
+199 -45
View File
@@ -24,7 +24,6 @@ if (Meteor.isServer) {
Picker.route('/api/boards/:boardId/exportExcel', function(params, req, res) {
const boardId = params.boardId;
let user = null;
//console.log('Excel');
const loginToken = params.query.authToken;
if (loginToken) {
@@ -163,6 +162,11 @@ export class ExporterExcel {
users[memberId] = true;
});
}
if (card.assignees) {
card.assignees.forEach(memberId => {
users[memberId] = true;
});
}
});
result.comments.forEach(comment => {
users[comment.userId] = true;
@@ -184,7 +188,6 @@ export class ExporterExcel {
fields: {
_id: 1,
username: 1,
'profile.fullname': 1,
'profile.initials': 1,
'profile.avatarUrl': 1,
},
@@ -199,7 +202,6 @@ export class ExporterExcel {
return user;
});
const jdata = result;
//init exceljs workbook
const Excel = require('exceljs');
const workbook = new Excel.Workbook();
@@ -208,9 +210,9 @@ export class ExporterExcel {
workbook.created = new Date();
workbook.modified = new Date();
workbook.lastPrinted = new Date();
const filename = `${jdata.title}.xlsx`;
const filename = `${result.title}.xlsx`;
//init worksheet
const worksheet = workbook.addWorksheet(jdata.title, {
const worksheet = workbook.addWorksheet(result.title, {
properties: {
tabColor: {
argb: 'FFC0000',
@@ -222,26 +224,26 @@ export class ExporterExcel {
},
});
//get worksheet
const ws = workbook.getWorksheet(jdata.title);
const ws = workbook.getWorksheet(result.title);
ws.properties.defaultRowHeight = 20;
//init columns
//Excel font. Western: Arial. zh-CN: 宋体
ws.columns = [
{
key: 'a',
width: 7,
width: 14,
},
{
key: 'b',
width: 16,
width: 20,
},
{
key: 'c',
width: 7,
width: 20,
},
{
key: 'd',
width: 14,
width: 20,
style: {
font: {
name: TAPi18n.__('excel-font'),
@@ -252,7 +254,7 @@ export class ExporterExcel {
},
{
key: 'e',
width: 14,
width: 20,
style: {
font: {
name: TAPi18n.__('excel-font'),
@@ -263,21 +265,88 @@ export class ExporterExcel {
},
{
key: 'f',
width: 10,
width: 20,
style: {
font: {
name: TAPi18n.__('excel-font'),
size: '10',
},
numFmt: 'yyyy/mm/dd hh:mm:ss',
},
},
{
key: 'g',
width: 10,
width: 20,
style: {
font: {
name: TAPi18n.__('excel-font'),
size: '10',
},
numFmt: 'yyyy/mm/dd hh:mm:ss',
},
},
{
key: 'h',
width: 18,
width: 20,
style: {
font: {
name: TAPi18n.__('excel-font'),
size: '10',
},
numFmt: 'yyyy/mm/dd hh:mm:ss',
},
},
{
key: 'i',
width: 20,
style: {
font: {
name: TAPi18n.__('excel-font'),
size: '10',
},
numFmt: 'yyyy/mm/dd hh:mm:ss',
},
},
{
key: 'j',
width: 20,
style: {
font: {
name: TAPi18n.__('excel-font'),
size: '10',
},
numFmt: 'yyyy/mm/dd hh:mm:ss',
},
},
{
key: 'k',
width: 20,
},
{
key: 'l',
width: 20,
},
{
key: 'm',
width: 20,
},
{
key: 'n',
width: 20,
},
{
key: 'o',
width: 20,
},
{
key: 'p',
width: 20,
},
];
//add title line
ws.mergeCells('A1:H1');
ws.getCell('A1').value = jdata.title;
ws.getCell('A1').value = result.title;
ws.getCell('A1').style = {
font: {
name: TAPi18n.__('excel-font'),
@@ -289,38 +358,54 @@ export class ExporterExcel {
horizontal: 'center',
};
ws.getRow(1).height = 40;
//get member info
//get member and assignee info
let jmem = '';
let jassig = '';
const jmeml = {};
for (const i in jdata.users) {
jmem = `${jmem + jdata.users[i].profile.fullname},`;
jmeml[jdata.users[i]._id] = jdata.users[i].profile.fullname;
const jassigl = {};
for (const i in result.users) {
jmem = `${jmem + result.users[i].username},`;
jmeml[result.users[i]._id] = result.users[i].username;
}
jmem = jmem.substr(0, jmem.length - 1);
for (const ia in result.users) {
jassig = `${jassig + result.users[ia].username},`;
jassigl[result.users[ia]._id] = result.users[ia].username;
}
jassig = jassig.substr(0, jassig.length - 1);
//get kanban list info
const jlist = {};
for (const klist in jdata.lists) {
jlist[jdata.lists[klist]._id] = jdata.lists[klist].title;
for (const klist in result.lists) {
jlist[result.lists[klist]._id] = result.lists[klist].title;
}
//get kanban label info
const jlabel = {};
for (const klabel in jdata.labels) {
jlabel[jdata.labels[klabel]._id] = jdata.labels[klabel].name;
for (const klabel in result.labels) {
jlabel[result.labels[klabel]._id] = result.labels[klabel].name;
}
//add data +8 hours
function add8hours(jdate) {
function addTZhours(jdate) {
const curdate = new Date(jdate);
return new Date(curdate.setHours(curdate.getHours() + 8));
const checkCorrectDate = moment(curdate);
if (checkCorrectDate.isValid()) {
return curdate;
} else {
return ' ';
}
////Do not add 8 hours to GMT. Use GMT instead.
////Could not yet figure out how to get localtime.
//return new Date(curdate.setHours(curdate.getHours() + 8));
//return curdate;
}
//add blank row
ws.addRow().values = ['', '', '', '', '', '', '', ''];
ws.addRow().values = ['', '', '', '', '', ''];
//add kanban info
ws.addRow().values = [
TAPi18n.__('createdAt'),
add8hours(jdata.createdAt),
addTZhours(result.createdAt),
TAPi18n.__('modifiedAt'),
add8hours(jdata.modifiedAt),
TAPi18n.__('r-member'),
addTZhours(result.modifiedAt),
TAPi18n.__('members'),
jmem,
];
ws.getRow(3).font = {
@@ -328,6 +413,7 @@ export class ExporterExcel {
size: 10,
bold: true,
};
ws.mergeCells('F3:P3');
ws.getCell('B3').style = {
font: {
name: TAPi18n.__('excel-font'),
@@ -344,12 +430,19 @@ export class ExporterExcel {
wrapText: true,
};
}
function cellLeft(cellno) {
ws.getCell(cellno).alignment = {
vertical: 'middle',
horizontal: 'left',
wrapText: true,
};
}
cellCenter('A3');
cellCenter('B3');
cellCenter('C3');
cellCenter('D3');
cellCenter('E3');
cellCenter('F3');
cellLeft('F3');
ws.getRow(3).height = 20;
//all border
function allBorder(cellno) {
@@ -375,18 +468,42 @@ export class ExporterExcel {
allBorder('E3');
allBorder('F3');
//add blank row
ws.addRow().values = ['', '', '', '', '', '', '', '', ''];
ws.addRow().values = [
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
];
//add card title
//ws.addRow().values = ['编号', '标题', '创建人', '创建时间', '更新时间', '列表', '成员', '描述', '标签'];
ws.addRow().values = [
TAPi18n.__('number'),
TAPi18n.__('title'),
TAPi18n.__('description'),
TAPi18n.__('owner'),
TAPi18n.__('createdAt'),
TAPi18n.__('last-modified-at'),
TAPi18n.__('card-received'),
TAPi18n.__('card-start'),
TAPi18n.__('card-due'),
TAPi18n.__('card-end'),
TAPi18n.__('list'),
TAPi18n.__('description'),
TAPi18n.__('status'),
TAPi18n.__('assignee'),
TAPi18n.__('members'),
TAPi18n.__('labels'),
TAPi18n.__('overtime-hours'),
TAPi18n.__('spent-time-hours'),
];
ws.getRow(5).height = 20;
allBorder('A5');
@@ -398,6 +515,13 @@ export class ExporterExcel {
allBorder('G5');
allBorder('H5');
allBorder('I5');
allBorder('J5');
allBorder('K5');
allBorder('L5');
allBorder('M5');
allBorder('N5');
allBorder('O5');
allBorder('P5');
cellCenter('A5');
cellCenter('B5');
cellCenter('C5');
@@ -407,6 +531,13 @@ export class ExporterExcel {
cellCenter('G5');
cellCenter('H5');
cellCenter('I5');
cellCenter('J5');
cellCenter('K5');
cellCenter('L5');
cellCenter('M5');
cellCenter('N5');
cellCenter('O5');
cellCenter('P5');
ws.getRow(5).font = {
name: TAPi18n.__('excel-font'),
size: 12,
@@ -414,34 +545,46 @@ export class ExporterExcel {
};
//add blank row
//add card info
for (const i in jdata.cards) {
const jcard = jdata.cards[i];
for (const i in result.cards) {
const jcard = result.cards[i];
//get member info
let jcmem = '';
for (const j in jcard.members) {
jcmem += jmeml[jcard.members[j]];
jcmem += ' ';
}
//get assignee info
let jcassig = '';
for (const ja in jcard.assignees) {
jcassig += jassigl[jcard.assignees[ja]];
jcassig += ' ';
}
//get card label info
let jclabel = '';
for (const jl in jcard.labelIds) {
jclabel += jlabel[jcard.labelIds[jl]];
jclabel += ' ';
}
// console.log(jclabel);
//add card detail
const t = Number(i) + 1;
ws.addRow().values = [
t.toString(),
jcard.title,
jmeml[jcard.userId],
add8hours(jcard.createdAt),
add8hours(jcard.dateLastActivity),
jlist[jcard.listId],
jcmem,
jcard.description,
jmeml[jcard.userId],
addTZhours(jcard.createdAt),
addTZhours(jcard.dateLastActivity),
addTZhours(jcard.receivedAt),
addTZhours(jcard.startAt),
addTZhours(jcard.dueAt),
addTZhours(jcard.endAt),
jlist[jcard.listId],
jcassig,
jcmem,
jclabel,
jcard.isOvertime ? 'true' : 'false',
jcard.spentTime,
];
const y = Number(i) + 6;
//ws.getRow(y).height = 25;
@@ -454,20 +597,31 @@ export class ExporterExcel {
allBorder(`G${y}`);
allBorder(`H${y}`);
allBorder(`I${y}`);
allBorder(`J${y}`);
allBorder(`K${y}`);
allBorder(`L${y}`);
allBorder(`M${y}`);
allBorder(`N${y}`);
allBorder(`O${y}`);
allBorder(`P${y}`);
cellCenter(`A${y}`);
ws.getCell(`B${y}`).alignment = {
wrapText: true,
};
ws.getCell(`H${y}`).alignment = {
ws.getCell(`C${y}`).alignment = {
wrapText: true,
};
ws.getCell(`I${y}`).alignment = {
ws.getCell(`L${y}`).alignment = {
wrapText: true,
};
ws.getCell(`M${y}`).alignment = {
wrapText: true,
};
ws.getCell(`N${y}`).alignment = {
wrapText: true,
};
}
// var exporte=new Stream;
workbook.xlsx.write(res).then(function() {});
// return exporte;
}
canExport(user) {
+9 -1
View File
@@ -32,6 +32,13 @@ Lists.attachSchema(
}
},
},
archivedAt: {
/**
* latest archiving date
*/
type: Date,
optional: true,
},
boardId: {
/**
* the board associated to this list
@@ -292,7 +299,7 @@ Lists.mutations({
return card.archive();
});
}
return { $set: { archived: true } };
return { $set: { archived: true, archivedAt: new Date() } };
},
restore() {
@@ -384,6 +391,7 @@ if (Meteor.isServer) {
Meteor.startup(() => {
Lists._collection._ensureIndex({ modifiedAt: -1 });
Lists._collection._ensureIndex({ boardId: 1 });
Lists._collection._ensureIndex({ archivedAt: -1 });
});
Lists.after.insert((userId, doc) => {
+8 -1
View File
@@ -23,6 +23,13 @@ Swimlanes.attachSchema(
}
},
},
archivedAt: {
/**
* latest archiving date of the swimlane
*/
type: Date,
optional: true,
},
boardId: {
/**
* the ID of the board the swimlane is attached to
@@ -259,7 +266,7 @@ Swimlanes.mutations({
return list.archive();
});
}
return { $set: { archived: true } };
return { $set: { archived: true, archivedAt: new Date() } };
},
restore() {
+1 -1
View File
@@ -177,7 +177,7 @@ export class TrelloCreator {
permission: this.getPermission(trelloBoard.prefs.permissionLevel),
slug: getSlug(trelloBoard.name) || 'board',
stars: 0,
title: trelloBoard.name,
title: Boards.uniqueTitle(trelloBoard.name),
};
// now add other members
if (trelloBoard.memberships) {
+66 -5
View File
@@ -338,6 +338,13 @@ Users.attachSchema(
type: Number,
optional: true,
},
importUsernames: {
/**
* username for imported
*/
type: [String],
optional: true,
},
}),
);
@@ -433,7 +440,18 @@ if (Meteor.isClient) {
});
}
Users.parseImportUsernames = usernamesString => {
return usernamesString.trim().split(new RegExp('\\s*[,;]\\s*'));
};
Users.helpers({
importUsernamesString() {
if (this.importUsernames) {
return this.importUsernames.join(', ');
}
return '';
},
boards() {
return Boards.find(
{ 'members.userId': this._id },
@@ -779,7 +797,15 @@ Meteor.methods({
if (Meteor.isServer) {
Meteor.methods({
setCreateUser(fullname, username, password, isAdmin, isActive, email) {
setCreateUser(
fullname,
username,
password,
isAdmin,
isActive,
email,
importUsernames,
) {
if (Meteor.user() && Meteor.user().isAdmin) {
check(fullname, String);
check(username, String);
@@ -787,6 +813,7 @@ if (Meteor.isServer) {
check(isAdmin, String);
check(isActive, String);
check(email, String);
check(importUsernames, Array);
const nUsersWithUsername = Users.find({ username }).count();
const nUsersWithEmail = Users.find({ email }).count();
@@ -803,10 +830,10 @@ if (Meteor.isServer) {
email: email.toLowerCase(),
from: 'admin',
});
user = Users.findOne(username) || Users.findOne({ username });
const user = Users.findOne(username) || Users.findOne({ username });
if (user) {
Users.update(user._id, {
$set: { 'profile.fullname': fullname },
$set: { 'profile.fullname': fullname, importUsernames },
});
}
}
@@ -1009,8 +1036,10 @@ if (Meteor.isServer) {
user.username = user.services.oidc.username;
user.emails = [{ address: email, verified: true }];
const initials = user.services.oidc.fullname
.match(/\b[a-zA-Z]/g)
.join('')
.split(/\s+/)
.reduce((memo, word) => {
return memo + word[0];
}, '')
.toUpperCase();
user.profile = {
initials,
@@ -1731,6 +1760,38 @@ if (Meteor.isServer) {
});
}
});
/**
* @operation create_user_token
*
* @summary Create a user token
*
* @description Only the admin user (the first user) can call the REST API.
*
* @param {string} userId the ID of the user to create token for.
* @return_type {_id: string}
*/
JsonRoutes.add('POST', '/api/createtoken/:userId', function(req, res) {
try {
Authentication.checkUserId(req.userId);
const id = req.params.userId;
const token = Accounts._generateStampedLoginToken();
Accounts._insertLoginToken(id, token);
JsonRoutes.sendResult(res, {
code: 200,
data: {
_id: id,
authToken: token.token,
},
});
} catch (error) {
JsonRoutes.sendResult(res, {
code: 200,
data: error,
});
}
});
}
export default Users;
+102
View File
@@ -25,6 +25,13 @@ SessionData.attachSchema(
type: String,
optional: false,
},
sessionId: {
/**
* unique session ID
*/
type: String,
optional: false,
},
totalHits: {
/**
* total number of hits in the last report query
@@ -32,6 +39,13 @@ SessionData.attachSchema(
type: Number,
optional: true,
},
resultsCount: {
/**
* number of results returned
*/
type: Number,
optional: true,
},
lastHit: {
/**
* the last hit returned from a report query
@@ -39,6 +53,48 @@ SessionData.attachSchema(
type: Number,
optional: true,
},
cards: {
type: [String],
optional: true,
},
selector: {
type: String,
optional: true,
blackbox: true,
},
errorMessages: {
type: [String],
optional: true,
},
errors: {
type: [Object],
optional: true,
defaultValue: [],
},
'errors.$': {
type: new SimpleSchema({
tag: {
/**
* i18n tag
*/
type: String,
optional: false,
},
value: {
/**
* value for the tag
*/
type: String,
optional: true,
defaultValue: null,
},
color: {
type: Boolean,
optional: true,
defaultValue: false,
},
}),
},
createdAt: {
/**
* creation date of the team
@@ -70,4 +126,50 @@ SessionData.attachSchema(
}),
);
SessionData.helpers({
getSelector() {
return SessionData.unpickle(this.selector);
},
});
SessionData.unpickle = pickle => {
return JSON.parse(pickle, (key, value) => {
if (typeof value === 'object') {
if (value.hasOwnProperty('$$class')) {
if (value.$$class === 'RegExp') {
return new RegExp(value.source, value.flags);
}
}
}
return value;
});
};
SessionData.pickle = value => {
return JSON.stringify(value, (key, value) => {
if (typeof value === 'object') {
if (value.constructor.name === 'RegExp') {
return {
$$class: 'RegExp',
source: value.source,
flags: value.flags,
};
}
}
return value;
});
};
if (!Meteor.isServer) {
SessionData.getSessionId = () => {
let sessionId = Session.get('sessionId');
if (!sessionId) {
sessionId = `${String(Meteor.userId())}-${String(Math.random())}`;
Session.set('sessionId', sessionId);
}
return sessionId;
};
}
export default SessionData;
+3 -2
View File
@@ -253,13 +253,14 @@ export class WekanCreator {
permission: boardToImport.permission,
slug: getSlug(boardToImport.title) || 'board',
stars: 0,
title: boardToImport.title,
title: Boards.uniqueTitle(boardToImport.title),
};
// now add other members
if (boardToImport.members) {
boardToImport.members.forEach(wekanMember => {
// do we already have it in our list?
// is it defined and do we already have it in our list?
if (
wekanMember.wekanId &&
!boardToCreate.members.some(
member => member.wekanId === wekanMember.wekanId,
)
+7 -7
View File
@@ -1,6 +1,6 @@
{
"name": "wekan",
"version": "v4.87.0",
"version": "v4.92.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -819,9 +819,9 @@
"dev": true
},
"ajv": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-7.0.3.tgz",
"integrity": "sha512-R50QRlXSxqXcQP5SvKUrw8VZeypvo12i2IX0EeR5PiZ7bEKeHWgzgo264LDadUsCU42lTJVhFikTqJwNeH34gQ==",
"version": "7.0.4",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-7.0.4.tgz",
"integrity": "sha512-xzzzaqgEQfmuhbhAoqjJ8T/1okb6gAzXn/eQRNpAN1AEUoHJTNF9xCDRTtf/s3SKldtZfa+RJeTs+BQq+eZ/sw==",
"requires": {
"fast-deep-equal": "^3.1.1",
"json-schema-traverse": "^1.0.0",
@@ -4324,9 +4324,9 @@
"optional": true
},
"mongodb": {
"version": "3.6.3",
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.6.3.tgz",
"integrity": "sha512-rOZuR0QkodZiM+UbQE5kDsJykBqWi0CL4Ec2i1nrGrUI3KO11r6Fbxskqmq3JK2NH7aW4dcccBuUujAP0ERl5w==",
"version": "3.6.4",
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.6.4.tgz",
"integrity": "sha512-Y+Ki9iXE9jI+n9bVtbTOOdK0B95d6wVGSucwtBkvQ+HIvVdTCfpVRp01FDC24uhC/Q2WXQ8Lpq3/zwtB5Op9Qw==",
"requires": {
"bl": "^2.2.1",
"bson": "^1.1.4",
Loaded 100 of 112 files, more files were not shown because too many files have changed in this diff. Show more