Fix request page tag value#9250
Conversation
9e6926a to
dee6541
Compare
|
This pull request has been automatically marked as stale because it has not been updated for at least 3 months. If these changes are still valid, please remove the |
1 similar comment
|
This pull request has been automatically marked as stale because it has not been updated for at least 3 months. If these changes are still valid, please remove the |
dee6541 to
328d400
Compare
|
This pull request has been automatically marked as stale because it has not been updated for at least 3 months. If these changes are still valid, please remove the |
|
@GilbertCherrie sorry, I lost this one, what's the status on it? |
328d400 to
1c69831
Compare
1e075e0 to
57316b3
Compare
57316b3 to
69e2d59
Compare
39ccd49 to
cd34ac0
Compare
cd34ac0 to
b90708b
Compare
| - classifications = value.split(',').map do |c| | ||
| - classification = Classification.find_by(id: c.split('::').second) | ||
| - classification.description if classification | ||
| - # If the automation engine is changed to return arrays instead of strings separated by "\u001F" then we need to change the code below |
There was a problem hiding this comment.
I'm not sure why we have \u001F as a string separator... does this align with what we're doing in
#9482
ManageIQ/manageiq-automation_engine#545
should this PR or 9482 be part of ManageIQ/manageiq-content#773, which has a list of a bunch of work items where some are completed.
There was a problem hiding this comment.
Instead of arrays, currently we use \u001F as a separator. This PR fixed this issue: ManageIQ/manageiq-automation_engine#545 and enabled arrays, but after problems were found, it was reverted. This PR is independent of ManageIQ/manageiq-content#773, which contains the work items that need to be completed to allow for arrays and get rid of \u001F. Once that is all done we then need a follow up PR in the UI-classic repo to handle the arrays instead of strings.
There was a problem hiding this comment.
sent in chat, but if you can clarify in the 773 PR list of work items what work is done for the current way (this PR) and what is for the future way, (remove this separator and use arrays), as it's hard to follow what's fixing the current way and what's for the future (arrays) way.
There was a problem hiding this comment.
ok, ManageIQ/manageiq-content#773 looks better. Thanks for clarifying.
There was a problem hiding this comment.
I'm not sure why we have \u001F as a string separator
Essentially, if you have an Array of objects in automate, we used to serialize those as a comma-separated list (I think through the automation URIs, since automate uses URIs everywhere). This works fine for integers, but for strings, the strings could themselves have commas in them. So you'd have this problem where the user would create "abc", "def,ghi", "jkl", which would render to the URI as abc,def,ghi,jkl, and in turn be deserialized incorrectly. So, the decision was made to change both the automate side and the UI side to separate by \u001F instead of comma. The reason \u001F is chosen is because \u001F is defined as the "Unit Separator". (i.e. it's a control character specifically for this purpose of acting as a data separator). Since it's a control characters, it's incredibly unlikely to be in usable user data.
See ManageIQ/manageiq-automation_engine#484 (comment)
Original Issue: ManageIQ/manageiq-automation_engine#480
jrafanie
left a comment
There was a problem hiding this comment.
As discussed, we'll add cypress tests for this and the other pages in PRs linked in ManageIQ/manageiq-content#773 as we'll likely need to make some changes to make it work with arrays instead of delimited strings so it might make sense to get the expected page layout in cypress before doing that work so we can verify the page is correct when converted to use arrays.
|
@GilbertCherrie LGTM, can the rubocops be fixed or does it make sense to ignore them? |
c113327 to
50fdfdb
Compare
|
Checked commits GilbertCherrie/manageiq-ui-classic@b90708b~...50fdfdb with ruby 3.3.10, rubocop 1.86.0, haml-lint 0.72.0, and yamllint 1.37.1 app/views/miq_request/_request_dialog_details.html.haml |
|
Backported to |
Fix request page tag value (cherry picked from commit 2302577)
Fixes how dialog tag field values are displayed on the service request page.
Before:

The first tag dropdown is a multi-select with 3 values selected, but the request page only shows the first value.
After:

This PR fixes this bug to show all the selected values.