MallikarjunaReddyN opened a new issue, #38340:
URL: https://github.com/apache/superset/issues/38340

   ### Bug description
   
   The sort functionality in the Table chart stops working after a column label 
is edited or renamed. Although the updated label is reflected in the UI, the 
sort mechanism does not recognize the new column name, suggesting a possible 
mismatch between the displayed label and the underlying data field reference.
   
   **Repo steps:**
   
   - Create Table chart
   - Enable server pagination & Search box
   - Edit the label for column in Dimension section.
   - Click on icon besides edited/renamed column.
   
   
   ### Screenshots/recordings
   
   The bug is demonstrated below:
   
   
https://github.com/user-attachments/assets/d103b2f1-4475-4883-be6b-048c4960ab63
   
   ### Superset version
   
   6.0.0
   
   ### Python version
   
   3.11
   
   ### Node version
   
   18 or greater
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   **Endpoint Details:**
   API: 
http://localhost:8099/api/v1/chart/data?form_data=%7B%22slice_id%22%3A122%7D
   **Payload:**
   
{"datasource":{"id":26,"type":"table"},"force":false,"queries":[{"filters":[],"extras":{"time_grain_sqla":"P1D","having":"","where":""},"applied_time_extras":{},"columns":[{"expressionType":"SQL","label":"Id","sqlExpression":"CustomerID"},"FirstName","LastName","Email","Phone"],"metrics":[],"orderby":[["Id",true]],"annotation_layers":[],"row_limit":10,"row_offset":0,"series_limit":0,"group_others_when_limit_reached":false,"order_desc":true,"url_params":{"form_data_key":"ZMTkjKuW06A","slice_id":"122"},"custom_params":{},"custom_form_data":{},"post_processing":[],"time_offsets":[]},{"filters":[],"extras":{"time_grain_sqla":"P1D","having":"","where":""},"applied_time_extras":{},"columns":[{"expressionType":"SQL","label":"Id","sqlExpression":"CustomerID"},"FirstName","LastName","Email","Phone"],"metrics":[],"orderby":[["Id",true]],"annotation_layers":[],"row_limit":10000,"row_offset":0,"series_limit":0,"group_others_when_limit_reached":false,"order_desc":true,"url_params":{"form_data_
 
key":"ZMTkjKuW06A","slice_id":"122"},"custom_params":{},"custom_form_data":{},"post_processing":[],"time_offsets":[],"is_rowcount":true}],"form_data":{"datasource":"26__table","viz_type":"table","slice_id":122,"url_params":{"form_data_key":"ZMTkjKuW06A","slice_id":"122"},"query_mode":"aggregate","groupby":[{"expressionType":"SQL","label":"Id","sqlExpression":"CustomerID"},"FirstName","LastName","Email","Phone"],"time_grain_sqla":"P1D","temporal_columns_lookup":{},"all_columns":[],"percent_metrics":[],"adhoc_filters":[],"order_by_cols":[],"server_pagination":true,"server_page_length":10,"row_limit":10000,"percent_metric_calculation":"row_limit","table_timestamp_format":"smart_date","include_search":true,"allow_render_html":true,"show_cell_bars":true,"color_pn":true,"comparison_color_scheme":"Green","conditional_formatting":[],"comparison_type":"values","extra_form_data":{},"force":false,"result_format":"json","result_type":"full"},"result_format":"json","result_type":"full"}
   
   **Response:**
   {
     "message": "Error: Unknown column used in orderby: Id"
   }
   
   
   ### Checklist
   
   - [x] I have searched Superset docs and Slack and didn't find a solution to 
my problem.
   - [x] I have searched the GitHub issue tracker and didn't find a similar bug 
report.
   - [ ] I have checked Superset's logs for errors and if I found a relevant 
Python stacktrace, I included it here as text in the "additional context" 
section.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to