New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sorting by wbsValue
field does not work correctly with applyChangeset
method
#7366
Comments
Hello. The So if we rephrase the ticket in terms of Also FYI - I see you have both |
Perhaps related? #6090 |
Here is a screenshot with the example changed to sort by You can see the console at the bottom. Here is a screenshot of the docs: I'm assuming that sort is getting applied to the filtered set and not just the changeset. (In the example there are 3 rows in the filter set, and just 1 row in the changeset, the one row just added). Can you confirm whether or not sort applies to the changes only, and not the whole set of filtered rows? Cleary we're expecting sorting to apply to the whole set of rows in the UI. If it's just sorting the one row that got "filtered in", that would explain the issue, and we'd like to see that behavior changed so that the full set gets sorted. |
You've chosen the
I'll be asking the team and looking through the code to figure this out. In general, the I'll be posting the updates here. |
Thanks for checking! I'll take the sorting by wbs as a first immediate goal for this ticket. We can review the issue again after fixing that first. |
Thanks! |
Hm.. In my experiment, the sorting does not seem to be applied when adding new records. I'm adding a new record w/o |
Here's my code. I just copied the basic folder in examples and modified
to add another task (named 3 b foo). Code for that is at the bottom of app,js I only ran one trial. I'll try a few more variations. |
Pardon, it seems sorting is still applied if |
No worries. I did 3 trials adding to the top, middle, and bottom and all worked as expected. It would be nice to get to one set of config items ( |
reapplySortersOnAdd
not working as expected with applyProjectChanges
wbsValue
field does not work correctly with applyChangeset
method
So this issue was resolved and sorting by |
I grabbed the I just put this in the examples folder and run. In the console, I enter:
You need to re-load the page between tests. I always see the added task at the bottom. Are there an new config properties that need to be set? |
Sorry for delay, we'll be checking this soon. |
Any update? |
Sorry for delay, busy with other tasks. In your test case, do you update the |
I am updating I have |
Ok, all looks fine then. No, update for the whole tree is not necessary. Its weird that it does not work, since our test for this case passes. I'll be checking it soon. |
If you provide the file path and name for the test, I can take a look and see if I spot something different from my test case. |
Sorry, I just checked and found that I did not commit that test. Thankfully found it in the stash. Juggling too many PRs at the same time. Few scenarios are failing in it, most passes though. For example one that passes:
|
I'll need to revisit this issue. Noticed also |
This ticket was included in the 5.5.3 release by mistake. Please follow the #7489 instead |
Works as expected when using
taskStore.add(task)
, but doesn't if usedproject.applyProjectChanges(change)
.Forum post
We're trying to build live updates into our app and we're using the applyProjectChanges() method to apply incoming changes from other clients. We're not seeing the expected behavior from reapplySortersOnAdd or reapplyFilterOnAdd. Specifically, the filter seems to get applied to incoming changes regardless the setting for reapplyFilterOnAdd, and the sorter is not re-applied when reapplySortersOnAdd is true.
I put together a little demo of the issue by:
copying the basic example
changing the load url to example.json
turning on the filterBar feature
adding an initial sort and filter
adding a runChange(nameOfTask) function on window so we can simulate an incoming change in the console.
Code is in the attached zip file which can be expanded and dropped in the examples directory and then run like the other Bryntum examples.
Loading the page and entering:
in the console results in foo not showing in the gantt (it doesn't match the 'b' filter). Reloading and entering:
in the console results in "b foo" showing in the gantt because it does match the filter. In the code, reapplyFilterOnAdd and reapplyFilterOnUpdate are both set to false. It seems like that config doesn't apply to changes coming in via applyProjectChanges, since clearly filtering is happening with it set to false.
I've set reapplySortersOnAdd to true and expect when you apply the change for "b foo" above, that the gannt would resort by WBS. and I would see rows 1, 3 ,4. Instead, I still see an arrow indicating the sort is on, but the rows are not sorted correctly as the order is 1, 4, 3.
The goal is to get filtering and sorting to both be applied after incoming project changes. How is that done? Also, it would be nice if there were a reapplySortersOnUpdate so that both Adds and Updates can both get filtered and sorted.
The text was updated successfully, but these errors were encountered: