Skip to content

[com_associations] moved "checked out" check to a helper function#13758

Merged
jeckodevelopment merged 2 commits intojoomla:stagingfrom
rdeutz:move_checkout_to_helper
Jan 27, 2017
Merged

[com_associations] moved "checked out" check to a helper function#13758
jeckodevelopment merged 2 commits intojoomla:stagingfrom
rdeutz:move_checkout_to_helper

Conversation

@rdeutz
Copy link
Copy Markdown
Contributor

@rdeutz rdeutz commented Jan 25, 2017

Summary of Changes

This PR moves the check if an item is checked out to the helper function and used this function when creating links to items

Testing Instructions

  • install latest staging with 2 or more languages
  • create a 2nd user
  • open 2 browsers and log in with both users
  • browser A: open Multilingual Associations extension
  • browser A: chose article and a language
  • browser B: open an article (edit)

You will see that you can access an checked out article, this end with an error message but that's not nice.

Apply the patch

Now you can see that articles have the locked sign and also the associated items don't have a link to open it.

@alikon
Copy link
Copy Markdown
Contributor

alikon commented Jan 26, 2017

multipr

i've logged in in browser A with admin1
i've logged in in browser B with admin2

after applying the patch, on browser B i see the locked icon on article IT and it associated article GB
but both have a link to open is this wanted behaviuor ?

@rdeutz
Copy link
Copy Markdown
Contributor Author

rdeutz commented Jan 26, 2017

I didn't changed the article view I only worked on the associations view. Seems to me that is as it was before

@alikon
Copy link
Copy Markdown
Contributor

alikon commented Jan 26, 2017

sorry i was confused by

items don't have a link to open it.

@alikon
Copy link
Copy Markdown
Contributor

alikon commented Jan 26, 2017

I have tested this item ✅ successfully on 6e67ba1


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13758.

@ghost ghost mentioned this pull request Jan 27, 2017
@infograf768
Copy link
Copy Markdown
Member

Not sure it works as should. Maybe need clearer test instructions.

User2 using BrowserB is a manager with access to com_associations.
After patch, here is the page in browser B showing the article which is checked out by another user in browserA.
It does show the lock (greyed as Manager has no com_checkin permission) but the article is still clickable.

screen shot 2017-01-27 at 10 11 48

Now I click on the article title and I get this.

associationscheckedout3

As you can see, not only I can click on an item which is locked, but also I get weird results in the side by side and when closing and although the user/manager has no com_checkin permissions, the article is unlocked and the associated article (FR in this case) is locked.

@infograf768
Copy link
Copy Markdown
Member

I have tested this item 🔴 unsuccessfully on 6e67ba1


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13758.

@rdeutz
Copy link
Copy Markdown
Contributor Author

rdeutz commented Jan 27, 2017

Ok got it. This here moved the check if something is checked out to a helper function.

The question at hand is, what is the right behaviour?

a) If we say the article at the left is something like the source than it doesn't makes any sense to edit this or on the associated articles (because some is changing the source).

b) If this can be source or target than it is much more complicated.

What we can do is to disable the link on the article in the associations view, when the article is checked out

If the item at the left is checked out nothing can be done till the item is checked in
@rdeutz
Copy link
Copy Markdown
Contributor Author

rdeutz commented Jan 27, 2017

I made a fix following the a) behaviour

@infograf768
Copy link
Copy Markdown
Member

OK now: a locked item as well as its associations button (when present) do not open the side by side.

There are other issues to solve but I can mark this as tested OK for what it already does.

@infograf768
Copy link
Copy Markdown
Member

I have tested this item ✅ successfully on 14c6fcb


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13758.

@infograf768
Copy link
Copy Markdown
Member

@alikon
Please retest this to move on.

@alikon
Copy link
Copy Markdown
Contributor

alikon commented Jan 27, 2017

hope i've not missed some test case this turn ;)

@alikon
Copy link
Copy Markdown
Contributor

alikon commented Jan 27, 2017

I have tested this item ✅ successfully on 14c6fcb


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13758.

@joomla-cms-bot joomla-cms-bot removed this from the Joomla 3.7.0 milestone Jan 27, 2017
@rdeutz
Copy link
Copy Markdown
Contributor Author

rdeutz commented Jan 27, 2017

so we can set RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13758.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Jan 27, 2017
@jeckodevelopment jeckodevelopment merged commit 7dc3d68 into joomla:staging Jan 27, 2017
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Jan 27, 2017
@jeckodevelopment jeckodevelopment added this to the Joomla 3.7.0 milestone Jan 27, 2017
@rdeutz rdeutz deleted the move_checkout_to_helper branch January 29, 2017 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants