grid icon indicating copy to clipboard operation
grid copied to clipboard

t1535 - Adds functionality that allows some restrictions text and special instructions text to be defined in config against the rights category and then displayed accordingly in metadata panel

Open AndyKilmory opened this issue 8 months ago • 15 comments

What does this change do?

Summary This change allows some Restrictions text and Special Instructions text to be defined in the Application level config agianst specific Rights Categories. This information will then be displayed in the metadata and info panels when the image is selected (either as part of a set of images or individually). The information will displayed alongside any restrictions or special intructions that are added by the user and are specific to the image in question.

The configuration derived restrictions and special instructions will not be editable by the user in either the info panel or the metadata panel. If the rights category is updated then the any restrictions and special instructions derived from configuration will be displayed in place of those associated with the prior rights category.

Configuration derived restrictions and special instructions will also be displayed on the Upload page during the editing of the image metadata during the upload process. Thus the uploader will be able to see which restrictions and special instructions will be displayed with this image due to the selected rights category.

It also changes the behaviour of the Special Instructions group in the info panel and metadata editor - previously if an image didn't have any special instructions this section was not visible - this made it hard to add special instructions to an image that had not got any. This PR changes that behaviour so that the Special Instruction group is visible even if the image does not contain any value in that field. The behaviour now closely mirrors that of other metadata fields like Description wherer the User if told the value is unknown and given the option to edit if they have edit rights - see below...

Screenshot 2024-07-01 at 10 36 33

Defining Special Intructions and Restrictions in Config The rights category Special Instructions and Restrictions should be defined in the application configuration as json objects according to the patterns;

usageInstructions { {{rights category key}} = "{{rights derived special instructions}}" }

usageRestrictions { {{rights category key}} = "{{rights derived restrictions}}" }

for example;

usageInstructions { staff-photographer = "You must also make sure that any use meets BBC’s Editorial Guidelines." contract-photographer = "This image can only be used for non-commercial BBC promotional activity of the programme from which it came." }

usageRestrictions { staff-photographer = "See the special instructions related to this image and consider if the use is editorially justified" contract-photographer = "See the special instructions and lease details related to this image." obituary = "Only to be used in conjunction with named person." }

If the usageInstructions and usageRestrictions objects are empty or absent from the configuration then the code will continue to operate as normal with no additional information displayed in conjunction with the images.

Display of information in grid and image views In main image grid the additional information will appear as follows;

Screenshot 2024-06-05 at 10 42 04

When an image is selected the information will appear as;

Screenshot 2024-06-05 at 10 43 56

Note: This image also shows how the user is able to add further special instructions that are image specific in addition to those derived from the rights category.

Display on Uploads Page On the uploads page the config declared rights restrictions and special instructions will appear as;

Screenshot 2024-06-05 at 10 49 23

This eaxmple shows both restrictions and special instructions drawn from config. Note the special instructions element will only be updated and displayed once the new usage rights category has been saved.

How should a reviewer test this change?

Testing should ensure that;

  • Any restrictions and special instructions defined in configuration display in the grid view, image view and upload page as expected for the correct rights category and that all other rights categories are unaffected.
  • Any additional restrictions and special instructions defined against an image are added to the diaply after the config derived restrictions and special instructions
  • Editing of the rights category for an image results in the corret config derived infomration displaying.
  • The behaviour of the uploads page is correct and shows the correct restrictions and special instructions as required and that upload continue to operate as required.
  • No other functionality is affected by these changes

Who should look at this?

Tested? Documented?

  • [x ] locally by committer
  • [ ] locally by Guardian reviewer
  • [ ] on the Guardian's TEST environment
  • [ ] relevant documentation added or amended (if needed)

AndyKilmory avatar Jun 05 '24 09:06 AndyKilmory