Skip to content
Snippets Groups Projects
Commit d265d0db authored by Timothee P's avatar Timothee P :sunflower:
Browse files

fix wrong position on feature edit if ordered by modification date

parent 95145909
No related branches found
No related tags found
1 merge request!531REDMINE_ISSUE-15794| Modification des attributs en masse - Copie de tous les attributs si le champ est laissé vide
......@@ -198,7 +198,7 @@ const feature = {
const slug_type_signal = rootState['feature-type'].current_feature_type_slug;
if (routeName === 'ajouter-signalement' && !query.ordering) {
if (routeName === 'ajouter-signalement' && query && !query.ordering) {
const project = rootState.projects.project;
query = {
ordering: project.feature_browsing_default_sort,
......@@ -207,8 +207,9 @@ const feature = {
if (project.feature_browsing_default_filter === 'feature_type_slug') {
query['feature_type_slug'] = slug_type_signal;
}
} else if (query.ordering === '-updated_on') { // else(when editing a feature) and if the list is ordered by update time
query.offset = 0;// it would be in first position
}
if (query && query.ordering === '-updated_on') { // if the list is ordered by update time
query.offset = 0;// it would be in first position (else, if ordered by creation, the position won't change anyway)
}
dispatch(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment