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

Create MR with a webform #226

Closed
CraigClark opened this issue Nov 9, 2023 · 6 comments
Closed

Create MR with a webform #226

CraigClark opened this issue Nov 9, 2023 · 6 comments
Assignees
Labels
alpha Alpha release as per Sprint With Us is anticipated Dec 31, 2023 Needs work This issue has been reviewed and there is more work to do Priority: high This issue has a high user or business impact and requires a hot fix Sprint 9 November 10 to November 30 Sprint 10 December 1 - December 31 task a task that a dev team member needs to address
Milestone

Comments

@CraigClark
Copy link
Collaborator

CraigClark commented Nov 9, 2023

OP timer

https://openplus.monday.com/boards/4092908516/pulses/5484530834


When an editor goes to the landing page, there is a block for them to create a new MR. It has fields for a title and an OPR.

This block is a webform; the webform content creator module created the node.

When the node is first created, it is in the draft state and shows up in the My unpublished records table.

The webform

The webform has a field for the title and the Office of primary responsibility.

To do this we will need the following:

The org field is an entity reference to the view for the user's available orgs. There is something similar at https://hcdev.openplus.ca/en/admin/webform/manage/create_a_new_alert.

What we want is a block that has the title field, the org field is pre-populated. If the user belongs to more than one org, privide a select list.

A user cannot select an org they are not member of.

related #215

@CraigClark CraigClark added task a task that a dev team member needs to address Priority: high This issue has a high user or business impact and requires a hot fix labels Nov 9, 2023
@CraigClark CraigClark added this to the Dashboard milestone Nov 9, 2023
@NicoledeGreef NicoledeGreef added the Sprint 9 November 10 to November 30 label Nov 9, 2023
@CraigClark CraigClark assigned CraigClark and unassigned lkmorlan Nov 14, 2023
@CraigClark CraigClark moved this from Todo to In Progress in MFIN Data Catalogue Nov 14, 2023
@CraigClark CraigClark moved this from In Progress to Todo in MFIN Data Catalogue Nov 15, 2023
@CraigClark CraigClark assigned lkmorlan and unassigned CraigClark Nov 15, 2023
@lkmorlan lkmorlan mentioned this issue Nov 17, 2023
5 tasks
@lkmorlan lkmorlan moved this from Todo to In Progress in MFIN Data Catalogue Nov 20, 2023
@lkmorlan lkmorlan moved this from In Progress to Ready for review in MFIN Data Catalogue Nov 20, 2023
@CraigClark
Copy link
Collaborator Author

CraigClark commented Nov 21, 2023

@lkmorlan This worked for me as admin.

  1. Changes needed
  • data catalogue editors, managers and admins need to be able to use the webform to create node
  • dc admin should be able to change the OPR in section 2 of the build page
  • remove existing button to create a node for all roles

Image

  • on the build page, everyone with access should be able to see the opr, but not change it in form display. It is ok to hide this field on form display, no need to display but disabled

@NicoledeGreef NicoledeGreef added the alpha Alpha release as per Sprint With Us is anticipated Dec 31, 2023 label Nov 21, 2023
@CraigClark
Copy link
Collaborator Author

@lkmorlan I tested this and it works, a few change requests.
For the field formatter on the webform and the build section, please use a select list (drop down)

If I do not belong to an org, I should not be able to add a MR here. This works, I don't have access to the form if I do not have an org. However, I can see the block title. Please make the title go away for people who do not have the correct role/org combination to create an MR

@joel-osc
Copy link
Contributor

Maybe instead of making the block title go away you add text indicating that the user does not have an org and to contact an admin to fix it.

@lkmorlan
Copy link
Collaborator

lkmorlan commented Nov 22, 2023

  • Use select list for the OPR when both creating and editing MRs.
  • Error message when there is no org: "You need to belong to an organization to create meta-data records. Please contact [Use the site email address for now] to have an org assigned to you."

@CraigClark
Copy link
Collaborator Author

Documentation on using the webform to create content has been added for staff and for developers.

@CraigClark CraigClark added the Needs work This issue has been reviewed and there is more work to do label Nov 22, 2023
@lkmorlan lkmorlan moved this from Ready for review to In Progress in MFIN Data Catalogue Nov 23, 2023
@lkmorlan lkmorlan moved this from In Progress to Ready for review in MFIN Data Catalogue Nov 23, 2023
@lkmorlan
Copy link
Collaborator

Bug found and reported:
https://www.drupal.org/project/webform/issues/3403835

lkmorlan added a commit that referenced this issue Nov 23, 2023
@github-project-automation github-project-automation bot moved this from Ready for review to Done in MFIN Data Catalogue Nov 23, 2023
lkmorlan added a commit that referenced this issue Dec 7, 2023
@CraigClark CraigClark added the Sprint 10 December 1 - December 31 label Dec 8, 2023
CraigClark pushed a commit that referenced this issue Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alpha Alpha release as per Sprint With Us is anticipated Dec 31, 2023 Needs work This issue has been reviewed and there is more work to do Priority: high This issue has a high user or business impact and requires a hot fix Sprint 9 November 10 to November 30 Sprint 10 December 1 - December 31 task a task that a dev team member needs to address
Projects
Development

When branches are created from issues, their pull requests are automatically linked.

4 participants