-
Notifications
You must be signed in to change notification settings - Fork 22
fix( ENG-9127 ): add option of setting project contributors to preprint/registration #670
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
Conversation
| class="w-full" | ||
| styleClass="w-full" | ||
| (click)="addSourceProjectContributors()" | ||
| [label]="'add Source Project Contributors' | translate" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add translation.
| styleClass="w-full" | ||
| (click)="addSourceProjectContributors()" | ||
| [label]="'add Source Project Contributors' | translate" | ||
| data-test-add-contributor-button |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not correct data-test attribute. It must be data-test-add-contributors-from-parent or something similar..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose it is redundant at all, have copied it from another button of same file
| alert(this.allowAddingContributorsFromParentProject()); | ||
| if (this.allowAddingContributorsFromParentProject()) { | ||
| const currentProject = this.currentProject(); | ||
| alert(JSON.stringify(currentProject)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this.
| clearUsers: ClearUsers, | ||
| getParentProject: GetParentProject, | ||
| getComponentsTree: GetResourceWithChildren, | ||
| getSubjects: FetchSelectedSubjects, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need subjects?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, thanks
| getParentProject: GetParentProject, | ||
| getComponentsTree: GetResourceWithChildren, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also why do you need parent and components tree?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for now, have found a workaround to get parent in the component where we called the component
| readonly hasComponents = computed(() => this.components().length > 0); | ||
| readonly buttonLabel = computed(() => (this.isComponentsState() ? 'common.buttons.done' : 'common.buttons.next')); | ||
|
|
||
| currentProject = select(ProjectOverviewSelectors.getProject); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this.
| header: 'project.contributors.addDialog.addRegisteredContributor', | ||
| width: '448px', | ||
| data: addedContributorIds, | ||
| data: { addedContributorIds, allowAddingContributorsFromParentProject: true }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Preprints don't need this option. Remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix this comment.
| header: 'project.contributors.addDialog.addRegisteredContributor', | ||
| width: '448px', | ||
| data: addedContributorIds, | ||
| data: { addedContributorIds, allowAddingContributorsFromParentProject: true }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix this comment.
| class="w-full" | ||
| styleClass="w-full" | ||
| severity="secondary" | ||
| (click)="addSourceProjectContributors()" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| (click)="addSourceProjectContributors()" | |
| (onClick)="addSourceProjectContributors()" |
| } | ||
|
|
||
| addContributorsFromProject(resourceType: ResourceType, resourceId: string): Observable<void> { | ||
| const baseUrl = `${this.getBaseUrl(resourceType, resourceId)}/?copy_contributors_from_parent_project=${true}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| const baseUrl = `${this.getBaseUrl(resourceType, resourceId)}/?copy_contributors_from_parent_project=${true}`; | |
| const baseUrl = `${this.getBaseUrl(resourceType, resourceId)}/?copy_contributors_from_parent_project=true`; |
|
Change base branch to |
|
Fixing merge conflicts for the following PR by creating a new branch from target branch (there were so much conflicts to fix it in this PR) https://github.com/CenterForOpenScience/angular-osf/pull/685/files |
Purpose
Contributor page of components should offer option to import contributors from parent project.
Summary of Changes
Updating front end and back end code for such a purpose, allow only project with parent to do the stuff
Back End updates for the PR
CenterForOpenScience/osf.io#11376
Screenshot(s)
Screen.Recording.2025-10-17.at.23.37.54.online-video-cutter.com.mp4
Side Effects
QA Notes