Skip to content
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

[Issue] set image rolls only if is_required is true #38695

Open
1 of 5 tasks
in-session opened this issue May 3, 2024 · 12 comments
Open
1 of 5 tasks

[Issue] set image rolls only if is_required is true #38695

in-session opened this issue May 3, 2024 · 12 comments

Comments

@in-session
Copy link
Contributor

in-session commented May 3, 2024

Preconditions and environment

Especially when managing many product images with different functions, it often happens that the wrong image roles are used when creating products. Here the field is_required should be used to control which roles are necessary by default. An image role does not mean that it has to be filled, as long as it is not an is_required.

Magento version 2.4.6-p5

Steps to reproduce

  1. create a new product attributes media/images
  2. then create a new article and upload the image

Expected result

all roles are assigned to the first picture

Actual result

only necessary roles should be assigned to the first image

Additional information

No response

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Ashampoo_Snap_Freitag_-3.-Mai-2024_08h22m17s_003_.mp4

Productt attribute media / image should be available is_required to automatically assign the image role when creating a product:

image

Copy link

m2-assistant bot commented May 3, 2024

Hi @in-session. Thank you for your report.
To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:


Join Magento Community Engineering Slack and ask your questions in #github channel.
⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
🕙 You can find the schedule on the Magento Community Calendar page.
📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

@in-session
Copy link
Contributor Author

@magento give me 2.4-develop instance

Copy link

Hi @in-session. Thank you for your request. I'm working on Magento instance for you.

@engcom-Bravo engcom-Bravo self-assigned this May 3, 2024
Copy link

m2-assistant bot commented May 3, 2024

Hi @engcom-Bravo. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
  • 3. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
  • 4. Verify that the issue is reproducible on 2.4-develop branch
    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
  • 5. Add label Issue: Confirmed once verification is complete.
  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-Bravo engcom-Bravo added the Reported on 2.4.6-p5 Indicates original Magento version for the Issue report. label May 3, 2024
Copy link

@in-session in-session changed the title Image rolls should be adjustable by default [Issue] set image rolls only if is_required is true May 3, 2024
@engcom-Bravo
Copy link
Contributor

Hi @in-session,

Thanks for your reporting and collaboration.

We have checked the issue in Latest 2.4-develop instance we are not able to see the Values Required option for the Media image attribute type.

Screenshot 2024-05-03 at 12 32 07 Screenshot 2024-05-03 at 12 31 10

As per the Magento dedocs https://docs.magento.com/user-guide/v2.3/stores/attributes-input-types.html when we create media image type attribute it becomes an additional image type, along with Base, Small, and Thumbnail.

Could you please let us know if we are missing anything.

Thanks.

@engcom-Bravo engcom-Bravo added the Issue: needs update Additional information is require, waiting for response label May 3, 2024
@m2-community-project m2-community-project bot moved this from Ready for Confirmation to Needs Update in Issue Confirmation and Triage Board May 3, 2024
@in-session
Copy link
Contributor Author

in-session commented May 3, 2024

@engcom-Bravo
That's not quite what I mean, even if I can exclude it from the product gallery. Is the newly created role always automatically assigned to the first image:

Wrong:
image

So the field is_required yes/no should be used to determine whether the image role should be assigned automatically.
Or a new field in which you can say which role should automatically be assigned to the first image.
image

Because all roles are always set to the first image, the images would be all over the place and that is not effective:

$product->getResource()->getAttribute('key_point_1')->getFrontend()->getValue($product);
$product->getResource()->getAttribute('key_point_2')->getFrontend()->getValue($product);
$product->getResource()->getAttribute('key_point_3')->getFrontend()->getValue($product);

@engcom-Bravo
Copy link
Contributor

@magento give me 2.4-develop instance

Copy link

Hi @engcom-Bravo. Thank you for your request. I'm working on Magento instance for you.

Copy link

@in-session
Copy link
Contributor Author

This only makes sense if they are necessary fields, an image role should be set by default when you assign it to the image role.
https://docs.magento.com/user-guide/v2.3/catalog/product-image-upload.html#assign-roles

image

@engcom-Bravo
Copy link
Contributor

Hi @in-session,

Thanks for your update.

For the Media image type attribute there will be no is_required field hence we are not able to set whether it is required or not As per the Magento devdocs when we create Media image type attribute it will be an additional image type and it is an expected behaviour.is_required field is required for image attribute.

Hence to proceed further we are marking this as a feature request.

Thanks.

@m2-community-project m2-community-project bot added this to In Progress in Feature Requests Backlog May 6, 2024
@engcom-Bravo engcom-Bravo removed Progress: dev in progress Issue: needs update Additional information is require, waiting for response labels May 6, 2024
@m2-community-project m2-community-project bot moved this from In Progress to Ready for Grooming in Feature Requests Backlog May 6, 2024
@m2-community-project m2-community-project bot moved this from Ready for Grooming to In Progress in Feature Requests Backlog May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants