qgis / QGIS-Django

Django project for QGIS related activities such as plugin repository
http://qgis.org
GNU General Public License v2.0
86 stars 59 forks source link

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

Closed rduivenvoorde closed 6 months ago

rduivenvoorde commented 7 months ago

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:

gacarrillor commented 7 months ago

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 commented 7 months ago
  • 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

gacarrillor commented 7 months ago

@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 https://github.com/qgis/QGIS-Django/issues/260

Xpirix commented 7 months ago

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: https://github.com/qgis/QGIS-Django/pull/254 as discussed with @dimasciput

Best regards.

Xpirix commented 7 months ago

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: https://github.com/qgis/QGIS-Django/blob/08f01b4f62a2a75f05947ebf7f39d46c60ff249b/qgis-app/plugins/views.py#L555-L557 https://github.com/qgis/QGIS-Django/blob/08f01b4f62a2a75f05947ebf7f39d46c60ff249b/qgis-app/plugins/views.py#L575-L578

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 commented 7 months ago

Hi @Xpirix, thanks for your work!

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

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 commented 7 months ago

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:

gacarrillor commented 6 months ago

Solved in https://github.com/qgis/QGIS-Django/pull/316 @dimasciput @Xpirix, please close this issue.