Page MenuHomePhabricator

create the listener for the hook to add the input field
Closed, ResolvedPublic

Description

Acceptance criteria

  • Create a class that subscribes to the event hook defined in T346953
  • When the hook is called, insert a simple text field which receives the Grant ID. The format is 1234-12345, see T321814.
  • The field should be validated and return an error if invalid, see possible error messages on T321814
  • The field should have a label reading "Grant ID", see the AC for the label on T321814
  • The field should have additional help text to explain its purpose, see the AC on T321814
  • The field should have a placeholder, see AC in T321814

Event Timeline

Change 963977 had a related patch set uploaded (by Cmelo; author: Cmelo):

[mediawiki/extensions/WikimediaCampaignEvents@master] Add listener for the hook to add the input field

https://gerrit.wikimedia.org/r/963977

Change 964627 had a related patch set uploaded (by Cmelo; author: Cmelo):

[mediawiki/extensions/WikimediaCampaignEvents@master] Show grantID if exist

https://gerrit.wikimedia.org/r/964627

Change 964627 abandoned by Cmelo:

[mediawiki/extensions/WikimediaCampaignEvents@master] Show grantID if exist

Reason:

we did it in the parent patch

https://gerrit.wikimedia.org/r/964627

Change 963977 merged by jenkins-bot:

[mediawiki/extensions/WikimediaCampaignEvents@master] Add listener for the hook to add the input field

https://gerrit.wikimedia.org/r/963977

Create a class that subscribes to the event hook defined in T346953
โ“ When the hook is called, insert a simple text field which receives the Grant ID. The format is 1234-12345, see T321814.

Screenshot 2023-11-03 at 4.11.18 PM.png (140ร—1 px, 15 KB)

@cmelo Can Grant IDs be either 8 or 9 digits then? This AC says the format is 1234-12345 but other places I see it listed as 1111-1111. Are both of these correct?


โœ… The field should be validated and return an error if invalid, see possible error messages on T321814

Screenshot 2023-11-03 at 4.28.32 PM.png (138ร—1 px, 29 KB)


โœ… The field should have a label reading "Grant ID", see the AC for the label on T321814

Screenshot 2023-11-03 at 4.08.00 PM.png (338ร—1 px, 83 KB)


โœ… The field should have additional help text to explain its purpose, see the AC on T321814

Screenshot 2023-11-03 at 4.08.45 PM.png (128ร—1 px, 55 KB)


โœ… The field should have a placeholder, see AC in T321814

Screenshot 2023-11-03 at 4.15.40 PM.png (124ร—370 px, 11 KB)
Screenshot 2023-11-03 at 4.16.07 PM.png (68ร—1 px, 33 KB)

Create a class that subscribes to the event hook defined in T346953
โ“ When the hook is called, insert a simple text field which receives the Grant ID. The format is 1234-12345, see T321814.

Screenshot 2023-11-03 at 4.11.18 PM.png (140ร—1 px, 15 KB)

@cmelo Can Grant IDs be either 8 or 9 digits then? This AC says the format is 1234-12345 but other places I see it listed as 1111-1111. Are both of these correct?


From @cmelo :

  • The rest amount of digits after the "-" can vary because it is incremental, current have grant IDs with 4 and 5 digits and it will become 6, 7 and so on

This is working as expected then. Moving to design sign off