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

Plugin details mixup 'created_by' 'owner' 'author' and 'maintainer' #303

Closed
rduivenvoorde opened this issue Nov 8, 2023 · 8 comments
Closed
Assignees
Labels
🕔 Size 3 It will take me between 2 hours to half a day

Comments

@rduivenvoorde
Copy link
Contributor

I'm being contacted by (old) plugin owners who still see there name in plugins.qgis.org while the plugin details in metadata.txt OR in the admin pages are all updated.
As an example:

image

This 'arichard' is not in the metadata or edit page anymore

image

Looking into the code

https://github.com/qgis/QGIS-Django/blob/master/qgis-app/plugins/templates/plugins/plugin_detail.html#L131

It looks like we take the list of (mail addresses?) in created_by and then the the first one alphabetically?
Which in this case is apparently the wrong one.

Would a solution be:

  • either rename 'Maintainer' to 'Created by' in the plugin details page and then show the list of ALL users who created versions of the plugin. In that way if an organisation really want't to get rid of a name, they can remove a version (with the 'created_by')
  • OR order the versions by version number an just take the newest version of a plugin and from THAT one take the created_by user?
@gacarrillor
Copy link
Member

It looks like we take the list of (mail addresses?) in created_by and then the the first one alphabetically?

As of now, I guess the maintainer is the person who first submitted the plugin.

@Xpirix Xpirix moved this to To Be Estimated in QGIS Websites Maitenance Nov 28, 2023
@Xpirix Xpirix self-assigned this Nov 28, 2023
@Xpirix Xpirix added the 🕔 Size 3 It will take me between 2 hours to half a day label Nov 28, 2023
@Xpirix
Copy link
Collaborator

Xpirix commented Nov 28, 2023

  • either rename 'Maintainer' to 'Created by' in the plugin details page and then show the list of ALL users who created versions of the plugin. In that way if an organisation really want't to get rid of a name, they can remove a version (with the 'created_by')
  • OR order the versions by version number an just take the newest version of a plugin and from THAT one take the created_by user?

We could also combine these proposed solutions by keeping both fields so Created by would be the person who first submitted the plugin and Maintainer would be the user who created the newest version like the following screenshot:

image

@Xpirix Xpirix moved this from To Be Estimated to Todo in QGIS Websites Maitenance Nov 28, 2023
@Xpirix Xpirix moved this from Todo to This sprint in QGIS Websites Maitenance Nov 28, 2023
@Xpirix Xpirix moved this from This sprint to In Progress in QGIS Websites Maitenance Nov 28, 2023
@gacarrillor
Copy link
Member

gacarrillor commented Nov 28, 2023

@Xpirix, what about showing a Maintainer field in the edit form with the Plugin creator selected by default and the plugin owners as options.

By default:
image

Options:
image


In this way, everything continues as it is, except for those plugins like DataGrandEst that need to switch the maintainer.


BTW, this implementation would also close #260

@Xpirix
Copy link
Collaborator

Xpirix commented Nov 29, 2023

Hello @gacarrillor , that's a good idea, thank you. I will implement this.

I also take advantage of the current issue to replace all Owner appearances with Collaborators, to be consistent with:
#254 as discussed with @dimasciput

Best regards.

@Xpirix
Copy link
Collaborator

Xpirix commented Nov 29, 2023

Dear @gacarrillor,

Since the field Maintainer refers to the original field created_by, the selected Owner becomes the Plugin creator after an update. Then, the old plugin creator won't be part of the plugin anymore because this user is already excluded when the form is initiated or saved according to the following codes:

form.fields["owners"].queryset = User.objects.exclude(
pk=plugin.created_by.pk
).order_by("username")

form = PluginForm(instance=plugin)
form.fields["owners"].queryset = User.objects.exclude(
pk=plugin.created_by.pk
).order_by("username")

Please find below a GIF:
Maintainer_field

Is this OK or should we include the plugin creator as part of the owners/collaborators? I'm sorry but I'm a bit lost here.

Thank you,
Best regards.

@gacarrillor
Copy link
Member

Hi @Xpirix, thanks for your work!

Sorry for the delay, I guess right now we're almost at opposite sides (antipodes) in the 🌏

It looks great, I think it's getting closer.

Since the field Maintainer refers to the original field created_by, the selected Owner becomes the Plugin creator after an update.

In my opinion, it'd be good to preserve the original created_by user internally (i.e., not necessarily for display purposes), even if it's not the maintainer anymore.

To display the created_by field in the plugin details could be optional (e.g., via a checkbox in the plugin edit page) and it could be False by default (since the Maintainer field will have the created_by user selected by default anyways).

However, once a plugin admin selects an owner/collaborator as the new maintainer, he/she could click the checkbox to show the created_by user in the plugin details, and thus acknowledge or credit him/her for his/her original work.

image

In this way, the created_by user will always be an option in the Maintainers combobox.

Does that make sense?

@Xpirix
Copy link
Collaborator

Xpirix commented Nov 30, 2023

Hello @gacarrillor , my pleasure.

Yes, that makes sense. I also think that it's better to preserve the original created_by field. So I will create 2 new fields in the model:

  • a field maintainer to store the maintainer user. It takes the value from created_by by default. This new field will be displayed as the maintainer in the plugin details.
  • a field display_created_by to display the created_by in the plugin details. This is set to False by default.

@Xpirix Xpirix moved this from In Progress to Review in progress in QGIS Websites Maitenance Nov 30, 2023
@gacarrillor
Copy link
Member

Solved in #316
@dimasciput @Xpirix, please close this issue.

@Xpirix Xpirix closed this as completed Dec 23, 2023
@github-project-automation github-project-automation bot moved this from Review in progress to Done in QGIS Websites Maitenance Dec 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🕔 Size 3 It will take me between 2 hours to half a day
Projects
Development

No branches or pull requests

3 participants